API
This describes the resources that make up the official Snow Owl® RESTful API.
Media Types
Custom media types are used in the API to let consumers choose the format of the data they wish to receive. This is done by adding one of the following types to the Accept header when you make a request. Media types are specific to resources, allowing them to change independently and support formats that other resources don’t.
The most basic media types the API supports are:
application/json;charset=UTF-8 (default)
text/plain;charset=UTF-8
text/csv;charset=UTF-8
application/octet-stream (for file downloads)
multipart/form-data (for file uploads)
The generic JSON media type (application/json) is available as well, but we encourage you to explicitly set the accepted content type before sending your request.
Schema
All data is sent and received as JSON. Blank fields are omitted instead of being included as null
.
All non-effective time timestamps are returned in ISO 8601 format:
Effective Time values are sent and received in short format:
Hypermedia
All POST requests return Location
headers pointing to the created resource instead of including either the identifier or the entire created resource in the response body. These are meant to provide explicit URLs so that proper API clients don’t need to construct URLs on their own. It is highly recommended that API clients use these. Doing so will make future upgrades of the API easier for developers. All URLs are expected to be proper RFC 6570 URI
templates.
Example Location Header:
Pagination
Requests that return multiple items will be paginated to 50
items by default. You can request further pages with the searchAfter
query parameter.
Link/Resource expansion
Where applicable, the expand
query parameter will include nested objects in the response, to avoid having to issue multiple requests to the server.
Expanded properties should be followed by parentheses and separated by commas; any options for the expanded property should be given within the parentheses, including properties to expand. Typical values for parameters are given in the "Implementation Notes" section of each endpoint.
Response:
Client Errors
There are three possible types of client errors on API calls that receive request bodies:
Invalid JSON
Valid JSON but invalid representation
Conflicts
Server Errors
In certain circumstances, Snow Owl might fail to process and respond to a request and responds with a 500 Internal Server Error
.
To troubleshoot these please examine the log files at {SERVER_HOME}/serviceability/logs/log.log
and/or raise an issue on GitHub.
Last updated