I'm trying to use the REST API to update possibly multiple properties of a document at the same time using the POST method to the endpoint
/objects/0/10741/latest/properties
According to the documentation and the Github Postman sample collection, the request format should be
[
{
"PropertyDef": {{PropertyDefID}},
"TypedValue": {
"DataType": {{DataType}},
"Value": "KeywordTest"
}
}
]
But when I try sending this to the properties endpoint, I get an error:
Request:
POST /objects/0/10741/latest/properties
[
{
"PropertyDef": 1034,
"TypedValue": {
"DataType": 5,
"Value": "2024-06-18T00:00:00Z"
}
]
Response:
{
"Status": 400,
"URL": "/objects/0/10741/latest/properties",
"Method": "POST",
"Exception": {
"Name": "ArgumentException",
"Message": "Malformed data.",
"InnerException": {
"Name": "JsonReaderException",
"Message": "JsonToken EndArray is not valid for closing JsonType Object. Path '[0]', line 8, position 1.",
"StackText": "Error reference ID: adfc2ada-f967-4476-aded-74e2b82afb43"
}
},
"Stack": "Error reference ID: adfc2ada-f967-4476-aded-74e2b82afb43",
"Message": "Malformed data.",
"IsLoggedToVault": true,
"IsLoggedToApplication": true,
"ExceptionName": "ArgumentException"
}
How should the request for update properties with POST be formatted for it to work?