Getting Started
How to authenticate with the R+ APIs
Authentication
API Tokens
Generate an API Token in the R+ UX. Use this token to authenticate API calls. All operations will be performed by the API token principal itself.
An API Token is effectively a password without the need to include a username. It should be treated as a secret value, and securely managed.
Bearer Tokens
Retrieve Bearer Token
POST https://<instance>.demanddriventech.com/token
Headers
Content-Type
string
x-www-form-urlencoded
Request Body
username
string
password
string
grant_type
string
{
access_token: "abcdefgh",
token_type: "bearer",
expires_in: 86399
}Making API Requests
Making API requests currently requires a local user account, or API Token. SSO identities are not currently supported.
Bearer Token
OPTIONS https://<instance>.demanddriventech.com/api/*
You can either include the Authorization as part of the URL, or as pass it as a header value.
Headers
Authorization
string
Bearer Token String
Simply included the bearer token in any future API request as part of the Authorization header prefixed by "Bearer ".
Header Example
API Token
OPTIONS https://<instance>.demanddriventech.com/api/*
You can either include the api_key as part of the URL, or as pass it as a header value.
Query Parameters
api_key
string
Your API Token i.e. "abcdefg"
Headers
api_key
string
Your API Token i.e. "abcdefg"
Query Example (GET)
Header Example
Supported HTTP Request Verbs
Verb
Description
GET
Retrieve data from the server. The data will be returned in the response body.
POST
Create a specified resource.
Note: The response will contain a LOCATION header with the URI that can be used to retrieve the newly created resource. (in addition to any data contained in the response body)
PUT
Update or create a specified resource.
DELETE
Delete the requested resource.
Supported Response Status Codes
Success
Status Code
Description
201 CREATED
For PUT operations, the object was created successfully, and an ID has been generated for the created resource. The Location header will contain a URI where the newly created resource can be retrieved, in addition to
202 ACCEPTED
The request is authenticated, but not authorized to perform the requested action. Examples:
Attempting to modify a resource using credentials that grant only read-only access.
Requesting an invalid or non-existent API endpoint.
Errors (Request)
Status Code
Description
401 UNAUTHORIZED
The request does not contain a valid authentication header or token.
403 FORBIDDEN
The request is authenticated, but not authorized to perform the requested action. Examples:
Attempting to modify a resource using credentials that grant only read-only access.
Requesting an invalid or non-existent API endpoint.
404 NOT FOUND
The resource specified in the URI does not exist or cannot be found.
405 METHOD NOT ALLOWED
The resource specified in the URI cannot be updated or deleted, typically because it is a reserved or readonly. Example:
Attempting to modify or delete a reserved or system resource.
429 TOO MANY REQUESTS
Too many requests have been made in too short of a time. Please wait a short time before trying again.
Errors (Server)
Status Code
Description
500 INTERNAL SERVER ERROR
A server error prevented the requested operation. More details will be contained in the response body.
Common Data Types
Dates
Due to the difficulty and difference of handling dates between various systems, the type 'Date' will refer to a date-part-only-string, where the date is in ISO-8601 Date-Only format: YYYY-MM-DD.
Example:
DateTime
Due to the difficulty and difference of handling dates between various systems, dates are quoted and in ISO-8601 Date-And-Time format: YYYY-MM-DDThh:mm:ssZ.
Boolean
Simple True/False values can be specified either by the words "False", "True" or the integer values 0 or 1
Numbers
Numeric values should not contain thousands separators, and should use a period as a decimal separator. Do not include quotes around the values.
String
Strings of text should be quoted using straight double-quotes.
Throttling
Sometimes, a response will result in an HTTP error status code 429 TOO MANY REQUESTS. This can happen if too many API requests have been made in too short of a time. If this happens, please wait a short time before retrying your request. Adding a brief delay between status check polling might be necessary.
The API Throttling max frequency is currently set to about 20 requests per minute.
Throttling is currently enabled for the following endpoints:
/v2/data/import
/v2/import
Last updated