03-15-2019 12:00 PM
Hello,
I use nuxeo LTS 2019.
From a PHP app, i want to list vocabulary entries (for example 'country') using the REST API
curl -X GET 'https://demo.nuxeo.com/nuxeo/api/v1/directory/country?' -H 'X-Authentication-Token: 29f5cece-f25d-425c-a6f1-a528a776fe59' -H 'Nuxeo-Transaction-Timeout: 3' -H 'X-NXproperties: *' -H 'X-NXRepository: default' -H 'content-type: application/json'
But how can i add a filter to avoid obsolete entries ? ( obsolete = 1). The only option seems to filter the response, before display the result.
Thank you
03-15-2019 12:04 PM
Have a look at Directory.Projection
http://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20DM-8.2/viewOperation/Directory.Projection
03-15-2019 01:34 PM
Thank you for your answer (and operation seems to be the right way !) but i think to use Directory.SuggestEntries with a filter.
For example :
curl -X POST 'https://demo.nuxeo.com/nuxeo/site/automation/Directory.SuggestEntries' -H 'X-Authentication-Token: 29f5cece-f25d-425c-a6f1-a528a776fe59' -H 'Nuxeo-Transaction-Timeout: 3' -H 'X-NXproperties: *' -H 'X-NXRepository: default' -H 'X-NXVoidOperation: false' -d '{"params":{"directoryName":"country","filters":"obsolete=0"},"context":{}}'
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.