Add INSERT Attribute Request
You can add attribute values to a collection of specific attributes.
While adding attribute values to a collection, the attribute name is defined in the request URL. When you add INSERT Attribute Request, it creates a change item inside data change request for the insertion of a new attribute. It should be used in the same way as the request for creating attributes. For more information, see topic Create Attribute. The only difference is the changeRequestId
parameter-it indicates that these changes must not be done in the real object; instead, they must be added to the given data change request for future review.
Request
POST <TenantURL>/{objectURI}/attributes/{attributeName}
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 topic Authentication API. |
Source-System
| No | The parameter indicates the source system this request is representing. Example: "configuration/sources/Reltio" when data is not loaded from other source systems and is created in Reltio Platform directly. | |
Content-Type
| Yes | The paramter should be "Content-Type: application/json" . | |
Query | changeRequestId
| No | The parameter is the ID of the data change request to which a new change item should be added. |
crosswalkValue
| Yes-if Source-System is not 'Reltio' | The parameter indicates the identifier of the entity object providing this attribute in the source system. Example: an entity comes from Facebook and its identifier in Facebook is 'id3562'. For this entity, | |
crosswalkSourceTable
| No | ||
Body | Yes | This indicates the JSON Array with objects representing attribute values to be used for creating and updating the data change request. |
changeRequestId
parameter is not required if you have the READ
privilege for the object and attribute and have the INITIATE_CHANGE_REQUEST
privilege for the attribute. But, you must not have the CREATE
privilege for the attribute. In such cases, a new data change request will be created automatically.Example:
POST /entities/12/attributes/Name?crosswalkValue=XYZ.id1
Headers:Source-System:configuration/sources/XYZ,
Authorization:Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512,
Content-Type:application/json
Body:[
{
"value":"William"
},
{
"value":"Bill"
}
]
Response
{
"URI": "changeRequests/0000OVV",
"createdBy": "User",
"createdTime": 1445452647170,
"updatedBy": "User",
"updatedTime": 1445452647170,
"changes": {
"entities/00005KL": [{
"id": "0000jon",
"type": "INSERT_ATTRIBUTE",
"createdTime": 1445452647560,
"createdBy": "User",
"attributePath": "ProductMetrics/3/ExternalID",
"newValue": {
"value": "NewId"
},
"crosswalk": {
"type": "configuration/sources/Veeva",
"value": "e1"
}
}]
},
"state": "APPLIED"
}