Good day
Is there a way to retrieve a list all the defined properties and aspects from the Alfresco repository?
Appreciate the help in advance.
Regards
Stephan
Solved! Go to Solution.
Try this REST API if suits your requirements:
GET /alfresco/service/api/dictionary
http://127.0.0.1:8080/alfresco/service/api/dictionary
GET /alfresco/s/api/defclasses
http://127.0.0.1:8080/alfresco/s/api/defclasses
GET /alfresco/service/api/classes/{className}
http://127.0.0.1:8080/alfresco/service/api/classes/cm_content (type) http://127.0.0.1:8080/alfresco/service/api/classes/cm_auditable (aspect)
For a specific node:
Example:
http://127.0.0.1:8080/alfresco/service/api/properties?nodeRef=workspace://SpacesStore/1c76d9a6-8d01-...
Visit this doc for more details: https://docs.alfresco.com/5.0/references/RESTful-Dictionary.html
Hi @OomStephan,
To retrieve aspects, take a look at this API documentation - although this method will depend on how old your Alfresco instance is. For Alfresco 5,2+ the API call will be something like the following:
'http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children?include=aspectNames&skipCount=0&maxItems=100'
For the properties, something like this:
http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children?include=aspectNames,properties&skipCount=0&maxItems=100'
HTH,
Hi Eddie
Thanks for the reply, I am aware of the documentation you linked. However, does this not retrieve the aspects/properties for the specific node?
My use case is that I would like to retrieve all available defined aspects/properties and display them to my user, so that the user can decide what properties he would like to add.
Thanks in advance.
Regards
Stephan
Just to add to the above, is there an endpoint that does not require a nodeId as parameter and instead returns all available aspects and/or properties that can be applied to a node, both system and custom aspects?
Stephan
Hi @OomStephan,
I presume you've looked at NodeService? There is a discussion here about using it.
HTH,
Try this REST API if suits your requirements:
GET /alfresco/service/api/dictionary
http://127.0.0.1:8080/alfresco/service/api/dictionary
GET /alfresco/s/api/defclasses
http://127.0.0.1:8080/alfresco/s/api/defclasses
GET /alfresco/service/api/classes/{className}
http://127.0.0.1:8080/alfresco/service/api/classes/cm_content (type) http://127.0.0.1:8080/alfresco/service/api/classes/cm_auditable (aspect)
For a specific node:
Example:
http://127.0.0.1:8080/alfresco/service/api/properties?nodeRef=workspace://SpacesStore/1c76d9a6-8d01-...
Visit this doc for more details: https://docs.alfresco.com/5.0/references/RESTful-Dictionary.html
Exactly what I am looking for. Thank you very much!
Stephan
Hi @OomStephan,
Glad that @abhinavmishra14 was able to help you out & thanks for accepting his solution - really helpful to other users too.
Best wishes,
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.