I'm running into an issue with the REST API where it appears it can view, but not update residual properties. I have a residual property app:counterValue on a node in my repository:
{ "entry": { "aspectNames": [ "cm:auditable" ], "modifiedAt": "2021-09-21T19:36:17.340+0000", "modifiedByUser": { "id": "System", "displayName": "System" }, "name": "NOTE_COUNTER", "id": "8f8f37d8-2566-45bf-acc8-a5ee471dff17", "nodeType": "cm:content", "properties": { "app:counterValue": 100016 }, "parentId": "f5280d70-6ed7-49f0-927c-63ed702bb21c" } }
If I try to update the property using the REST API I get an "Unknown property: app:counterValue". I tried without the prefix and get the same thing. Is there any way around this other than using a custom webscript?
This is my update request:
PUT 'http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/8f8f37d8-2566-45bf-acc8-a5ee471dff17?include=properties&fields=id,name' { "properties": { "app:counterValue": 100017 } }
You may try using the legacy REST API.
To update a residual property, use a call similar to the following one.
curl --location --request POST 'http://127.0.0.1:8080/alfresco/s/api/metadata/node/workspace/SpacesStore/cbcb93fd-5c24-4468-9433-c0f68e1a19c5' \ --header 'Authorization: Basic YWRtaW46YWRtaW4=' \ --header 'Content-Type: application/json' \ --data-raw '{ "properties" : { "app:counterValue": "2" } }'
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.