cancel
Showing results for 
Search instead for 
Did you mean: 

Webadapter based REST api response filtering

jyr_
Champ in-the-making
Champ in-the-making

I want the immediate children of a path and I also want to filter based on dc:language attribute. I tried the following: http://localhost/nuxeo/site/api/v1/path/default-domain/sections/section1/@children?query=Select * from Document where dc:language = 'English'

This did not work since the @children does not take a query parameter. I also tried @search with the "ecm:path startswith default-domain/sections/section1 and dc:language='English'" but then this gives me the entire folder tree underneath section1

Is there a way to get just the first level of content along with a way to filter based on one or more attributes.

1 REPLY 1

Florent_Guillau
World-Class Innovator
World-Class Innovator

The @search is a good idea but as you saw ecm:path STARTSWITH '/default-domain/sections/section1' will give you too many levels. You would like something like ecm:parentPath = '/default-domain/sections/section1' but this doesn't exist. Please open a ticket with the Report A Bug button at the right if you feel this is a worthwhile addition.

At the moment I think you need two requests, one to get the id of the /default-domain/sections/section1 document, then use a @search with ecm:parentId = 'the-id-for-section1' and the rest of your filter.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.