Description
Before using this endpoint, please review the OAuth2 authentication protocol and the purpose of each token by visiting: https://dru-id.com/developers/apis/oauth-2/.
To successfully invoke this service, a valid client_token
associated with an authorized API client is required. Ensure that your application is properly registered and has been granted the necessary permissions to obtain and use this token.
Allows the creation of a new typology in the system, defined by the integrator for classification or segmentation purposes.
Endpoint URL:
POST https://{your-endpoint-domain.com}/activityid/v1/typology/create
Request Headers
Parameter | Description | Type | Required |
---|---|---|---|
Authorization | “Bearer | string | yes |
Content-Type | The type of content that will be used for requests to be JSON | string | yes |
Accept | The type of content that will be used for responses to be JSON | string | yes |
From | Name of the entry point | string | yes |
Accept-Language | Language for this request | Locale | no |
Query string parameters
none
Request Example
Parameter | Description | Type | Required | Value |
---|---|---|---|---|
actor.id | app_id of the application you are using to log user | string | yes | app id |
actor.objectType | Type of the object which represents the actor. | string | yes | ‘application’ |
verb | Verb used for creating a new typology. | string | yes | ‘create’ |
object.objectType | ObjectType represents the user | string | yes | ‘typology’ |
object.name | Name or key of the Typology to be created | string | yes | My new Typology |
object.parent | Parent of the typology to be created. The root one is User | string | yes | User |
object.requiresApproval | Whether an operator should accept the user manually. | boolean | no | false |
source.id | Type of device doing the activity | string | yes | ‘unknown’ | ‘pc’ | ‘mobile’ | ‘tablet’ | ‘game_console’ | ‘itv’ |
source.objectType | Type of source | string | yes | ‘device’ |
Response examples
Response: Typology Created
Parameter | Description | Type |
---|---|---|
result | Common http result | struct |
result.status | Http code | integer |
content | Data receive with the response | struct |
content.objectType | Type of object returned | string |
content.name | Name of the typology created | string |
content.parent | Name of the parent typology. | string |
content.requiresApproval | Whether the created typology requires an operator approval. | string |
Response codes
Code | Type | Description |
---|---|---|
400 | Error | Bad Request: The request could not be understood by the server due to malformed syntax |
401 | Error | Unauthorized: authentication is required and has failed or has not yet been provided (token is invalid, etc) |
403 | Error | Forbidden: user id or password are invalid |
409 | Error | Conflict: The key for the new typology already exists. |
412 | Error | Precondition failed: The parent typology must exist. |
500 | Error | Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request |
504 | Error | Gateway TimeoutService can not contact with oauth server to do some internal operations |
201 | Success | Typology Created |