Create entities
Learn about the Entities API to create one or more entities in your Reltio tenant.
Use the Entities to create one or more entities in your Reltio tenant.
A Reltio entity describes a data object such as a person, organization, product, or location. Entities are comprised of properties such as URIs, type, labels, roles, tags, attributes, crosswalks, and timestamps. For more information, see topic Reltio entity types.
- ROLE_ADMIN_CUSTOMER
- ROLE_ADMIN_TENANT
- ROLE_ADMIN_USER
- ROLE_API
- ROLE_USER
You use the same API to update entities, but with different parameters. For more information, see topic Update entities.
Request
POST /services/reltio/api/{tenantId}/entities/
Parameter | Type | Required | Description |
---|---|---|---|
Authorization | string | Yes | The bearer token URL returned by the Authentication.For information on obtaining an authorization token to run Reltio REST APIs using the Security OAuth 2.0 security method, see topic Authentication API. |
Content-type | string | Yes | The format to use to transmit data:
|
Parameter | Type | Required | Description |
---|---|---|---|
tenantId | string | Yes | The unique identification number for the Reltio tenant, for example: . |
Parameter | Type | Required | Description |
---|---|---|---|
returnObjects | boolean | No | Whether the response contains created entities: true (default) or false. |
options | array(string) | No | A comma-separated list of options that determines the contents of the response the API endpoint returns:
|
executeLCA | boolean | No | Whether to trigger all Lifecycle Actions during this request: true (default) or false. For more information, see topic LCA Framework. Note: During dataload, for an asynchronous incremental match thread, the LCA is called regardless of the setting of this executeLCA parameter. |
Parameter | Type | Required | Description |
---|---|---|---|
entities_to_create | array | Yes | One or more Reltio entity objects to be created. To create a single entity, specify just one JSON object in this array. Each entity object requires the The If you include crosswalks in the request (for example, |
Response
The API endpoint returns a response in JSON format. The response contents depend on the parameters you passed in the request.
Status Code | Message | Description |
---|---|---|
200 | Entities are successfully saved | You successfully created the requested entities. You can send an array of entities in one request. The status code is 200 even if all entities are not successfully created. The response payload contains the details of the error in creating failed entities. For example, you send five entities to update and only one contains an error in response. The response contains the following error:[ { "index": 0, "errors": { "severity": "Error", "errorMessage": "Type is not found for URI configuration/entityTypes/HCP45 and tenant LocalTenantId", "errorCode": 119, "errorDetailMessage": "Type is not found for URI configuration/entityTypes/HCP45 and tenant LocalTenantId" }, "successful": false } ] Note: Even if you are updating only one entity, this response works the same way. You can check the cause of the problem that applied POST API in a script. |
400 | Entities aren't saved due to a reason provided in the error message | Correct the issues identified in the error code. For example, if you receive this error message:{ "severity": "Error", "errorMessage": "Failed to parse content as JSON", "errorCode": 150, "errorDetailMessage": "Expecting request content in JSON format, failed to parse. Reason: Code: ... } }Ensure that your uploaded file is in JSON format and that you specify Content-type correctly when you retry your POST request. |
401 | Unauthorized | Correct the issues identified in the error code. For example, if you receive this error message:{ "error": "invalid_token", "error_description": "Token is invalid: 1a2b3c45-6def-7hi8-j901-k23456789l01" }Ensure you entered your authorization token correctly, refresh the token, or obtain a new authorization token when you retry your POST request. |
403 | The operation is forbidden for the current user, please check your privileges | Correct the issues identified in the error code. For example, if you receive this error message:{ "severity": "Error", "errorMessage": "Security error. This endpoint is forbidden for current user.", "errorCode": 804, "errorDetailMessage": "Security error. This endpoint is forbidden for current user.", ... } }Ensure that any specified users have the necessary roles when you retry your POST request. |
Data returned | Type | Description |
---|---|---|
Created entities | array |
Results for each entity created by the request:
|
Examples
This request creates entities for Ivan and John based on the Individual entity type.
|
This example shows the response the API returns for the create request example above.
|