GET login/users/:user id/clustering/features
From Social ID Developers
Revision as of 16:51, 30 December 2021 by Gabriel.prado (Talk | contribs)
Contents |
Description
Returns user clustering features.
For each feature label defined in the rules, the clustering engine provides a value representing the user's interest likelihood for the given label. The highest likelihood can be used to classify the user with the respective label for the given feature.
Example: for the feature "music", the labels likelihoods could be: rock - 0.5, pop - 0.2, blues - 0.3. The user seems to be more interested on "rock" music, with 50% probability.
Resource URL
GET https://api.socialidnow.com/v1/marketing/login/users/:user_id/clustering/features
Parameters
URL Parameters
user_id | required | user identifier. |
---|
Authentication
This API requires Login App authentication. See Authentication.
Response
Response Status
ok (200) | The request was successful. |
---|---|
unauthorized (401) | The authentication is wrong. See Authentication. |
forbidden (403) | The login app has no permission to access this user. |
not_found (404) | The user was not found. |
internal_server_error (500) | An unknown error happened. |
Examples
Request
Returns the clustering rules from the login user 340:
curl -iX GET 'https://api.socialidnow.com/v1/marketing/login/users/340/clustering/features' \ -H 'Content-type: application/json' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 200 Ok Status: 200
Response Body
Example of clustering features:
{ "features": { "movies": { "drama": 0.25, "comedy": 0, "sci-fi": 0.5, "horror": 0, "adventure": 0.25 }, "music": { "rock": 0.73, "pop": 0.09, "blues": 0.18, "pagode": 0 } } }