Create Attribute
Adds attribute values to a specific attribute collection.
This operation adds attribute values to a specific attribute collection (attribute name
is defined in request URL). Attribute name is obtained from Attributes
Configuration from the "name"
property. With this operation, you can
create SSN, or multiple Emails, Names, and Addresses.
201 OK
(and an error description) is
expected to be returned.Request
POST /{object URI}/attributes/{attribute name}
Parameter | Required | Details | |
---|---|---|---|
Headers |
Authorization |
Yes |
Information about authentication access token in format Bearer
|
Source-System |
Yes |
Source system that this request is representing. Example: |
|
Content-Type |
Yes | Should be Content-Type:application/json . |
|
Query |
|
Yes-if |
ID of an entity object providing this attribute in the source system. Example: an entity comes from Facebook and its identifier in Facebook
is |
crosswalkSourceTable |
No | SourceTable of an entity object providing this
attribute in the source system. |
|
returnObjects
|
Yes |
Specifies if response should contain created entities. Note: Default value is
true . |
|
Body |
|
JSON Array with objects representing attribute values to create. |
Response
Array with results for each element of a request. Each result has the following properties:
index
: index of an attribute value in JSON Array from response. Required in a response.URI
: URI of created attribute value. Returned only if an object was created successfully.object
: attribute value that is created. This parameter is returned if thereturnObjects
query parameter in the request is not false and object was created successfully.-
error
: if an object cannot be created for some reason. Contains details of the problem. Returns only if an object was not created.- Possible Errors:
- warning: if object is created but there were some problems.
- status: result of operation, and possible values are
"OK"
or"failed"
.
1: Simple Attributes (same for Enum, Lookup)
Request
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
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:[
{
"index":0,
"URI":"entities/12/attributes/Name/1",
"object":{
"URI":"entities/12/attributes/Name/1",
"type":"configuration/entityTypes/Individual/attributes/Name",
"value":"William"
},
"status":"OK"
},
{
"index":1,
"URI":"entities/12/attributes/Name/2",
"object":{
"URI":"entities/12/attributes/Name/2",
"type":"configuration/entityTypes/Individual/attributes/Name",
"value":"Bill"
},
"status":"OK"
}
]
2 Nested Attributes
Request
POST
/entities/12/attributes/Education?crosswalkValue=XYZ.id1
Headers:Source-System:configuration/sources/XYZ,
Authorization:Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512,
Content-Type:application/json
Body:[
{
"value":{
"University":[
{
"value":"UCSF"
},
{
"value":"University of California, San Francisco"
}
],
"Graduated":[
{
"value":true
}
]
}
}
]
Response
POST /entities/12/attributes/Education?crosswalkValue=XYZ.id1
Headers:
Source-System: configuration/sources/XYZ,
Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512,
Content-Type: application/json
Body:
[
{
"index": 0,
"uri": "entities/12/attributes/Education/5",
"object": {
"uri": "entities/12/attributes/Education/5",
"type":"configuration/entityTypes/Individual/attributes/Education",
"value":{
"University":[
{
"uri": "entities/e1/attributes/Education/5/University/6",
"type": "configuration/entityTypes/Individual/attributes/Education/University",
"value":"UCSF"
},
{
"uri": "entities/e1/attributes/Education/5/University/7",
"type": "configuration/entityTypes/Individual/attributes/Education/University",
"value":"University of California, San Francisco"
}
],
"Graduated": [
{
"uri": "entities/e1/attributes/Education/5/Graduated/8",
"type": "configuration/entityTypes/Individual/attributes/Education/Graduated",
"value": true
}
]
},
"status": "OK"
}
}
]
3: Reference Attributes
Request
POST /entities/000AKOn/attributes/Employment
Headers:Authorization:Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512,
Content-Type:application/json
Body:[
{
"value":{
"Title":[
{
"value":"Director"
}
]
},
"refEntity":{
"crosswalks":[
{
"type":"configuration/sources/MDM",
"value":"MDM.1"
}
]
},
"refRelation":{
"crosswalks":[
{
"type":"configuration/sources/Reltio"
}
]
}
}
]
Response
POST /entities/000AKOn/attributes/Employment
Headers:Authorization:Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512,
Content-Type:application/json
Body:[
{
"index":0,
"object":{
"label":"",
"relationshipLabel":"Director",
"value":{
"Title":[
{
"type":"configuration/relationTypes/Employment/attributes/Title",
"value":"Director",
"URI":"entities/000AKOn/attributes/Employment/017mXNR/Title/rh"
}
]
},
"URI":"entities/000AKOn/attributes/Employment/017mXNR",
"refEntity":{
"objectURI":"relations/017mXNR"
},
"refRelation":{
"crosswalks":[
{
"type":"configuration/sources/Reltio",
"value":"017mXNR",
"attributeURIs":[
"entities/000AKOn/attributes/Employment/017mXNR/Title/rh"
]
}
],
"objectURI":"relations/017mXNR"
}
},
"successful":true
}
]