cancel
Showing results for 
Search instead for 
Did you mean: 

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

YOUNES_Ouchtoub
Champ in-the-making
Champ in-the-making

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

4 REPLIES 4

pibou_Bouvret
Elite Collaborator
Elite Collaborator

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

YOUNES_Ouchtoub
Champ in-the-making
Champ in-the-making

not really i want to get this one (uid

Thomas_Roger
Star Contributor
Star Contributor

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

Thank you, so for everybody who faces the same problems with metadata, i added this header in my curl request (-H "X-NXDocumentProperties