In a JSON response are the records ordered in the list according to the list index?

Question

In a JSON response, are the order of the records ordered in the list according to the list index.

Answer

The records in the JSON response (after creating entities) are ordered in the list according to the list index.  The`"index": 0,`  will be the first list member, followed by `"index": 1` and so on.

POST {TenantURL}/entities

Request:

[
{
"type":"configuration/entityTypes/Individual",
"tags":[
"sport",
"movies"
]
},
{
"roles":[
"configuration/roles/Client",
"configuration/roles/Prospect"
],
"attributes":{
"FirstName":[
{
"value":"Ivan"
},
{
"type":"configuration/entityTypes/Organization"
}
]

Response:

[
{
"index": 0,
"uri": "entities/10",
"object": {
"uri": "entities/10",
"type": "configuration/entityTypes/Individual",
"tags": [
"sport",
"movies"
]
},
"status": "OK"
},
{
"index": 2,
"uri": "entities/11",
"object": {
"uri": "entities/11",
"type": "configuration/entityTypes/Organization"
},
"warning": {
"code": 20001,
"message": "Created entity has no attributes"
},
"status": "OK"
}
]

References

https://docs.reltio.com/entitiesapi/createentities.html

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.