Why am I getting a "Failed to parse request" error when I try to update an entity with partial override?

Question

I am trying to update the crosswalk of an entity using the API,

POST https://361.reltio.com/reltio/api/8SBKrjpaSlyMRSd/entities?options=partialOverride

Request body

[
{
"startDate": "1586111997440",
"startObject": {
"crosswalks": [
{
"type": "configuration/sources/Vitek",
"value": "0000030032LB"
}
]
},
"type": "configuration/relationTypes/JNJLegacyParentChild",
"crosswalks": [
{
"type": "configuration/sources/Vitek",
"value": "JNJLegacyParentChild_Vitek_0000030032LB_0000114718S"
}
],
"endObject": {
"crosswalks": [
{
"type": "configuration/sources/Vitek",
"value": "0000114718S"
}
]
}
}
]

When I attempt this call, I get the following error as a response. Why?

 

"Attribute value parsing failed", "Failed to parse request content as attribute value

Answer

This API works only in the case of updating an entity.  In the example of the above payload that you passed in was incomplete.  You are only passing in the crosswalk, you have not given it anything else - not an entityID or entity identifier of any types.  This is why you are getting the mentioned error.

If you execute the following 

POST https://361.reltio.com/reltio/api/8SBKrjpaSlyMRSd/entities?options=partialOverride,preserveURIs

Request Body:

[
{
"uri": "entities/9TQrAVL",
"type": "configuration/entityTypes/HCO",
"attributes": {
"startDate": "1586111997440",
"startObject": {
"crosswalks": [
{
"type": "configuration/sources/Vitek",
"value": "0000030032LB"
}
]
},
"type": "configuration/relationTypes/JNJLegacyParentChild",
"crosswalks": [
{
"type": "configuration/sources/Vitek",
"value": "JNJLegacyParentChild_Vitek_0000030032LB_0000114718S"
}
],
"endObject": {
"crosswalks": [
{
"type": "configuration/sources/Vitek",
"value": "0000114718S"
}
]
}
}
}
]

 Please make sure that you add preserveURIs.  If you do not include this, it will create a blank entity with only a crosswalk.   If the "preserveURIs" option is present API takes into account URIs that are specified inside the request. This option can be used for both entities URI and for attributes URI.

If this option is present for an entity URI, API finds this entity and overrides it with attributes in the request.  If such an entity doesn't exist, the API will return EXPLICIT_URI_OF_NON_EXISTING_OBJECT_DEFINED(242) error.

References

https://docs.reltio.com/entitiesapi/partialoverride.html?hl=partial%2Coverride

 

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

Comments

0 comments

Please sign in to leave a comment.