Understand the behavioral timeline of a selected vessel to identify behavioral anomalies and identity changes during a given time frame, up to 1 year.
Query Schema
type Query {
vesselTimeline(input: VesselTimelineInput!): VesselTimelineConnection!
}
Arguments
Name | Type | Description |
---|---|---|
input | VesselTimelineInput! | Sets the properties of the vessels whose behavioral timeline is returned by the vesselTimeline query. |
Schema
input VesselTimelineInput {
vesselIdOrImo: String!
types: [VesselActivityTimelineTypeInput!]!
timeRange: ClosedDateTimeRangeInput!
polygon: GeoJSONPolygonGeometryScalar
includePropertyChanges: Boolean! = false
limit: PositiveInt! = 100
offset: NonNegativeInt! = 0
}
VesselTimelineInput Fields
Name | Type | Description |
---|---|---|
includePropertyChanges | Boolean! | Whether the property changes which occurred within the timeline are included in the returned results. |
limit | PositiveInt! | The maximal number of records to return. |
offset | NonNegativeInt! | The number of returned records to skip from the beginning of the record list. |
polygon | GeoJSONPolygonGeometryScalar | The polygon of the vessels whose behavioral timeline is returned. |
timeRange | ClosedDateTimeRangeInput! | The time range within which the returned behavioral timelines have occurred. |
types | [VesselActivityTimelineTypeInput!]! | The type of activity and polygon of the vessels whose behavioral timeline is returned. |
vesselIdOrImo | String! | The identification of the vessels whose behavioral timeline is returned. |
Returns
Name | Description |
---|---|
VesselTimelineConnection! | The property changes in the vessels specified by the vesselTimeline query input (the object constitutes the response of the query). |
VesselTimelineConnection Fields
Name | Type | Description |
---|---|---|
nodes | [VesselTimelineItem!] | The activity-related changes for the vessels specified by the vesselTimeline query input. |
totalCount | NonNegativeInt! | The number of vessel nodes returned. |
Example Code
Sample Query
query VesselTimeline($input: VesselTimelineInput!, $type: ActivityTypes!) {
vesselTimeline(input: $input) {
totalCount
nodes {
... on Activity {
id
type
startDate
endDate
previousPortId
nextPortId
secondVessel {
id
name
imo
}
vessel {
id
name
imo
}
formerMMSI
endCoordinate
startCoordinate
duration
extraFields {
... on ExtraFields {
activityType
}
... on AccidentActivityExtraFields {
accidentType
}
... on DarkActivityExtraFields {
draftChange
destinationChange
}
... on DestinationChangeActivityExtraFields {
oldDestination
newDestination
}
... on ETAChangeActivityExtraFields {
oldEta
newEta
}
}
description
polygon {
id
type
properties {
name
}
}
}
... on VesselPropertyChanges {
timestamp
eta {
oldValue
newValue
}
size {
oldValue
newValue
}
draught {
oldValue
newValue
}
name {
oldValue
newValue
}
callsign {
oldValue
newValue
}
destination {
oldValue
newValue
}
imo {
oldValue
newValue
}
class {
oldValue
newValue
}
vesselId
}
}
}
}
Variables
{
"input": {
"vesselIdOrImo": "5905f9f464c8bf72c1180984",
"types": [
{
"type": "MEETING"
},
{
"type": "STANDING"
},
.
.
.
{
"type": "BAD_WEATHER"
}
],
"timeRange": {
"from": "2021-01-01T00:00:00.011Z",
"to": "2022-01-01T00:00:00.000Z"
},
"includePropertyChanges": true,
"limit": 5,
"offset": 178
},
}
Response
{
"data": {
"vesselTimeline": {
"totalCount": 514,
"nodes": [
{
"id": "60bc83ac49568d96291c7705",
"type": "MEETING",
"startDate": "2021-06-06T08:13:32.000Z",
"endDate": "2021-06-06T09:41:53.000Z",
"previousPortId": null,
"nextPortId": "59184624ec50ca6ca1b36cad",
"secondVessel": {
"id": "5905c34ef211af4c5ec8b6eb",
"name": "AN DING",
"imo": 9058244
},
"vessel": {
"id": "5905f9f464c8bf72c1180984",
"name": "GANESHA",
"imo": 8519966
},
"formerMMSI": null,
"endCoordinate": [
103.97572,
1.19787
],
"startCoordinate": [
103.97861,
1.19708
],
"duration": 1.4725,
"extraFields": {
"activityType": "MEETING"
},
"description": null,
"polygon": null
},
.
.
.
{
"id": "60becb8997f87de1b6930ba7",
"type": "DESTINATION_CHANGE",
"startDate": "2021-06-08T01:44:41.000Z",
"endDate": "2021-06-08T01:44:41.000Z",
"previousPortId": null,
"nextPortId": "59184624ec50ca6ca1b36cad",
"secondVessel": null,
"vessel": {
"id": "5905f9f464c8bf72c1180984",
"name": "GANESHA",
"imo": 8519966
},
"formerMMSI": null,
"endCoordinate": [
103.97587,
1.19398
],
"startCoordinate": [
103.97587,
1.19398
],
"duration": 0,
"extraFields": {
"oldDestination": "BATAM",
"newDestination": "PGBG"
},
"description": null,
"polygon": null
}
]
}
}
}