Introduction
Welcome to the reference documentation for the Fortx API.
The API is organised around REST. All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON.
Included in this documentation are examples of requests presented in various formats and languages. You can run the statements on a command line to try out different API requests.
Request format
The Fortx API is a JSON API. You must supply a Content-Type: application/json header in PUT and POSTrequests and set an Accept: application/json header on all requests.
The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false, or null. Most programming languages have tools to parse this data.
Response format
The Fortx API responds to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, the API renders the resulting JSON representation in the response body. Example:
Status: 200 OK
{
"id": 1,
"given_name": "Joe",
"family_name": "Bloggs",
...
}Data types
ID integers
Most Fortx resources such as users and events are identified by the integer specified by the id attribute of API responses. The default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent Fortx ID integers.
If you use a static-typed language where integer types are declared explicitly, use a 64-bit integer type (signed is OK) for Fortx ID integers. For example, in Java or C#, use the long type, not int.
Timestamps
Timestamps use UTC time and are formatted as ISO 8601 strings, with nanoseconds and a Z designator for the timezone. For example: 2020-01-01T08:00:00.00Z is a valid timestamp.
Last updated
Was this helpful?