User PUT Resources


Set initial tag relations

PUT /users/:id/tag-relations

An Admin can use this endpoint to create relations between the specified tags and the specified user. This is especially useful to create an initial know-how map for new users, so Starmind can already show them relevant content upon their first login. These relations are not guaranteed to be preserved forever, as the Starmind algorithm automatically strengthens and weakens different connections based on the user's actions.

The user-tag relations can be created with three different initial weights: low, medium and high. If the given tag does not exist, it will be created. Existing user-tag relations will be updated. If the same tag is specified for different weights (high, medium, low), then only the highest weight will be taken into account. Specifying the same tag with different capitalizations in a single request will cause a validation error.

Parameter Type Default Required Description
high_weight_tags array of tag labels - between 2 and 255 characters.
medium_weight_tags array of tag labels - between 2 and 255 characters.
low_weight_tags array of tag labels - between 2 and 255 characters.

Json Payload

{
  "high_weight_tags": ["Detective", "Crimes"],
  "medium_weight_tags": ["Surveillance"],
  "low_weight_tags": ["Archery"]
}

Response

The response contains all tags that have been updated.

{
  "high_weight_tags": ["Detective", "Crimes"],
  "medium_weight_tags": ["Surveillance"],
  "low_weight_tags": ["Archery"]
}

Set initial tag relations for myself

PUT /users/my-tag-relations

Using this endpoint, any user can manually create a relation between himself and up to five tags.

In order to stop individual users from manipulation the algorithm, it is not possible to specify different weights for these relations and the number of relations is limited to five. If more than five tags are submitted, then only the first five are taken into account and included in the response. Duplicates are ignored. However, specifying the same tag with different capitalizations in a single request will cause a validation error.

If the same user uses this endpoint multiple times, then the earlier inputs are forgotten and only the tag relations from the last request to this endpoint are taken into account.

Parameter Type Default Required Description
tags array of tag labels - maximum five labels

Json Payload

{
  "tags": ["Detective", "Crimes"]
}

Response

The response contains all tags that have been updated.

{
  "tags": ["Detective", "Crimes"]
}