Accelerate the Value of Data

Create Interactions

Use this API to create one or more interactions by specifying a JSON object in the body's array.

This API creates a collection of interactions in the Reltio Platform according to the JSON object definition.

Request

Request

POST {TenantURL}/interactions
Table 1. Create Interactions Parameters
Parameter Name Required Details
Headers Authorization Yes This parameter provides information about the authentication access token using the format, Bearer <accessToken>. For more information see Authentication API.
Source-System Yes This parameter indicates the source system that this request is representing. For example, configuration/sources/Reltio indicates that the data is not loaded from other source systems and is instead created in the Reltio Platform directly.
Content-Type Yes This parameter should be Content-Type: application/json.
Query crosswalkValue This parameter indicates the identifier of an interaction object in the source system. Use this parameter to specify the crosswalkValue when there is no crosswalk in the request body.
returnObjects This parameter specifies if the response must contain the created objects. Use this parameter to display only the object URIs in the response and not the whole object. The default value is true.
options This parameter includes or excludes the hidden attributes in the response using the sendHidden option. By default, the sendHidden option is disabled, that is, the response will not contain the hidden attributes.

If you want to view the hidden attributes, set the option parameter to sendHidden in the request query.

Body Yes This indicates a JSON array with objects representing objects to be created. Each object must have the type property but may not have the URI, crosswalks, and referencedCrosswalks properties (these properties are provided/generated by Reltio API).

Create Interactions Response

The response consists of an array with results for each element of a request. Every result has the following properties:

  • index - This is the index of an interaction object in the JSON array to be created. This is a required property in the response.
  • URI - URI of the interaction object that is created. This property is returned only if an object was created successfully.
  • error - This property is returned if an object cannot be created for some reason. It contains the details of the problem and is returned only if an object was not created.
  • warning - This property indicates that an object was created but there were some problems.
  • status - This property indicates the result of an API request. The possible values are OK and failed.

Request-Add Interaction

The following example creates an interaction type called Lunch. The interaction contains information about the lunch place or venue, lunch organizer, chef for the lunch, lunch participants, and lunch notes.

POST{
   TenantURL
}/interactions
Headers:Source-System:configuration/sources/XYZ,
Authorization:Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512,
Content-Type:application/json
Body:[
   {
      "type":"configuration/interactionTypes/Lunch",
      "timestamp":1338580800000,
      "attributes":{
         "Place":[
            {
               "value":"Shire, Bag End in Hobbiton"
            }
         ],
         "Notes":[
            {
               "value":"All participants eat Lembas"
            }
         ]
      },
      "members":{
         "Organizers":{
            "type":"configuration/interactionTypes/Meeting/memberTypes/Organizers",
            "members":[
               {
                  "objectURI":"entities/30000"
               }
            ]
         },
         "Chefs":{
            "type":"configuration/interactionTypes/Lunch/memberTypes/Chefs",
            "members":[
               {
                  "objectURI":"entities/40000"
               }
            ]
         },
         "Participants":{
            "type":"configuration/interactionTypes/Meeting/memberTypes/Participants",
            "members":[
               {
                  "objectURI":"entities/10000"
               },
               {
                  "objectURI":"entities/10001"
               },
               {
                  "objectURI":"entities/10003"
               }
            ]
         }
      }
   }
]

Add Interaction Response

POST{
   TenantURL
}/interactions
Headers:Source-System:configuration/sources/XYZ,
Authorization:Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512,
Content-Type:application/json[
   {
      "index":0,
      "URI":"interactions/01BThVh",
      "object":{
         "URI":"interactions/01BThVh",
         "type":"configuration/interactionTypes/Lunch",
         "createdBy":"User",
         "createdTime":1354626947723,
         "updatedTime":1354626947723,
         "timestamp":1338580800000,
         "attributes":{
            "Place":[
               {
                  "type":"configuration/interactionTypes/Meeting/attributes/Place",
                  "value":"Shire, Bag End in Hobbiton",
                  "URI":"interactions/01BThVh/attributes/Place/6"
               }
            ],
            "Notes":[
               {
                  "type":"configuration/interactionTypes/Meeting/attributes/Notes",
                  "value":"All participants eat Lembas",
                  "URI":"interactions/01BThVh/attributes/Notes/7"
               }
            ]
         },
         "crosswalks":[
            {
               "URI":"interactions/01BThVh/crosswalks/8",
               "type":"configuration/sources/MDM",
               "value":"",
               "attributes":[
                  "interactions/01BThVh/attributes/Notes/7",
                  "interactions/01BThVh/attributes/Place/6"
               ]
            }
         ],
         "members":{
            "Organizers":{
               "URI":"interactions/01BThVh/members/Organizers",
               "type":"configuration/interactionTypes/Meeting/memberTypes/Organizers",
               "members":[
                  {
                     "objectURI":"entities/30000",
                     "type":"configuration/entityTypes/Individual",
                     "label":"John Smith"
                  }
               ]
            },
            "Chefs":{
               "URI":"interactions/01BThVh/members/Chefs",
               "type":"configuration/interactionTypes/Lunch/memberTypes/Chefs",
               "members":[
                  {
                     "objectURI":"entities/40000",
                     "type":"configuration/entityTypes/Individual",
                     "label":"Ann Roman"
                  }
               ]
            },
            "Participants":{
               "URI":"interactions/01BThVh/members/Participants",
               "type":"configuration/interactionTypes/Meeting/memberTypes/Participants",
               "members":[
                  {
                     "objectURI":"entities/10000",
                     "type":"configuration/entityTypes/Individual",
                     "label":"San Dunn"
                  },
                  {
                     "objectURI":"entities/10001",
                     "type":"configuration/entityTypes/Individual",
                     "label":"Josh May"
                  },
                  {
                     "objectURI":"entities/10003",
                     "type":"configuration/entityTypes/Individual",
                     "label":"Marc Jack"
                  }
               ]
            }
         }
      },
      "status":"OK"
   }
]