REST API

Updated: November 10, 2016

 

Extract from the course "Working with the REST API" on Nuxeo University

Nuxeo REST API is available on Nuxeo Platform server an all endpoints follows the URL: http://servername:8080/nuxeo/api/v1/*. We made available an API playground to help you understand the endpoints and have a try:

This page explains the high level organisation and scope of the existing endpoints and the various additional mechanisms that are offered to extend the behaviour of the API.

Scope and Concepts

Nuxeo provides a complete API accessible via HTTP/HTTPS. This API is the best way to integrate portals, workflow engines, ESBs, custom application written in JavaScript, Ruby, etc. remotely with the Nuxeo Platform repository. This API has the following endpoints.

Resources Endpoints

For doing CRUD on resources in a 100% REST style. Multiple resources are exposed:

  • Documents: CRUD on documents (including paginated search). /nuxeo/api/v1/id/{docId} or /nuxeo/api/v1/path/{path} See the page Document Resources Endpoints.
  • Users: CRUD on users /nuxeo/api/v1/user/{userId}
  • Groups: CRUD on groups of users /nuxeo/api/v1/group/{groupId}
  • Directories: CRUD on directories /nuxeo/api/v1/directory/{directoryId}
  • Document Types, Schemas and Facets definitions: This is useful when doing remote introspection of the repository structure, for form automated generation, etc. /nuxeo/api/v1/config/types|schemas|facets/{type|schema|facet} More Information about this endpoint.
  • Searches: Since 8.3, you can perform searches by query or page provider, store these searches and reproduce them later. /nuxeo/site/api/v1/search/lang or /nuxeo/site/api/v1/search/pp or /nuxeo/site/api/v1/search/saved Check the Search Endpoint page for more information.

  • Queries: You can search by query, or by referencing a page provider contributed server-side. <span class="java plain">nuxeo/site/api/v1/query?query={query}</span> or <span class="java plain">/nuxeo/site/api/v1/query/{page_provider_name}?queryParams={params_values}</span> See the page Query Endpoint. (deprecated since 8.3 and replaced by the Search endpoint)

  • Workflow: Since 7.2, new workflow endpoints are available.

  • Upload batch: An upload endpoint is available. It allows you to upload a set of files before using them in a transactional operation. /nuxeo/api/v1/upload/{batchId}

Command Endpoint

A commands endpoint, /nuxeo/api/v1/automation/{Operation id} enables to call a "command", i.e. an operation or chain of operations deployed on the server. This is the main way of exposing the platform services remotely. It exposes all the operations of the Automation module offering more than 100 commands for processing remotely the resources. The framework makes it very easy to add a new Java custom operation for completing the API if you miss a web-service, and to chain operations server-side using Nuxeo Studio, so as to expose a coarse-grained API that fits your business logic, without any development.

Additional Features

The Nuxeo REST API offers several nice additional features compared to a standard REST API:

  • Possibility to pipe a command call on a resource
  • Content enrichers that allow to ask for more information when receiving the resources via some request headers, in order to lower the number of requests you have to do (Ex: Receiving all the children of a document at the same time you receive a document, or receiving all the parents, or all the tasks, ...);
  • Web Adapters that can "transform" the resources that are returned, for example, getting the tasks of a document, or its related documents.

Quick Examples

Available Client SDKs 

We provide several client SDKs for making it even easier to use the API integrate with the Nuxeo Platform.

a day ago Andrew Goodricke Add content-review-lts2016 to labels
23 days ago Kevin Leturc NXP-19481: Update MarkLogic page to detail how to configure range element indexes
3 months ago Solen Guitter 101
3 months ago Gabriel Barata 100
7 months ago Bertrand Chauvin 99
10 months ago Solen Guitter 98 | REST contributors are called Content enrichers
10 months ago Solen Guitter 97
a year ago Alain Escaffre 96
a year ago Bertrand Chauvin 95
a year ago Bertrand Chauvin 94
a year ago Bertrand Chauvin 93 | video link
a year ago Bertrand Chauvin 92 | localhost -> servername
a year ago Bertrand Chauvin 91
a year ago Antoine Taillefer 90
a year ago Solen Guitter 89
2 years ago Solen Guitter 88
2 years ago Solen Guitter 87 | format
2 years ago Solen Guitter 86
2 years ago Guillaume Renard 85
2 years ago Joshua Fletcher 84
2 years ago Solen Guitter 82 | Fix link to blog post
2 years ago Solen Guitter 83
2 years ago Solen Guitter 80
2 years ago Solen Guitter 81
2 years ago Alain Escaffre 79
2 years ago Alain Escaffre 78
2 years ago Alain Escaffre 77
2 years ago Alain Escaffre 76
2 years ago Alain Escaffre 75
2 years ago Alain Escaffre 74
2 years ago Alain Escaffre 73
2 years ago Alain Escaffre 72
2 years ago Alain Escaffre 71
2 years ago Alain Escaffre 70
2 years ago Alain Escaffre 69
2 years ago Alain Escaffre 68
2 years ago Solen Guitter 67
2 years ago Alain Escaffre 66
2 years ago Alain Escaffre 65
2 years ago Alain Escaffre 64
2 years ago Alain Escaffre 63
2 years ago Alain Escaffre 62
2 years ago Thibaud Arguillere 61
2 years ago Solen Guitter 60
2 years ago Manon Lumeau 59
2 years ago Alain Escaffre 57
2 years ago Alain Escaffre 58
3 years ago Thibaud Arguillere 56
3 years ago Solen Guitter 55
3 years ago Solen Guitter 54
3 years ago Laurent Doguin 53
3 years ago Solen Guitter 52 | Formatted steps
3 years ago Damien Metzler 51
3 years ago Solen Guitter 50
3 years ago Solen Guitter 49
3 years ago Solen Guitter 48
3 years ago Solen Guitter 47
3 years ago Alain Escaffre 46
3 years ago Alain Escaffre 45
3 years ago Alain Escaffre 44
3 years ago Solen Guitter 43 | Formatting
3 years ago Alain Escaffre 42
3 years ago Alain Escaffre 41
3 years ago Alain Escaffre 40
3 years ago Solen Guitter 39
3 years ago Solen Guitter 38 | Added children pages
3 years ago Solen Guitter 37
3 years ago Solen Guitter 36
3 years ago Alain Escaffre 35
3 years ago Solen Guitter 34
3 years ago Solen Guitter 33
3 years ago Alain Escaffre 32
3 years ago Alain Escaffre 31
3 years ago Alain Escaffre 30
3 years ago Alain Escaffre 29
3 years ago Alain Escaffre 28
3 years ago Alain Escaffre 27
3 years ago Alain Escaffre 26
3 years ago Thomas Roger 25
3 years ago Solen Guitter 24
3 years ago Alain Escaffre 23
3 years ago Alain Escaffre 22
3 years ago Alain Escaffre 21
3 years ago Alain Escaffre 20
3 years ago Alain Escaffre 19
3 years ago Alain Escaffre 18
3 years ago Alain Escaffre 17
3 years ago Alain Escaffre 16
3 years ago Alain Escaffre 15
3 years ago Alain Escaffre 14
3 years ago Alain Escaffre 13
3 years ago Alain Escaffre 12
3 years ago Alain Escaffre 11
3 years ago Alain Escaffre 10
3 years ago Alain Escaffre 9
3 years ago Alain Escaffre 8
3 years ago Alain Escaffre 7
3 years ago Solen Guitter 6 | Formatting
3 years ago Thierry Delprat 5
4 years ago Solen Guitter 4
4 years ago Thibaud Arguillere 3
4 years ago Thierry Delprat 2
4 years ago Thierry Delprat 1
History: Created by Thierry Delprat
Creative Commons Licence