API specification (1.0)
We would like to hear your input for improvements, send this to ......
Endpoints
Test systems are reset with data from production every Sunday night
System | End point (URL) |
|---|---|
Test system | |
Production system |
Swagger
In swagger you will find an overview of available versions of the API and further details about what functions are in these.
NOTE! Always use the latest version of the API. Older versions of the API may eventually be discontinued, but this will be notified on an ongoing basis.
Swagger has been added to the following addresses:
IMPORTANT! Log in with your API user to access the swagger pages on the pages first.
Solution | URL |
|---|---|
Production system |
Definition of terms
The API builds on top of the Entity Attribute Value model of the data dictionary in
Meta data concepts:
Term | Description |
|---|---|
Entity | An entity is a description of a type of an item. Or a schema definition of an item/object type. |
Attribute | Attributes are a part of entities. A schema field if you like for the entity. |
Data concepts:
Term | Description |
|---|---|
Item | An item is an actual object instance from a specific entity. |
Value | A stored value for an item referencing one of the attributes of the entity of the item. |
Full diagram of all entities and attributes:
Authentication
Authentication is done until further notice with BASIC authentication. Security and encryption here are taken care of by the transport layer (HTTPS).
Example:
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
More info here: https://en.wikipedia.org/wiki/Basic_access_authentication
NOTE! PDT Norge will create API users who are given special access to the system with which you must use to log in to the API.
Error codes
In the event of a validation error in the API, HTTP result code 422 is returned, with the following JSON structure:
Eksempel:
{
"Error" : "descriptive error message here",
"Code" : 123
} Error - Error message
Code - Error message code
See Swagger for updated documentation on all features of the API.
Throttling
All API users are encouraged to run at night between 02:00 and 06:00 (Norwegian time). The throttling will then have a less restrictive setup.
NOTE! In case of error code 429 - then the API calls must wait and run again. See further information in the headers.
Endpoints with throttling transmitter with headers with info about this:
x-rate-limit-limit: 1s x-rate-limit-remaining: 4 x-rate-limit-reset: 2020-06-08T13:58:10.7711830Z
If API throttles then sent with header:
retry-after: 1