cancel
Showing results for 
Search instead for 
Did you mean: 

getting file name, size, etc (5.8)

philippe_chantr
Champ in-the-making
Champ in-the-making

Hi,

With Nuxeo 5.8, the GET request nuxeo_url/nuxeo/api/v1/id/document_id only gives the following metadata:

{
   "entity-type" : "documents",
   "entries" : [
      {
         "uid" : "673dd1d6-0b75-4a5a-8454-8abcb0e79c0e",
         "contextParameters" : {},
         "type" : "File",
         "versionLabel" : "0.0",
         "state" : "project",
         "entity-type" : "document",
         "repository" : "default",
         "title" : "MyDoc",
         "lastModified" : "2016-05-12T14:06:35.91Z",
         "path" : "/default-domain/sections/MyDoc",
         "changeToken" : "1463061995910",
         "facets" : [
            "Downloadable",
            "Commentable",
            "Versionable",
            "Publishable",
            "HasRelatedText",
            "Thumbnail"
         ],
         "isCheckedOut" : true
      }
   ]
}

Nothing about the main file... In more recent versions of Nuxeo, they are much more informations (such as properties.file:content.name, etc.), but I don't want to upgrade the server now.

So, how to get the file name, size, md5, etc of the main file attached to a document with webservices in Nuxeo 5.8 ?

Thank you,

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

Which headers do you send in addition to the GET request? You should send a X-NXDocumentProperties or X-NXproperties header, see the documentation. The default behavior may have changed in different Nuxeo versions, I'm not sure.

View answer in original post

2 REPLIES 2

Florent_Guillau
World-Class Innovator
World-Class Innovator

Which headers do you send in addition to the GET request? You should send a X-NXDocumentProperties or X-NXproperties header, see the documentation. The default behavior may have changed in different Nuxeo versions, I'm not sure.

philippe_chantr
Champ in-the-making
Champ in-the-making

You are right ! The header "X-NXDocumentProperties: *" works perfectly. Thank you very much.

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.