GET login/apps/clustering/rules

From Social ID Developers
Jump to: navigation, search

Contents

Description

Returns login app clustering rules.

Resource URL

  GET https://api.socialidnow.com/v1/marketing/login/apps/clustering/rules

Authentication

This API requires Social Login App authentication. See Authentication.

Response

Response Status

ok (200) The request was successful.
unauthorized (401) The authentication is wrong. See Authentication.
internal_server_error (500) An unknown error happened.

Examples

Request

Returns the clustering rules from the login app 138:

curl -iX GET 'https://api.socialidnow.com/v1/marketing/login/apps/clustering/rules' \
-H 'Content-type: application/json' \
--user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers

HTTP/1.1 200 Ok
Status: 200

Response Body

Example of clustering rules:

{
 "rules": {
   "features": {
     "music": {
       "labels": [
         {
           "name": "rock",
           "keywords": [
             "rock"
           ]
         },
         {
           "name": "pop",
           "keywords": [
             "pop"
           ]
         },
         {
           "name": "blues",
           "keywords": [
             "blues"
           ]
         },
         {
           "name": "pagode",
           "keywords": [
             "pagode"
           ]
         }
       ],
       "classifier": {
         "type": "likes",
         "categories": [
           "Musician/Band",
           "Music",
           "Music award"
         ],
         "threshold": 0.1,
         "excluded_words": [
           "soul"
         ]
       }
     },
     "movies": {
       "labels": [
         {
           "name": "drama",
           "keywords": [
             "drama"
           ]
         },
         {
           "name": "comedy",
           "keywords": [
             "comedy",
             "comedia"
           ]
         },
         {
           "name": "sci-fi",
           "keywords": [
             "sci-fi",
             "scifi"
           ]
         },
         {
           "name": "horror",
           "keywords": [
             "horror",
             "terror"
           ]
         },
         {
           "name": "adventure",
           "keywords": [
             "adventure",
             "aventura"
           ]
         }
       ],
       "classifier": {
         "type": "likes",
         "categories": [
           "Movie",
           "Movie genre",
           "Movies/music"
         ],
         "threshold": 0
       }
     }
   },
   "parameters": {
     "excluded_words": [
       "odeio",
       "ruim"
     ]
   }
 }
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox