Overview
Resource Identity
All Northpass API resources have two fields which identify them: id
and type
.
The id
field can be either a v4 UUID (e.g.: 18000950-05a5-4069-8f85-5bda291f32eb
) or a compound id, constructed from multiple UUIDs or other pieces of data that identify a given resource. Please visit the API reference of specific endpoints for details.
The type
field indicates the type of resource.
For more information please visit the JSON API specification.
Resource list
All endpoints which return a list of resources support the following operations:
Data formats
name | format | example | description |
---|---|---|---|
boolean | true or false | true | |
uuid | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | 6d168614-6ec9-46ba-9001-99091d4a2005 | UUID v4 |
datetime | %Y-%M-%DT%h:%m:%sZ | 2020-03-31T17:15:17Z | %Y - year %M - month (01 - 12) %D - day (01 - 31) %h - hour (00 - 23) %m - minute (00 - 59) %s - second (00 - 59) |
Errors
The Northpass API uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided. The Northpass API follows the JSON-API error spec for handling errors.
An example error response is as follows:
Status: 422
Body:
{
"errors": [
{
"status": "422",
"title": "Invalid Attribute",
"detail": "Uh oh, that name has already been added",
"source": {
"pointer": "/data/attributes/name"
}
}
]
}
Updated over 4 years ago