get the uid of document from REST API instead of the hashed id

Hi when i get a secific document using REST API , i'm getting the following informations in the json: . . . {“entity-type”:“document”, “repository”:“default”, “uid”:“dde893c1-ed1d-493e-8c11-51fe4b3aaf13”, “path”:“/default-domain/workspaces/XXX/YYY/ZZZZZZZZZZ” . . .

how can I get the right uid instead of the hashed one i'm getting

Thank you

(im using http://mynuxeo:8080/nuxeo/api/v1/query?query= for my queries

0 votes

1 answers

1761 views

ANSWER

You re getting the right uid, there is no hashed one
12/12/2018

not really i want to get this one (uid:uid) exemple for a query of to get the same doc above im putting (SELECT * FROM Document WHERE uid:uid =20799) and in the json i have (“uid”:“dde893c1-ed1d-493e-8c11-51fe4b3aaf13”)

before puting queries as param of my url i'm testing them in nxql search

any ideas?

12/12/2018



You can access it in the properties object:

propeties["uid:uid"]

You probably need to ask for the uid schema when doing your query to get back it in the JSON response:

http://mynuxeo:8080/nuxeo/api/v1/query?query=XXXX&properties=uid
0 votes



Thank you, so for everybody who faces the same problems with metadata, i added this header in my curl request (-H "X-NXDocumentProperties: *" ) in order to use properties
12/13/2018