Nuxeo Server

How to Fetch a Document by Its ID or Path

Updated: September 22, 2017 Page Information Edit on GitHub

You can use the operation Document.Fetch when you want to fetch a given document by its ID, or by its path. Actually you won't probably have to use it frequently: most of the time you'll be working on the current document, or one of its children, or its parent, or on the result of a query.

Anyway, if you want to access a document by its path or its ID, just drop this Fetch > Document operation in the operation chain editor, and either put:

  • A path, like /default-domain/workspaces/my-workspace

    You will find the path of a document in its URL: It is the part of URL that starts with /default-domain/... (if you are in the default domain) and that finishes with the name of the document (most often its title without accents, space, ... and sometimes with some additional numbers).

  • A computed path using a scripted instruction like expr:/default-domain/[email protected]{Document.path.substring("/default-domain/workspaces".length -1)}

    This expression will give the path of a published document in the sections considering it has been published in the same place as in the workspaces.

  • An ID like 76c69a54-0230-457a-b42c-e819d5ace862

    You can get the ID of a document by clicking on the permanent link beside the title of a document in Nuxeo Platform.


3 days ago manonlumeau NXDOC-1323: Update BDE doc
2 years ago Manon Lumeau 15
3 years ago Solen Guitter 14
3 years ago Solen Guitter 13
3 years ago Solen Guitter 12
3 years ago Solen Guitter 11 | Formatting and link update
3 years ago Manon Lumeau 10
3 years ago Manon Lumeau 9
3 years ago Manon Lumeau 8
3 years ago Manon Lumeau 7
4 years ago Solen Guitter 6
7 years ago Stéfane Fermigier 4
7 years ago Stéfane Fermigier 5 | Migrated to Confluence 4.0
7 years ago Alain Escaffre 3
7 years ago Alain Escaffre 2
7 years ago Alain Escaffre 1
History: Created by Alain Escaffre