API Reference

vesselsInArea

The API requires selection of a user-defined area and selected time interval and returns a list of vessels that transmitted in that selected location and selected time.

Query Schema

type Query {
   vesselsInArea(input: VesselsInAreaInput!): VesselsInAreaConnection!
}

Arguments

NameTypeDescription
inputVesselsInAreaInput!Sets the geographical location of the area and the time interval in which the vessel to be returned has transmitted information.

Schema

input VesselsInAreaInput {
  timeRange: ClosedDateTimeRangeInput!
  area: GeoJSONPolygonGeometryScalar!
  limit: PositiveInt! = 100
  offset: NonNegativeInt! = 0
}

VesselsInAreaInput Fields

NameTypeDescription
includePropertyChangesBoolean!Whether the property changes which occurred within the timeline are included in the returned results.
limitPositiveInt!The maximal number of records to return.
offsetNonNegativeInt!The number of returned records to skip from the beginning of the record list.
polygonGeoJSONPolygonGeometryScalarThe polygon of the vessels whose behavioral timeline is returned.
timeRangeClosedDateTimeRangeInput!The time range within which the returned behavioral timelines have occurred.

Returns

NameDescription
VesselsInAreaConnection!The vessels in the area specified by the vesselsInArea query input (the object constitutes the response of the query).

VesselsInAreaConnection Fields

NameTypeDescription
nodes[VesselIntelligence]The vessels in the area specified by the vesselsInArea query input.
totalCountNonNegativeInt!The number of vessel nodes returned.

Example Code

Sample Query

query VesselsInArea($input: VesselsInAreaInput!, $activitiesInPolygonInput2: ActivitiesInPolygonInput!) {
  vesselsInArea(input: $input) {
    nodes {
      flag
      imo
      mmsi
    }
    totalCount
  } 
}

Variables

{
  "input": {
    "area": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            113.258057,
            19.823202
          ],
          [
            113.258057,
            23.007113
          ],
          [
            120.629883,
            23.007113
          ],
          [
            120.629883,
            19.823202
          ],
          [
            113.258057,
            19.823202
          ]
        ]
      ]
    },
    "limit": 5,
    "offset": 0,
    "timeRange": {
      "from": "2022-11-01T00:00:00Z",
      "to": "2022-12-01T00:00:00Z"
    }
  }
}

Response

{
  "data": {
    "vesselsInArea": {
      "nodes": [
        {
          "flag": "HongKong",
          "imo": 9266126,
          "mmsi": 477652500
        },
        {
          "flag": "Panama",
          "imo": 9523811,
          "mmsi": 371401000
        },
        {
          "flag": "Panama",
          "imo": 9643192,
          "mmsi": 373176000
        },
        {
          "flag": "China",
          "imo": 9590058,
          "mmsi": 414467000
        },
        {
          "flag": "Liberia",
          "imo": 9708746,
          "mmsi": 636022084
        }
      ],
      "totalCount": 29087
    }
  }
}