vesselsInPort

Returns a list of vessels in a selected port and time period.

Query Schema

type Query {
   vesselsInPort(input: VesselsInPortInput!): VesselsInPortConnection!
}

Arguments

NameTypeDescription
inputVesselsInPortInput!Filters the returned vessels by the port location and time range.

Schema

input VesselsInPortInput {
  polygonId: ObjectId!
  timeRange: DateTimeRange
  limit: PositiveInt! = 100
  offset: NonNegativeInt! = 0
}

VesselsInPortInput Fields

NameTypeDescription
limitPositiveInt!The maximal number of records to return.
offsetNonNegativeInt!The number of returned records to skip from the beginning of the record list.
polygonIdObjectId!The unique Windward assigned ID of the port polygon.
timeRangeDateTimeRangeThe time range within which the vessels have visited the port.

Returns

NameDescription
VesselsInPortConnection!The vessels in the port specified by the vesselsInPort query input (the object constitutes the response of the query).

VesselsInPortConnection Fields

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

Example Code

Sample Query

query VesselsInPort($input: VesselsInPortInput!) {
  vesselsInPort(input: $input) {
    nodes {
      name
      imo
      mmsi
      class
      length
      flag
      lastPortCall {
        startDate
      }
      subClass
      complianceRisk {
        isSanctioned
        riskySince
        buildingBlocks {
          name
          count
          program
          level
        }
      }
      smugglingRisk {
        score
        level
        riskySince
      }
    }
  }
}

Variables

{
 "input": {
   "polygonId": "5358fc78b68ca120a07db9d3",
   "limit": 500,
   "offset": 0
}

Response

{
  "data": {
    "vesselsInPort": {
      "nodes": [
        {
          "id": "5a204738ecf23551a128bcf3",
          "name": "ASHDOD",
          "imo": 9771286,
          "mmsi": 428074000,
          "class": "ServiceVessel",
          "length": 30,
          "flag": "Israel",
          "status": null,
          "grosstonnage": 462,
          "lastPortCall": {
            "id": "622709b2ea395acbbbe6af90",
            "type": "PORT_CALL",
            "startDate": "2022-03-08T07:45:54.000Z",
            "endDate": null,
            "previousPortId": null,
            "nextPortId": null,
            "vesselId": "5a204738ecf23551a128bcf3",
            "formerMMSI": null,
            "endCoordinate": null,
            "startCoordinate": [
              34.64069,
              31.83045
            ],
            "duration": null,
            "description": null
          },
          "callsign": "4XJB",
          "subClass": "Tug",
          "draught": 6,
          "insurer": null,
          "historicalNames": [
            "VECTRAII"
          ],
          "complianceRisk": {
            "imo": "9771286",
            "level": "Low",
            "program": null,
            "isSanctioned": false,
            "riskySince": null,
            "buildingBlocks": [
              {
                "name": "DARK_ACTIVITY",
                "count": null,
                "program": null,
                "recentActivityStartDate": null,
                "level": "Low"
              },
              {
                "name": "MEETING",
                "count": null,
                "program": null,
                "recentActivityStartDate": null,
                "level": "Low"
              },
            ]
          },
          "smugglingRisk": {
            "indicators": [],
            "score": 0,
            "level": "Low",
            "riskySince": "2021-07-11T00:00:00.000Z"
          },
          "riskAssessment": {
            "iuuFishingRisk": null
          },
          "pscInspections": []
        },
         .
         .
         .
        {
          "id": "5908d4011164ed48c479e8ac",
          "name": "ASHDOD PORT",
          "imo": null,
          "mmsi": 4282000,
          "class": null,
          "length": 236,
          "flag": "Israel",
          "status": null,
          "grosstonnage": null,
          "lastPortCall": {
            "id": "6294eed2ee719177c71b0abc",
            "type": "PORT_CALL",
            "startDate": "2022-05-30T16:20:34.000Z",
            "endDate": null,
            "previousPortId": null,
            "nextPortId": null,
            "vesselId": "5908d4011164ed48c479e8ac",
            "formerMMSI": null,
            "endCoordinate": null,
            "startCoordinate": [
              34.64008,
              31.83119
            ],
            "duration": null,
            "description": null
          },
          "callsign": null,
          "subClass": null,
          "draught": null,
          "insurer": null,
          "historicalNames": null,
          "complianceRisk": {
            "imo": null,
            "level": "Low",
            "program": null,
            "isSanctioned": null,
            "riskySince": null,
            "buildingBlocks": null
          },
          "smugglingRisk": {
            "indicators": [],
            "score": 0,
            "level": "Low",
            "riskySince": "2021-07-11T00:00:00.000Z"
          },
          "riskAssessment": {
            "iuuFishingRisk": null
          },
          "pscInspections": []
        }
      ]
    }
  }
}