I can see the custom properties in Node API response, but I want to add a custom attribute to my property (which stores username as value), with user displayName and userName, like we can see for field "cm:lockOwner" as in the screenshot below:
Could anyone please suggest a way to do this?
Thanks already!
Can you post which api is this?
Hi Sanjay,
The API is - /alfresco/api/-default-/public/alfresco/versions/1/nodes/{nodeId}/children
I see this reponse when a locked document node is loaded in the documentlist, and have posted this as just an example of how I would want my custom property to be added in the response.
First thing you can do is override existing api.
Second way is you can create your own webscript and return required properties only.You can create custom api 2 ways.
1)Using webscript(https://docs.alfresco.com/5.2/references/dev-extension-points-webscripts.html)
2)Same as API-Explorer providing(https://github.com/covolution/quick-api)
I would suggest to create custom webscript and use that because you have control over that webscipt for modify.
if you override existing webscript then it may impact where it is already used.
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.