REST Documentation

Standard Types

Type Description Example Reference
GeoJSON Standard GeoJSON data format { "type" : "Point", "coordinates" : [-10.2, 40.1] } http://geojson.org
GeoJSON-X Extended GeoJSON data format. Extensions: time, sog, cog.
Note position and timestamp must be valid.
cog, sog may be null
{ "type" : "Point", "extensions" : ["time", "cog", "sog"],
"coordinates" : [-10.2, 40.1, "2016-05-16T12:00:00Z", 180.2, 10.4] }
https://github.com/dret/GeoJSON-X
Datetime ISO 8601 combined date and time format 2019-01-21T00:00:00Z https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations
Duration ISO 8601 duration format P2W https://en.wikipedia.org/wiki/ISO_8601#Durations

Error Codes

The standard OK response is response_code 200 and the return body is always either empty or a valid JSON object

For all errors the following codes are used throughout the REST interface:

Code Description
200 Successful operation.
201 Successful operation. Object is created.
202 Successful operation. Task is accepted and will be processed.
204 Successful operation. No response value.
400 Bad request. Typically syntax error or missing input parameter.
401 Unauthorized. Correct credentials were not provided.
403 No access. Credentials are ok, but you are not allowed to perform the requested operation.
404 Unknown URL. The operation requested does not exist.
408 Timeout. An internal operation timed out. You may try again later.
409 Conflict. A parameter is in conflict with an existing condition and cannot be updated. Typically with PUT and POST.
412 Precondition failed. Typically missing "accept application/json" or "accept **/**".
The system does currently not understand "application/*" or "*/json".
422 Request syntax ok, but no data was available for the requested input parameters.
Could be asking for too old data or a ship that does not exist.
429 Too many requests. Each user can have only one outstanding operation.
Also a limit may be imposed on the number of completed jobs in the database due to size restrictions.
Contact GateHouse if this is a serious issue for your operation.
500 Internal error in the system. Contact GateHouse with the username and a timestamp of the incident (as precise as possible).

 

Generated on 2022-02-10T12:48:08+01:00