As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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.
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.
@search
ecm:path STARTSWITH '/default-domain/sections/section1'
ecm:parentPath = '/default-domain/sections/section1'
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.
/default-domain/sections/section1
ecm:parentId = 'the-id-for-section1'