How to make a query (filter) on vocaburay entries

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

0 votes

2 answers

82 views

ANSWER



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":{}}'

0 votes



0 votes