API requests are made up of the following:
Rulex API headers are case insensitive. The “X-” prefix indicates a custom header.
The standard headers for requests are as follows:
The authentication token, retrieved via the Auth API, must be entered in the Authorization header at the start of almost all API calls, in the format: Bearer <your access token>.
The type of contents included in the body. Possible values are:
A 16-character alphanumerical GUID code.
It is customizable, so users can use personal codes to identify the requests, if needed.
If it is not specified, the backend will provide an ID for the current request.
API requests can be sent in two ways:
An alphanumerical code, similar in structure to the authentication token, can be used to renew a token when it has expired. It lasts longer than the access token.
The endpoint is made up of:
The following is an example of an API post method, which creates a new task in a specific flow:
The API method can either be:
GET – this type of API retrieves information, such as the list of flows
POST – this type of API sends information to perform an action, such as the creation of a task.
The URI contains the following:
The host is client dependent, and is consequently not usually included in the endpoint in API documentation.
The API is the root of the call, which in this case is always API.
The recipient is the area of action of the call, which can be:
The type of operation performed by the API.
The subject of the operation. For example, if the call changes the name of a flow, Flow will be the subject.
These are mandatory parameters, which will result in the method failing if not provided.
Query string parameters
These are optional parameters, included at the end of the URI, after a question mark (“?”).
Not all API requests contain a body:
GET API retrieve information, so generally they do not have a body
POST API send information, which is usually included in the body of the request
The following is a sample in cURL of a synchronous API call to export a Rulex Flow: