cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a query (filter) on vocaburay entries

pnux_
Confirmed Champ
Confirmed Champ

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

2 REPLIES 2

pibou_Bouvret
Elite Collaborator
Elite Collaborator

pnux_
Confirmed Champ
Confirmed Champ

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

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.