xTuple's REST API

piercetyler edited this page Oct 28, 2014 · 24 revisions

xTuple's REST API is modeled off of Google's APIs. The API is made up of three main parts, the APIs Discovery Service, an OAuth 2.0 Server and the REST resources. When interfacing with xTuple's REST API you are strongly encouraged to build your REST Client off of the APIs Discovery Service and Google's API Client Libraries instead of trying to build a custom REST Client for one resource. Refer to the documentation below to learn more about working with xTuple's REST API.

APIs Discovery Service:

xTuple's datasource exposes an APIs Discovery Service that is intended to be a human and machine readable map that describes everything about the REST API you will need to make REST requests. The Discovery Document and Service List are dynamically generated when requested. They therefore describe the current state of all REST resources that are available from the API.


xTuple uses the OAuth 2.0 protocol to authorize users/servers/apps to make requests to the REST API. All requests to the REST API must include a valid Access Token or the request will fail. To get an Access Token, you must perform an OAuth 2.0 Client exchange with your xTuple OAuth 2.0 Server. See the documentation below to learn more about how to preform the OAuth 2.0 exchange.

REST Resource Requests:

xTuple's REST API works off of four HTTP methods. All resources work with JSON objects. You can refer to the "schemas" section of a resource's Discovery Document to get a full JSON-Schema representation of that resource and its children. The JSON-Schema will tell you what format to expect when requesting a resource and how to format a resource when returning it. The following documentation further details each method:


You can find some xTuple REST API examples located in xTuple's Examples repository. The following examples make use of the xTuple REST API:

Client Libraries