Maritime 2.0 graphQL vessels lastUpdate filter

explaining the vessels lastUpdate filter

On 2022-08-17 Spire Maritime are adding a new filter to the Maritime 2.0 graphQL API. 

The lastUpdate filter allows vessels to be queried for any update that was made with in the filter time window.

lastUpdate is different from lastPositionUpdate because it will also return vessels that have non positional updates in the period requested. This will allow for vessels with static data or voyage updates to be returned as well as those with positional updates. 


Example, comparing the use of the lastPositionUpdate filter. 

query {  vessels( lastPositionUpdate:{startTime:"2022-07-15T09:00:00.00Z"} 
) { totalCount{ relation value } } }


{ "data": { "vessels": { "totalCount": { "relation": "LOWER_OR_EQUAL", "value": 2208 }

In the example above, requesting vessels with position updates returns an estimated 2308 vessels

however using the lastUpdate filter as shown below returns a higher number of vessels

query {  vessels( lastUpdate:{startTime:"2022-07-15T09:00:00.00Z"} 
) { totalCount{ relation value } } }


{ "data": { "vessels": { "totalCount": { "relation": "LOWER_OR_EQUAL", "value": 2667 }

In the example above, requesting vessels with any update returns a higher estimated number of 2667 vessels. 

lastUpdate Filter Documentation

lastUpdate: TimeRange

If provided, only vessels with their update timestamp within the provided
time range will be returned 


Time range parameters


Timestamp of the beginning of the time range (RFC 3339 format)


Timestamp of the end of the time range (RFC 3339 format);
if omitted, the current time is used


03T10:15:30Z, compliant with ISO 8601 standard for representation
of dates and times using the Gregorian calendar.

lastUpdate Filter Examples 


lastUpdate:{startTime:"2022-07-15T09:00:00.00Z" endTime:"2022-07-15T09:55:55.99Z"}