02-02-2018 07:02 AM
Hello Alfresco Community,
I'm using alfresco-client-sdk (developed by Jean Marie Pascal and Gavin Cornwell). I'm wondering how to update node's secondaryChildren.
NodesAPI's createNodeCall method accepts a NodeBodyCreate object. NodeBodyCreate object could be instantiated with a List of ChildAssociationBody as secondaryChildren parameter.
However, NodeBodyUpdate object in updateNodeCall method doesn't have a secondaryChildren field.
One approach I considered is to update secondary children with additions (createSecondaryChildAssocationCall) and deletions (deleteSecondaryChildAssocationCall) resulting in an overhead due to several REST calls.
Regards,
Atef ZAYATI
02-05-2018 12:07 AM
Axel Faust is correct, unfortunately we don't provide that functionality via the REST API yet.
Although a "batching" capability would be one way to address this updates of this manner would be better handled by a PATCH method which is something else on the backlog but without an ETA I'm afraid.
In the meantime your only option is the one you've suggested.
02-03-2018 05:22 AM
Ah, the typical consistency problems when a new ReST API is being developed. I would advice you to look for or create a new JIRA ticket to address the lack of secondary child association handling in the node update request body. At the moment, the createSecondaryChildAssociationCall you already mentioned would be the only way to go until the API is expanded. Richard Esplin has on multiple occasions mentioned to me that there would be some kind of "batching" feature in the future of the ReST API, but I neither know if that would allow to execute two operations in one HTTP call nor what the status is on that...
10-09-2019 05:51 AM
Create and delete associations is not solution if you association mandatory and not many
Are there some solutions in this case?
02-05-2018 12:07 AM
Axel Faust is correct, unfortunately we don't provide that functionality via the REST API yet.
Although a "batching" capability would be one way to address this updates of this manner would be better handled by a PATCH method which is something else on the backlog but without an ETA I'm afraid.
In the meantime your only option is the one you've suggested.
Explore our Alfresco products with the links below. Use labels to filter content by product module.