Extract from the course "Working with the REST API" on Hyland 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. - 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. - Workflow: Since 7.2, new workflow endpoints are available.
- Upload batch: Since 7.4, a new 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
- You can start reading the documentation page of the Nuxeo Platform API Playground and use it.
- A cURL tutorial: How to create a document in the repository and bind a binary to this document
- Some consecutive cURL calls to get familiar with the resources/command variations of the API
- A blog post that presents the advanced concepts of the Nuxeo REST API with some nice examples.
- A client sample nuxeo-travel-expenses (available on GitHub ) based on web components and polymer framework demonstrates how to use the workflow REST API.
Available Client SDKs
We provide several client SDKs for making it even easier to use the API integrate with the Nuxeo Platform.
- Java client
- JavaScript client
- iOS client
- Android client
- PHP client (partial implementation)
- DART client