# Concepts

Crisisworks offers a unified web services endpoint for both REST (Representational State Transfer) and RPC (Remote Procedure Call) commands.

Some commands are RESTful while others implement an RPC interface. All commands use HTTPS as the transport, and support the common HTTP/1.1 verbs `GET`, `POST` and `PUT`.

## Initial access

To obtain access to these APIs, API users must:&#x20;

* register their intended use
* be approved by Datalink and the customer of the tenancy, and
* agree to abide by the [API Terms of Use](https://docs.cw.crisisworks.com/security-and-support/security/api-terms-of-use).

Contact Datalink's Service Desk to arrange access.

## Calling the APIs

The general format for calling the API is:

```http
GET https://{{host}}/api/json/{{command}}
Authorization: Bearer {{token}}
X-Site: {{site}}
```

This would be called using your HTTP client of choice and comprise the following components:

|           |                                         |
| --------- | --------------------------------------- |
| `host`    | The Crisisworks system URL              |
| `site`    | The Site ID of the tenancy              |
| `command` | The command to run                      |
| `token`   | Your authentication token, if required. |

The headers in this standard format include `Authorization` and `X-Site`, which are both required for most APIs.

Responses are in JSON. The following is a response to the ping command illustrated earlier.

```json
{
  "status": 200,
  "timestamp": "2025-07-22T12:12:25+10:00"
}
```

RPC APIs include a `status` property which uses HTTP status codes, and `200` indicates success, `4XX` codes represent bad inputs, and `5XX` codes are server-side errors. REST responses will return the record structure.
