Revolution API
The REST Client API provides a set of RESTful services for retrieving and activating notification triggers on a Revolution server. This section provides a brief overview of the features of the API.
Before you begin, you need the following:
- Access to a Revolution Server, version 2018.3.0 or later
-
cURL, a command line tool for issuing HTTP requests, or an equivalent tool such as Advanced REST Client or Postman.
Note: Postman cannot set the mime-type correctly on individual uploaded components, so it cannot be used for uploading media.
Components of a REST API request/response
A REST API request/response pair can be separated into four components:
- request URI
- request message header
- (optional) request message body
- response message header
Request URI
Although the request URI is included in the request message header, we call it out separately here because most languages or frameworks require you to pass it separately from the request message.
-
URI scheme –Indicates the protocol used to transmit the request.
For example: http or https
-
URI host – Specifies the domain name or IP address of the server where the REST service endpoint is hosted.
For example: server.com or 192.168.1.10
-
Resource path – Specifies the resource or resource collection, which may include multiple segments used by the service in determining the selection of those resources.
For example: /Trigger can be used to query the list of a specific application's owners within the application’s collection.
- Query string – (optional) Provides additional simple parameters, such as the API version or resource selection criteria.
Message Header Fields
- A required HTTP method (also known as an operation or verb), which tells the service what type of operation you are requesting. The Revolution REST API supports GET and POST methods.
- Optional additional header fields, as required by the specified URI and HTTP method. For example, an Authorization header that provides a basic token containing the username and password for the authenticating user.
Message Body Field
Optional HTTP request message body fields, to support the URI and HTTP operation. For example, POST operations contain MIME-encoded objects that are passed as complex parameters. For POST operations, the MIME-encoding type for the body should be specified in the Content-type as application/json.
- An HTTP status code, ranging from 2xx success codes to 4xx or 5xx error codes. Alternatively, a service-defined status code may be returned, as indicated in the API documentation.
- Optional additional header fields, as required to support the request's response, such as a Content-type response header.