Tutorials

Learning REST API - Prerequisites

Updated: February 22, 2017 Page Information Edit on GitHub

Technical Prerequisites

Mandatory Prerequisites

Browser Google Chrome / Chromium browser with the Postman extension, or Firefox web browser with the RESTED extension
Nuxeo Studio project You need a Nuxeo Studio project. If you don't have a Nuxeo Online Services account, you should sign up for a 30-day free trial.
Node.js In this tutorial we will be using Nuxeo JS Client in node.js. Check the page Setting up Your JavaScript Environment for complete instructions on how to install both tools.
Nuxeo JavaScript Client We will be using Nuxeo JavaScript Client to wrap our REST API calls. Nuxeo JS client is versatile enough to let you work in various contexts: in Node.js, in the browser by adding the library directly or through Bower, or in AngularJS applications. See above for instructions on how to install.
cURL Available natively for Mac OS and Linux users, Windows users can install it. It may be useful to check your CORS configuration.
Nuxeo DAM From Nuxeo Marketplace, install the Nuxeo DAM addon. This will provide you with three extra multimedia Document Types to use and test throughout the tutorial: Picture, Audio and Video.

Optional Prerequisites

Nuxeo Showcase Content addon From Nuxeo Marketplace, install the Nuxeo Showcase Content addon. This will provide you with a stock of various documents to manipulate during the tutorial.
Nuxeo Dev Tools browser extension Available for Chrome and Firefox, this handy little extension provides a number of useful shortcuts. Be sure to set up a CORS configuration to fully benefit from its features.

Required Knowledge

Mandatory Knowledge

Nuxeo Platform Understanding the Nuxeo Platform's document concept is essential. Getting a grasp of the main Nuxeo Platform functionalities is highly recommended.
Nuxeo Studio Familiarity with the main Nuxeo Studio functionalities is necessary, because you will call custom features created in Studio during this course.
JavaScript JavaScript programming skills are required, as we will be using the Nuxeo JavaScript client to practice.

Optional Knowledge

Java Java programming skills are needed if you want to cover the bonus section of this tutorial, extending the REST API.

Useful REST API Resources

Information about Nuxeo REST API can be found in various places. Here are some of the most relevant tools at your disposal:

API Playground Available at nuxeo.github.io/api-playground. It allows you to connect to a live Nuxeo Platform repository and try out the existing endpoints.
REST API Documentation Available at REST API in our documentation center. It provides detailed technical documentation on the concepts, features and clients for Nuxeo REST API.
Local Instance REST API Documentation Available in your Nuxeo Platform instance at api/v1/doc. Assuming a Nuxeo Platform instance is running on your machine, the URL would be http://NUXEO_SERVER/nuxeo/api/v1/doc. If you don't have a local instance, you can try it at https://nightly.nuxeo.com/nuxeo/api/v1/doc. The default login / password is Administrator / Administrator. It provides an automatically generated documentation with the available endpoints and what they expect. Use it to get an idea of what you need to send in a request body.
JS Client Documentation Available at nuxeo.github.io/nuxeo-js-client/. It provides explanations about the available objects and methods in Nuxeo JS client, which we will use during this tutorial.
REST API Video Course Available at Nuxeo University REST API course. Sign up for a free account in order to access the videos. It can help get you started quickly with Nuxeo REST API's main concepts, and gives the relevant links to go further.
4 months ago Solen Guitter Add description for SEO
4 months ago Solen Guitter Consistency fixes (formatting, headings, links, etc.)
4 months ago Solen Guitter Make DAM a mandatory prerequisite
4 months ago Karin Touchie NXDOC-822: Separate pages
History: Created by Karin Touchie