cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API, How to getChildren and orderBy a properties

danny36
Champ on-the-rise
Champ on-the-rise

Hello,

I need if possibile to order a list of nodes returned from getChildren api call by one of a properties.

In the rest api doc it is not mentioned.

thanks.

1 ACCEPTED ANSWER

This is working for me:

http://127.0.0.1:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/8bb36efb-c26d-4d2b-9199-ab6922f53c28/children?skipCount=0&maxItems=100&orderBy=cm%3Atitle

I guess you can use the same approach with your custom property name wbase%3AcognomeRubrica

Hyland Developer Evangelist

View answer in original post

9 REPLIES 9

angelborroy
Community Manager Community Manager
Community Manager

Did you try the "orderBy" parameter?

https://api-explorer.alfresco.com/api-explorer/#/nodes/listNodeChildren

Hyland Developer Evangelist

in the doc the available orderBy fields are:

  • isFolder
  • name
  • mimeType
  • nodeType
  • sizeInBytes
  • modifiedAt
  • createdAt
  • modifiedByUser
  • createdByUser

but I need to order by a property inside "properties"

image

This is working for me:

http://127.0.0.1:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/8bb36efb-c26d-4d2b-9199-ab6922f53c28/children?skipCount=0&maxItems=100&orderBy=cm%3Atitle

I guess you can use the same approach with your custom property name wbase%3AcognomeRubrica

Hyland Developer Evangelist

yes it works!

I think it is a serious shortcoming that such an important thing is not indicated in the documentation.

Anyway thanks!!!

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.