The R-Engine API is a RESTful API. This means that the API is designed to allow you to get, create, update, & delete objects with the HTTP verbs GET, POST, PUT, PATCH, & DELETE.
Response Type (JSON)
The R-Engine API responses are exclusively in JSON format. This means that you should always set the Content-Type header to application/json to ensure that your requests are properly accepted and processed by the API.
R-Engine’s REST API is protected by the same restrictions which are provided via R-Engine standard web interface. This means that if you do not log in, you will not have any access to R-Engine Information. Furthermore, if you log in and do not have permission to view something in R-Engine, you will not be able to view it using the R-Engine REST API either.
Because we are using R-Engine backend authedication credentials we should define them at the API call. Credentials should be encoded with Base64. The header is formatted like so.
Authorization: Basic -u $USERNAME:$PASSWORD
The R-Engine API is constantly being worked on to add features, make improvements, and fix bugs. This means that you should expect changes to be introduced and documented. Whenever we make a significant change to an endpoint, we will increase the version number used in the path of the resource being requested.
However, there are some changes or additions that are considered backwards-compatible and your applications should be flexible enough to handle them. These include:
- Adding new endpoints to the API
- Adding new attributes to the response of an existing endpoint
- Changing the order of attributes of responses (JSON by definition is an object of unordered key/value pairs)
Because we aren’t versioning the API in the URI we need to define an Accept header to request a specific version. The header is formatted like so.
R-Engine API calls should be done at the below URL: