Accelerate the Value of Data

Create Entities and Relations

This operation creates a collection of entities and relations in the Reltio Platform according to JSON object definition.

Request

POST {TenantURL}/objects
Table 1. Parameters
Parameter Name Required Description
Headers AuthorizationYes Information about authentication access token in format "Bearer <accessToken>" (see details in Configuration API ).
Content-TypeYes Should be "Content-Type: application/json".
Query returnObjectsNo Specifies if the response should contain created entities or relations. Default is true.
maxObjectsToUpdateNo
Note: The maxObjectsToUpdate parameter will be deprecated. Therefore, we recommend you do not use this parameter and instead, use the Immutable Reference Attributes feature.

Maximum number of events for related objects which could be produced by one request to create/update entities or relations.

The Reltio platform has asynchronous storages that are populated through events, such as, if a new entity was created it should appear in the search.

In some data topologies, changing one entity can cause changing numerous entities. For example, if there are many organization entities stored in the platform, and they have same address, changing attributes of this address should produce events indicating that all organizations were changed. In some cases, it is ineffective, because during data loads, the system can generate many events about the same objects, which would cause many updates of the same objects in search indices.

In these types of topologies, it is recommended that you limit number of events each change could cause, and perform a one-time reindexing of the data set after a load.

Body Yes JSON Array with objects representing entity or relations objects to be created. Each object must have the type property but will not have "uri" properties (they are provided/generated by the Reltio API).

Response

Array with results for each element of a request. Each result has the following properties:

  • index: index of an entity object in JSON Array of entities to be created and is required in a response.
  • uri: URI of entity or relation object that is created. Returned only if an object was created successfully.
  • object: entity or relation object that is created. This parameter is returned if the returnObjects query parameter in the request is not false and the object was created successfully. It returns a complete entity object (the same as returned by the Get Entity request without any select parameters.
    Note: By default, hidden attributes are not returned in a response. Use the options=sendHidden parameter in the request to change this behavior.
  • successful: indicates if the request is successful. Returns true for success; otherwise, returns false.
  • errors: for some reason, the object cannot be created. Contains details of the issue. Returned only if the object is not created.
    • Possible errors:
      • warning: if the object is created but there were some problems.
      • status: result of operation; possible values are "OK" or "failed".

Request

POST {TenantURL}/objects
Headers: Source-System: configuration/sources/XYZ, Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512, Content-Type: application/jso
Body:
[
  {
    "type": "configuration/relationTypes/Employment",
    "startObject": {
      "objectURI": "entities/e1"
    },
    "endObject": {
      "objectURI": "entities/e2"
    },
    "attributes": {
      "Title": [
        {
          "value": "CEO"
        }
      ]
    }
  },
  {
    "type": "configuration/entityTypes/Individual",
    "attributes": {
      "LastName": [
        {
          "type": "configuration/entityTypes/Individual/attributes/LastName",
          "value": "Smith"
        }
      ]
    },
    "crosswalks": [
      {
        "type": "configuration/sources/TWITTER",
        "value": "@john",
        "url": "www.twitter.com"
      },
      {
        "type": "configuration/sources/MDM",
        "value": "Person.781",
        "url": "www.MDM.com"
      },
      {
        "type": "configuration/sources/Facebook",
        "value": "123456",
        "url": "www.facebook.com",
        "dataProvider": false
      }
    ]
  }
]

Response

[
  {
    "index": 0,
    "uri": "relations/r0",
    "object": {
      "uri": "relations/r1",
      "type": "configuration/relationTypes/Employment",
      "startObject": {
        "uri": "relations/r1/startObject",
        "objectURI": "entities/e1",
        "type": "configuration/entityTypes/Individual",
        "label": "John Smith",
        "directionalLabel": "employee"
      },
      "endObject": {
        "uri": "relations/r1/endObject",
        "objectURI": "entities/e2",
        "type": "configuration/entityTypes/Organization",
        "label": "Super Company",
        "directionalLabel": "employer"
      },
      "attributes": {
        "uri": "relations/r1/attributes",
        "Title": [
          {
            "uri": "relations/r1/attributes/Title/1",
            "type": "configuration/relationTypes/Employment/attributes/Title",
            "value": "CEO"
          }
        ]
      },
      "crosswalks": [
        {
          "uri": "relations/r1/crosswalks/1",
          "type": "configuration/sources/MDM",
          "value": "Employemnt.1000",
          "attributes": [
            "relations/r1/attributes/Title/1"
          ]
        }
      ],
      "createdTime": 1351899105569,
      "createdBy": "admin",
      "updatedTime": 1353933493738,
      "updatedBy": "admin"
    },
    "status": "OK"
  },
  {
    "index": 1,
    "object": {
      "uri": "entities/00005KL",
      "type": "configuration/entityTypes/Individual",
      "createdBy": "User",
      "createdTime": 1358768317681,
      "updatedTime": 1358768317681,
      "attributes": {
        "LastName": [
          {
            "type": "configuration/entityTypes/Individual/attributes/LastName",
            "value": "Smith",
            "uri": "entities/00005KL/attributes/LastName/0"
          }
        ]
      },
      "crosswalks": [
        {
          "uri": "entities/00005KL/crosswalks/1",
          "type": "configuration/sources/TWITTER",
          "value": "@john",
          "attributes": [
            "entities/00005KL/attributes/LastName/0"
          ]
        },
        {
          "uri": "entities/00005KL/crosswalks/2",
          "type": "configuration/sources/MDM",
          "value": "Person.781",
          "attributes": [
            "entities/00005KL/attributes/LastName/0"
          ]
        },
        {
          "uri": "entities/00005KL/crosswalks/2",
          "type": "configuration/sources/Facebook",
          "value": "123456"
        }
      ]
    },
    "successful": true
  }
]