Base URL: /api/portserver, Version: 0.2.1
AIS system for monitoring vessel traffic
This call may change without warning.
Operation | Description |
---|---|
POST /ship/route | Start route calculation from source to destination. |
GET /ship/route/{id} | Query / poll result by identifier |
POST /ship/route/execute | Perform route calculation in one operation |
POST /ship/historical/port | Get a list of last visited ports for the given ship. |
POST /ship/historical/trip | Get a list of last trips for the given ship. |
POST /ship/historical/track | Get a historical track for the given ship for the given period. |
GET /ship/historical/track | |
POST /ship/info | Return the static information for the given ship for the given time. |
GET /ship/info/{mmsi} | Get the most current static ship information for a specific ship |
GET /ship/search/{querystring} | Get the most current static ship information for ship(s) matching a query string |
GET /ship/position/{mmsi} | Get the most current position for a specific ship |
POST /ship/register | Add a new ship to the ship register. |
GET /ship/register | Get static ship information for all ships from the ship register |
PUT /ship/register/{mmsi} | Update a new ship in the ship register. |
GET /ship/register/{mmsi} | Get static ship information for a specific ship from the ship register |
DELETE /ship/register/{mmsi} | Get status of arrivals for all ships towards a port |
POST /ship/select | Select a ship for display pan/zoom for a user in aisWeb. |
GET /ship/select | Get selected ships for pan/zoom for this calling user. |
GET /ship/select/{owner} | Get selected ships for pan/zoom for this calling user for the supplied owner. |
POST /ship/area | Return a list of ships in given area at a given point in time. |
GET /ship/area/{id} | Query / poll result by identifier |
This call will only change in a release.
Operation | Description |
---|---|
POST /ship/track | Start a track of a ship towards a predefined destination |
GET /ship/track | Get status of a track for all ships towards predefined destinations |
PUT /ship/track/{id} | Update arrival with ERP information |
GET /ship/track/{id} | Get status of a track of a ship towards a predefined destination |
DELETE /ship/track/{id} | Stop and delete a track. |
GET /port/list | Search for a port or list all ports |
GET /port/info/{id} | Get extented port information |
GET /port/arrivals/{id} | Get status of arrivals for all ships towards a port |
Calculate ship route
Operation | Description |
---|---|
POST /ship/route | Start route calculation from source to destination. |
GET /ship/route/{id} | Query / poll result by identifier |
POST /ship/route/execute | Perform route calculation in one operation |
Track ship to destination
Operation | Description |
---|---|
POST /ship/track | Start a track of a ship towards a predefined destination |
GET /ship/track | Get status of a track for all ships towards predefined destinations |
PUT /ship/track/{id} | Update arrival with ERP information |
GET /ship/track/{id} | Get status of a track of a ship towards a predefined destination |
DELETE /ship/track/{id} | Stop and delete a track. |
Port information
Operation | Description |
---|---|
GET /port/list | Search for a port or list all ports |
GET /port/info/{id} | Get extented port information |
GET /port/arrivals/{id} | Get status of arrivals for all ships towards a port |
DELETE /ship/register/{mmsi} | Get status of arrivals for all ships towards a port |
Ship information
Operation | Description |
---|---|
POST /ship/historical/port | Get a list of last visited ports for the given ship. |
POST /ship/historical/trip | Get a list of last trips for the given ship. |
POST /ship/historical/track | Get a historical track for the given ship for the given period. |
GET /ship/historical/track | |
POST /ship/info | Return the static information for the given ship for the given time. |
GET /ship/info/{mmsi} | Get the most current static ship information for a specific ship |
GET /ship/search/{querystring} | Get the most current static ship information for ship(s) matching a query string |
GET /ship/position/{mmsi} | Get the most current position for a specific ship |
POST /ship/register | Add a new ship to the ship register. |
GET /ship/register | Get static ship information for all ships from the ship register |
PUT /ship/register/{mmsi} | Update a new ship in the ship register. |
GET /ship/register/{mmsi} | Get static ship information for a specific ship from the ship register |
POST /ship/select | Select a ship for display pan/zoom for a user in aisWeb. |
GET /ship/select | Get selected ships for pan/zoom for this calling user. |
GET /ship/select/{owner} | Get selected ships for pan/zoom for this calling user for the supplied owner. |
POST /ship/area | Return a list of ships in given area at a given point in time. |
GET /ship/area/{id} | Query / poll result by identifier |
Get the current status of the tracks of the ships towards the destination. Returns the ETA.
id | id of the port |
path | integer |
application/json
successful operation
Get extented port information
id | id of the port |
path | integer |
application/json
successful operation
Get a list of ports based on a search pattern
pattern | Simple search pattern based on port name. Use * for wildcard. Default all |
query | string | |
offset | Use for pagination. Start index of ports returned. |
query | integer | |
limit | Use for pagination. Limit the number of ports returned. |
query | integer 10000 |
application/json
successful operation
Once the job has been completed (or aborted) and result given back the job is deleted. The operation will timeout if not completed in two minutes.
id | Identifier returned from the /ship/area POST call. Notice this is a 64 bit value. |
path | integer (int64) |
application/json
successful operation
The operation is still executing. call again in a while. Recommended wait 5-10 seconds.
Get a list of last visited ports for the given ship.
Ship.
application/json
successful operation
Get a historical track for the given ship for the given period between begin and end. Resolution of the track indicates the interval between samples returned.
application/json
successful operation
Accepted for processing. The job has been started but is not yet completed. Try again in a minute or so.
Get a historical track for the given ship for the given period between begin and end. Resolution of the track indicates the interval between samples returned.
Ship identity.
application/json
Accepted for processing. The job has been started but is not yet completed. Call the accompanying GET to retrieve the result.
Get a list of last trips for the given ship.
Ship.
application/json
successful operation
mmsi | MMSI or IMO for the ship. |
path | integer |
application/json
successful operation
219345000
Navigational status as indicated by the AIS information.
Heading in degrees 0..359
180
Rate of Turn as indicated by the AIS message -127..127
127
application/json
successful operation
Get the current status of the tracks of the ships towards the destination. Returns the ETA.
mmsi | MMSI for the ship. Notice this may be a 64 bit integer. |
path | integer |
application/json
successful operation
mmsi | MMSI for the ship. Notice this may be a 64 bit integer. |
path | integer |
application/json
successful operation
Start route calculation from 'source' to 'destination'. A route is calculated (if possible) and a set of waypoint positions are returned. The 'source' and 'destination' parameters must each define either a 'port', 'ship' or 'position'. The 'port' can be either a 'port id' or a 'port locode' or a 'port name'. A ship can be one or more of a MMSI, IMO number, shipname or callsign. A 'position' is a GEOJSON formatted point. If a ship is used then the draught of the ship is used in the calculations (if available). The draught can be overridden by applying a draught parameter in the 'source'. The function returns an identifier. Subsequently call /route/result using the identifier to obtain the result.
Object defining 'source' and 'destination'.
application/json
successful operation. The operation is executing.
Perform route calculation. This function combines /route/start and polling /route/result until completed. The function will thus block for the duration of the route calculation, which can be a couple of minutes.
Object defining 'source' and 'destination'.
application/json
successful operation
Once the job has been completed (or aborted) and result given back the job is deleted. The operation will timeout if not completed in two minutes.
id | Route calculation identifier. Notice this is a 64 bit value |
path | integer (int64) |
application/json
successful operation
The operation is still executing. call again in a while. Recommended wait 5-10 seconds.
querystring | Query string to match MMSI/IMO/name/callsign for the ship. |
path | string |
application/json
successful operation
219019139
9619971
"MARSTAL MAERSK"
"OWJK2"
application/json
successful operation
owner | Filter for only message from owner. |
path | string |
application/json
successful operation
Get the current status of the track of all ship towards the destinations. Return the current track and ETA. Use this to get all active tracks. Call /ship/track/{ID} DELETE to stop and delete the track.
application/json
successful operation
Start a track of a ship towards a predefined destination. Perform an initial route calculation. Will then keep track of the ship until it has reached its destination. By polling /ship/track/{ID} GET the current status can be retrieved. Call /ship/track/{ID} DELETE to stop and delete the track.
If the ship cannot be found then an error code is returned unless "source.ship.create" = true.
Object defining 'source' and 'destination'. Normally source should reference a ship and destination should reference a port or a position.
application/json
successful operation
Stop and delete a track.
id | id of the track |
path | integer (int64) |
application/json
successful operation
Get the current status of the track of the ship towards the destination. Return the current track and ETA. Call /track/{ID} DELETE to stop and delete the track.
id | id of the track |
path | integer (int64) |
application/json
successful operation
Update the ERP information for the arrival with any information available from the ERP system.
id | id of the track |
path | integer (int64) |
application/json
successful operation
Point in time from when to extract the data. Default is now. NB!! Currently not used as only now is supported.
"2017-10-15T12:00:00Z"
Duration back in time to show ships. Defaults to 24 hours = 24:00:00
"24:00:00"
Bollard. Consists of a numbered identifier and a position.
The erp object is used for storing information relevant to the ERP system. It can contain any kind of valid json information. Only the shown properties are recognized by the AIS system.
The warp array is used for describing upcoming warps. The first is arrival at the port and any subsequent are movements internally at the port. Notice the eta of the first warp is used by the AIS system as indication of the expected arrival time at the port.
The attributes may be used as a key:value set that can be displayed and edited in aisWeb. The information is entirely up the port and integrator.
"[{\"key\" : \"Last visit\", \"value\" : \"2016-01-04T12:00:00Z\", \"datatype\" : \"datetime\", \"edit\" : false}, {\"key\" : \"Garbage collected\", \"value\" : false, \"datatype\" : \"boolean\", \"edit\" : true}]"
Defining one or more waypoints, the portserver will interpret the defined points as "sub destinations", which means that the colculated route will pass through the points toward the final destination. When waypoints are defined the track result will contain an array of waypoint ETAs that will map to the defined list of waypoints.
"[{\"position\": { \"coordinates\": [10.69979572296143,57.80120849609375],\"type\": \"Point\"}}]"
Optional attributes shown in the aisWeb display. The fields are purely informational and the contents is not used by aisWeb.
Type is string by default, but can also be a boolean or a number
string, boolean, number, datetime and enum. Default is string
Indicates whether the ERP system can accept external changes. I.e. field should be editable in aisWeb
Indicates whether the key field should be editable in aisWeb
Object containing a position, linestring (track) or polygon. Based on http://geojson.org/ and https://github.com/dret/GeoJSON-X. Extensions defined are time (timestamp in ISO format, cog (Course Over Ground in degrees 0..360), sog (Speed Over Ground in knots). Please notice extensions in coordinates can be both numbers and string (time)
"Position: {\"type\": \"Point\", \"extensions\": [\"time\", \"cog\", \"sog\"], \"coordinates\": [10.1, 55.2, \"2016-01-15T12:00:00Z\", 120.1, 8.4]\"}, Track: {\"type\": \"LineString\", \"extensions\": [\"time\", \"cog\", \"sog\"], \"coordinates\": [ [10.1, 55.2, \"2016-01-15T12:00:00Z\", 120.1, 8.4] [10.3, 55.1, \"2016-01-15T12:30:00Z\", 118.2, 8.3]]\"}"
A location or shape. The location should at least contain a position but can also contain one or more polygons or a combination of these. The first object (position or polygon) is the arrived destination. The second (optional) is the arriving area around the destination. The third (optional) is the departed area.
"BAYONNE"
GeoJSON object containing a polygon. Based on http://geojson.org/
{
"coordinates": [
[
[
10.1,
55.2
],
[
10.3,
55.1
],
[
10.2,
55.2
]
]
],
"type": "Polygon"
}
As input parameter, either id or locode or name can be used. Notice that id and locode is unique whereas name may not be unique. The Locode is not defined for all ports.
7790
5 alphanumeric characters: 2 for country and 3 for location. Notice that the Locode is not defined for all ports.
"USBAY"
"BAYONNE"
Extended port information. Notice that id and locode is unique whereas name may not be unique. The Locode is not defined for all ports. shapes is a set of GeoJSON objects that should be drawn on a map of the port
Identification of port and arrival "ata" and departure "atd" time
Actual Time of Arrival [UTC]
Actual Time of Departure [UTC]
GeoJSON object containing a position along with a timestamp and optionally "cog", "sog". Based on http://geojson.org/ and https://github.com/dret/GeoJSON-X. Extensions defined are time (timestamp in ISO format, cog (Course Over Ground in degrees 0..360), sog (Speed Over Ground in knots). Please notice extensions in coordinates can be both numbers and string (time)
"{\"type\":\"Point\", \"extensions\" : [\"time\", \"cog\", \"sog\"], \"coordinates\":[10.1, 55.2, \"2016-01-15T12:00:00Z\", 120.1, 8.4]\"}"
Length / distance of the track [m].
Notice not all parameters are always set. And you will only get this if a ship is used as input.
Timestamp of expected arrival time at destination. This is based
Timestamp of last received position
Speed Over Ground of last received position
One or more ships used for selection in aisWeb.
Static information to identify a ship. To query a given ship provide any information available. Using more information will enhance the chance for identification.
219019139
9619971
"MARSTAL MAERSK"
"OWJK2"
140
22
Draught of the ship [m]. Notice this info may change for each voyage.
8.7
Displacement of the ship. Notice this info is not available in the AIS information.
10000
If true the system will create an entry with this ship if it cannot find any information on the ship. This can be useful for ships without an AIS transponder.
Expected Time of Arrival as indicated in the AIS message.
"2016-01-15T12:00:00"
Destination as indicated in the AIS message.
"MELBOURNE"
United Nations Country name. See http://www.unece.org/cefact/locode/service/location.
"France"
Textual description of ship type. Based on the AIS information. May also include cargo
"TANKER"
begin: Start time for the track [UTC] default yesterday midnight, end: End time for the track [UTC] default last midnight.
Start timestamp for the track. Always UTC
"2015-06-17T12:34:56Z"
End timestamp for the track. Always UTC
"2015-06-17T12:34:56Z"
Resolution of the track. Time between samples as hh:mm:ss
"00:10:00"
Description of a ship in a ship list. Contains static and dynamic information.
Zero or more ships found inside the area.
ERP information in JSON format. Notice not all parameters are always set
Notice not all parameters are always set. route: Linestring indicating the automatic route calculated. Notice presence of this field is dependent on system configuration and user access rights. geo: Polygon showing the expected arrival of the ship in the port.
A status code indicating the current tracking status. https://maritime.gatehouse.dk/pub/api-doc/portserver/
Estimated Time of Arrival (ETA) in ISO Extended format
"2015-06-17T12:34:56Z"
The port array will contain 2 entries: departure and destination port. Notice the departure and arrival port may be the same port. atd is the departure time and ata is the arrival time.
Actual Time of Departure [UTC]
Actual Time of Arrival [UTC]
Any information can be stored and retrieved. The parts used in the system are shown here.
Optional identifier assigned by the ERP system
Estimated Time of Arrival (ETA) in ISO Extended format
"2015-06-17T12:34:56Z"
Estimated Time of Departure (ETD) in ISO Extended format
"2015-06-17T12:34:56Z"
Optional indication of intended side to the berth. true = starboard, false = port and N/A = unknown
Color for arrival in hex format e.g. #00ff88