Skylight GraphQL API Reference
This page will help you get up and running with Skylight’s GraphQL API. The API can be used to retrieve the same maritime events that are available in Skylight's web interface.
The Skylight API provides response data in a JSON format. If you are interested in retrieving data from Skylight as a map layer, please see the following post on How to show Skylight events in Google Earth.
Before getting started, you will need to have valid login credentials for Skylight. These can be the same credentials that you use for the Skylight web interface.
If you do not already have a Skylight account, please contact us to request an account.
For more information about the Skylight platform, please visit our website.
Terms of Service
API Endpoints
# Production:
https://api.skylight.earth/graphql
Headers
Authorization: Bearer <YOUR_TOKEN_HERE>
Authentication
To authenticate with the Skylight API, you will need to include a valid Skylight username and password in a getToken
request:
curl -X POST \
-H "Content-Type: application/json" \
-d '{"query":"{getToken(username: \"YOUR_SKYLIGHT_USERNAME\", password: \"YOUR_SKYLIGHT_PASSWORD\") \
{access_token expires_in}}"}' \
https://api.skylight.earth/graphql
The response will contain an access_token
value to be used in subsequent API requests:
{
"data": {
"getToken": {
"access_token": "YYOdIqB48ZDS3OJpWHJxrjku1Gh0Yl",
"expires_in": 86400
}
}
}
Once you have an access_token
, you can use it to authenticate your requests by including the access token in the Authorization
header:
curl -X POST \
-H 'Authorization: Bearer $ACCESS_TOKEN' \
-H "Content-Type: application/json" \
-d '{"query":"{vessel(vesselId: \"B:735058020:1719441624:822782:817302\"){vessel_id flag flag_code mmsi}}"}' \
https://api.skylight.earth/graphql
Access tokens are valid for 24 hours from the time of issue. Requesting a new access token will automatically revoke any previously issued tokens.
Vector Tile APIs
Many clients of Skylight want to be able to quickly visualize large amounts of geospatial data on a map. One way to do this efficiently is to use vector tiles. The Skylight API in particular supports the use of Mapbox Vector Tiles for several of our datasets.
The Vector Tile APIs use the same request object structure as their corresponding GraphQL APIs, but the response is formatted in a protobuf encoded vector tile of the geometry features with a subset of the properties attached to each feature. For vector tile APIs, submit the request query as a json encoded string in the query
parameter in the URL.
Track Subpath Vector Tiles - /vectorTiles/trackSubpath/{z}/{x}/{y}
Corresponding GraphQL API searchTrackSubpaths.
Vector Tile specific request parameters
z
,x
,y
: These represent the grid location of the tile being requested. These values will typically be provided by your mapping library. These values are used to determine the bounding box of the tile being requested, and replace theintersects_geometry
parameter in the GraphQL API. You cannot use theintersects_geometry
parameter when requesting vector tiles. Unless the query is limited to a specific vessel via themmsi
ortrack_id
parameter, Track Subpath Tiles require a minimum zoom level (z
) of 8.geometry_field
: This specifies which geometry field you want to receive features for, as vector tiles can only return a single layer of features at a time. To build multiple layers, you will need to make multiple requests.
Available values arepath_geometry
which includes the linestring of the track subpath, andmidpoint_geometry
which is a point for the middle of the track subpath.- All Track Subpath vector tile requests MUST include a
start_time
andend_time
parameter. For searches not limited to a specific vesselmmsi
ortrack_id
, the time range must be less than 31 days. limit
,offset
,sortBy
: These parameters are not available for vector tile requests, as vector tiles always include all features within that tile, and the results are unsorted.
curl -G "https://api.skylight.earth/vectorTiles/trackSubpath/9/1/2" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
--data-urlencode 'query={"geometry_field":"path_geometry","start_time":{"lte":"2024-10-07T03:55:35Z"},"end_time":{"gte":"2024-10-05T03:55:35Z"}}'
Pagination
There are two ways to paginate through datasets using the Skylight API:
1. Search After (Recommended)
Search After is a methodology of paginating by using a field with a unique and sortable value, and paginating by using the sort field as a filter in future queries. For example to search for all events that occurred on September 1st, 2024, you would apply a date filter to the startTime
field, and sort the results by created
in ascending order. After each page, update the created.gt
filter to the created
of the last record in the previous page.
searchEventsV2(
startTime: { 'gte': '2024-09-01T00:00:00Z', 'lt': '2024-09-02T00:00:00Z'},
sortBy: "created",
sortDirection: "asc"
) {
events {
... # your fields here
created
}
}
And then find the maximum created
timestamp from the first page and use that as the created.gt
value for the next page:
searchEventsV2(
startTime: { 'gte': '2024-09-01T00:00:00Z', 'lt': '2024-09-02T00:00:00Z'},
created: { 'gt': '2024-09-01T01:12:34Z'},
sortBy: "created",
sortDirection: "asc"
) {
events {
... # your fields here
created
}
}
2. Limit / Offset
We do also support traditional paginating through datasets with limit
and offset
parameters. However, we restrict limit + offset
to 10,000 records, and performance of those later queries will degrade as the offset increases. We recommend using Search After if you are loading all pages in a programmatic way. Limit / Offset can be more appropriate for User Interfaces where a user is manually paginating through the data, and likely to only look at a few pages.
searchEventsV2(
startTime: { 'gte': '2024-09-01T00:00:00Z', 'lt': '2024-09-02T00:00:00Z'},
limit: 100,
offset: 400
) {
records { /* Your field here */ }
}
Using Snapshots for Consistent Pagination
Several datasets within Skylight are updated at a very high frequency and so paginating may result in missing or duplicated results dependent on the paging strategy. To provide a consistent snapshot of the data, we expose a snapshotId
field on these datasets to request the backend database to provide a consistent snapshot of the data.
For the first request, send the value of "true"
for the snapshotId
field to request a new snapshot. The snapshotId
will be returned in the meta.snapshotId
field of the response:
searchEventsV2(
startTime: { 'gte': '2024-09-01T00:00:00Z', 'lt': '2024-09-02T00:00:00Z'},
snapshotId: "true"
) {
records { /* Your field here */ }
meta { snapshotId }
}
For subsequent requests, use the snapshotId
value returned in the meta.snapshotId
:
searchEventsV2(
startTime: { 'gte': '2024-09-01T00:00:00Z', 'lt': '2024-09-02T00:00:00Z'},
snapshotId: "1234567890"
) {
records { /* Your field here */ }
meta { snapshotId }
}
A snapshot is kept open for 1 minute after a request, as long as you are making additional requests with the same snapshotId
the snapshot will remain open. If you do not make a request within 1 minute, the snapshot will be be closed.
Snapshots are are only available on frequently updated datasets that contain the snapshotId
field in the input of the search query. If the snapshotId
field is not present in the input, then the dataset does not support snapshots.
Queries
aoi
Description
Get Areas of Interest (AOIs) associated with the active user
Response
Returns [AOI]
Example
Query
query Aoi {
aoi {
accessible_by
created_by
geometry {
type
coordinates
geometries {
...GeometryFragment
}
}
owned_by
properties {
aoi_id
area_km2
description
name
}
status
}
}
Response
{
"data": {
"aoi": [
{
"accessible_by": [
"6120123fbc8f8661da8a5332",
"61b78c70f6f2af542642dc47"
],
"created_by": "6120123fbc8f8661da8a5332",
"geometry": Geometry,
"owned_by": "6120123fbc8f8661da8a5332",
"properties": "'aoi_id': '1c1ea98b-9120-414a-a38f-e6e25964edf3', 'name': 'Cook Islands'",
"status": "active"
}
]
}
}
event
Description
Returns a specific event by event_id
Response
Returns an Event
Arguments
Name | Description |
---|---|
eventId - ID!
|
Event ID (unique to the Skylight platform) |
Example
Query
query Event($eventId: ID!) {
event(eventId: $eventId) {
event_id
event_type
start {
point {
...PointFragment
}
time
}
vessels {
vessel_0 {
...EmbeddedVesselFragment
}
vessel_1 {
...EmbeddedVesselFragment
}
}
event_details {
average_speed
data_source
distance
duration
correlated
estimated_length
image_url
meters_per_pixel
orientation
entry_speed
entry_heading
end_heading
visit_type
radiance_nw
nanowatts
satellite_name
scan_angle
vendor_vessel {
...VendorVesselFragment
}
}
end {
point {
...PointFragment
}
time
}
user_params {
params_id
user_id
aoi_id
speed_min
speed_max
display_unit
filter_type
min_distance
min_duration
}
}
}
Variables
{"eventId": "B:224083590:1639013658:1643050:882604:1723421649:1723423470"}
Response
{
"data": {
"event": {
"event_id": "A:2:B:574818815:1583069236:2869119:991497:B:941001963:1681300510:2891104:996132:1723418820",
"event_type": "standard_rendezvous",
"start": "'point': { 'lat': -20.695788333333333, 'lon': -105.37488166666667},",
"vessels": "'vessel_0': { 'vessel_id': 'B:232301543:1697131710:676214:725822', 'track_id': 'B:232301543:1697131710:676214:725822'}",
"event_details": "'data_source': 'noaa', 'nanowatts': 16.51",
"end": "'point': { 'lat': 17.78}",
"user_params": "'aoi_id': '5823daa5-e036-4c6c-acae-e20bdbdc7175', 'user_id': '6120123fbc8f8661da8a5332'"
}
}
}
events
Description
Returns events by event_type. A maximum of 10,000 events are returned
Response
Returns an Events
Arguments
Name | Description |
---|---|
aoiId - String
|
Filter results to events that occurred within the given AOI (Area of Interest) ID (unique to the Skylight platform) |
detectionType - DetectionType
|
See detectionType below for list of options |
vesselCategory - [VesselCategory]
|
Vessel category from AIS |
countryCodes - String
|
Filter results to events that include a vessel with the given ISO 3166-1 alpha-3 country codes. Separate each code using '|'. example: USA or USA|CHN. To include vessels with no country, use code 'N/A' |
countryCodesExclude - String
|
ISO 3166-1 alpha-3 country codes to exclude. Separate each code using '|'. example: USA or USA|CHN. To exclude vessels with no country, use code 'N/A' |
eventTypes - [EventType]!
|
See eventTypes below for list of options |
inProgressStatus - Boolean
|
Event is currently in progress (true or false) |
pageSize - Int
|
For paginated results, number of items to return per page. Default = 25 |
pageNum - Int
|
For paginated results, return a specific page. Default = 1 |
polygon - String
|
GeoJSON spatial filter expressed as an array of geo-coordinates |
startTime - String
|
Filter results to events that started after the specified time. Value must be an ISO 8601 formatted timestamp |
endTime - String
|
Filter results to events that started before the specified time. Value must be an ISO 8601 formatted timestamp |
vesselId - String
|
Filter results to events that contain a specific vessel by Vessel ID (unique to the Skylight platform) |
Example
Query
query Events(
$aoiId: String,
$detectionType: DetectionType,
$vesselCategory: [VesselCategory],
$countryCodes: String,
$countryCodesExclude: String,
$eventTypes: [EventType]!,
$inProgressStatus: Boolean,
$pageSize: Int,
$pageNum: Int,
$polygon: String,
$startTime: String,
$endTime: String,
$vesselId: String
) {
events(
aoiId: $aoiId,
detectionType: $detectionType,
vesselCategory: $vesselCategory,
countryCodes: $countryCodes,
countryCodesExclude: $countryCodesExclude,
eventTypes: $eventTypes,
inProgressStatus: $inProgressStatus,
pageSize: $pageSize,
pageNum: $pageNum,
polygon: $polygon,
startTime: $startTime,
endTime: $endTime,
vesselId: $vesselId
) {
items {
event_id
event_type
start {
...StartEndFragment
}
vessels {
...EmbeddedVesselsFragment
}
event_details {
...EventDetailsFragment
}
end {
...StartEndFragment
}
user_params {
...UserParamsFragment
}
}
meta {
pageNum
total
pageSize
}
}
}
Variables
{
"aoiId": "68d4c7d2-5971-4b34-8d81-173f21e20b09",
"detectionType": "ais_correlated",
"vesselCategory": "cargo",
"countryCodes": "TTO|BRB|SUR|GUY",
"countryCodesExclude": "ESP|FRA|ITA|PRT",
"eventTypes": "[ standard_rendezvous, dark_rendezvous ]",
"inProgressStatus": false,
"pageSize": 10,
"pageNum": 3,
"polygon": [[[100, -5], [100, 5], [120, 5], [120, -5], [100, -5]]],
"startTime": "2023-02-20T00:47:43+00:00",
"endTime": "2024-02-20T00:02:23+00:00",
"vesselId": "B:477855500:1683545750:2148570:580209"
}
Response
{
"data": {
"events": {
"items": [
"'event_id': 'S1A_IW_GRDH_1SDV_20240122T000056_20240122T000121_052212_064FD2_E31E.SAFE_7', 'event_type': 'detection', 'start': { 'time': '2024-01-22T00:00:56.745000+00:00' }"
],
"meta": "'pageSize': 1, 'pageNum': 1, 'total': 1504913"
}
}
}
getToken
Description
Get access Bearer token for authentication. This token is valid for 24 hours, or until another login session is started.
Response
Returns a Token
Example
Query
query GetToken(
$username: String!,
$password: String!
) {
getToken(
username: $username,
password: $password
) {
access_token
expires_in
refresh_token
token_type
}
}
Variables
{"username": "my_username@gmail.com", "password": "m#P52s@ap$V"}
Response
{
"data": {
"getToken": {
"access_token": "zOrUKsEIlqTGxNbFMdKwRvTO9utjuA",
"expires_in": 86400,
"refresh_token": "2fPyXZTWXggd3Bjw0Doc2QyCzn9n79",
"token_type": "Bearer"
}
}
}
satelliteFrame
Description
Returns satellite frame by frameId
Response
Returns a SatelliteFrame
Arguments
Name | Description |
---|---|
frameId - String
|
Frame ID (unique to the Skylight platform) |
Example
Query
query SatelliteFrame($frameId: String) {
satelliteFrame(frameId: $frameId) {
targets {
dark_count
correlated_count
}
data_source
vendor_id
frame_id
collected_at
frame_extents {
type
coordinates
geometries {
...GeometryFragment
}
}
created
updated
}
}
Variables
{"frameId": "89df8216001cfc89fc0f3e6aeee50e41203505ee"}
Response
{
"data": {
"satelliteFrame": {
"targets": "'correlated_count': 3, 'dark_count': 4",
"data_source": "sentinel1",
"vendor_id": "S1A_IW_GRDH_1SDV_20240801T000005_20240801T000030_055012_06B3B6_DFA6.SAFE",
"frame_id": "70920c186ebf8cf91e26fa39ad1d84798c151a29",
"collected_at": "2024-08-01T00:00:05.673426Z",
"frame_extents": "'coordinates': [[[ 149.72206068616023, 8.132910271150813 ], [ 149.7157847342396, 7.140816954677312 ], [ 150.7085993421091, 7.133901712573143 ], [ 150.71715846458056, 8.125022545190241 ], [ 149.72206068616023, 8.132910271150813 ]]], 'type': 'Polygon' }",
"created": "2024-08-01T03:49:49.158082Z",
"updated": "2024-08-01T03:49:49.158082Z"
}
}
}
satelliteFrames
Description
Returns satellite frames, representing the spatial extent of the data frame captured by a satellite's sensors or cameras. Individual frames may contain zero or more vessel detections, including detections that have been correlated with AIS.
Response
Returns a SatelliteFrames
Arguments
Name | Description |
---|---|
startTime - String
|
Filter results to frames that were collected after the specified time. Value must be an ISO 8601 formatted timestamp |
endTime - String
|
Filter results to frames that were collected before the specified time. Value must be an ISO 8601 formatted timestamp |
pageSize - Int
|
For paginated results, number of items to return per page. Default = 25 |
pageNum - Int
|
For paginated results, request a specific page number. Default = 1 |
eventTypes - [FrameEventType]
|
Event types to filter by. Default = [sar_sentinel1, eo_sentinel2] |
polygon - [Float]
|
GeoJSON spatial filter expressed as an array of geo-coordinates. Specifying this field causes only satellite frames which overlap this polygon to be returned. |
Example
Query
query SatelliteFrames(
$startTime: String,
$endTime: String,
$pageSize: Int,
$pageNum: Int,
$eventTypes: [FrameEventType],
$polygon: [Float]
) {
satelliteFrames(
startTime: $startTime,
endTime: $endTime,
pageSize: $pageSize,
pageNum: $pageNum,
eventTypes: $eventTypes,
polygon: $polygon
) {
items {
targets {
...SatelliteFrameTargetsFragment
}
data_source
vendor_id
frame_id
collected_at
frame_extents {
...GeometryFragment
}
created
updated
}
meta {
pageNum
total
pageSize
}
}
}
Variables
{
"startTime": "2023-02-20T11:24:47.137000+00:00",
"endTime": "2024-02-13T08:11:12.146000+00:00",
"pageSize": 10,
"pageNum": 5,
"eventTypes": ["sar_sentinel1", "eo_sentinel2"],
"polygon": [[[100, -5], [100, 5], [120, 5], [120, -5], [100, -5]]]
}
Response
{
"data": {
"satelliteFrames": {
"items": [
"{ 'targets': { 'correlated_count':3, 'dark_count':107 }, 'data_source':'sentinel1', 'vendor_id':'S1A_IW_GRDH_1SDV_20240813T000004_20240813T000029_055187_06B9EC_7D70.SAFE', 'frame_id':'0fbb541ec9cf8c5f4ba63ffa41bab089be0c9a17', 'collected_at':'2024-08-13T00:00:04.781000Z', 'frame_extents':{ 'coordinates':[[[ -89.15052, 20.4076 ],[ -86.712234, 20.841209 ], [ -87.004501, 22.347897 ], [ -89.468567, 21.917629 ], [ -89.15052, 20.4076 ]]], 'type':'Polygon' }, 'created':'2024-08-13T09:49:59.520600Z', 'updated':'2024-08-13T09:49:59.540989Z' }"
],
"meta": "'pageNum': 1. 'pageSize': 0, 'total': 1312"
}
}
}
searchAOIs
Description
Search for Areas of Interest (AOIs)
This query filters AOIs by the user ID associated with the API token. However, if the query specifies id.eq
or id.inc
, the user ID filter is not applied, which allows AOIs to be shared with other users.
Response
Returns a SearchAOIsOutput
Arguments
Name | Description |
---|---|
id - KeywordFilter
|
AOI ID filter |
name - StringFilter
|
AOI name filter |
status - AoiStatus
|
AOI Status to filter by. Valid values:
|
intersectsGeometry - GeometryInput
|
Return AOIs that intersect with the provided geometry Note: only |
areaKm2 - FloatFilter
|
Area in square kilometers filter |
createdAt - DateFilter
|
Created date filter |
updatedAt - DateFilter
|
Updated date filter |
limit - Int
|
Limit results displayed per page |
offset - Int
|
Offset into paginated results |
sortBy - AoiSortBy
|
Sort AOIs by the specified field. Default = name |
sortDirection - SortDirection
|
Sort direction. Default = asc |
Example
Query
query SearchAOIs(
$id: KeywordFilter,
$name: StringFilter,
$status: AoiStatus,
$intersectsGeometry: GeometryInput,
$areaKm2: FloatFilter,
$createdAt: DateFilter,
$updatedAt: DateFilter,
$limit: Int,
$offset: Int,
$sortBy: AoiSortBy,
$sortDirection: SortDirection
) {
searchAOIs(
id: $id,
name: $name,
status: $status,
intersectsGeometry: $intersectsGeometry,
areaKm2: $areaKm2,
createdAt: $createdAt,
updatedAt: $updatedAt,
limit: $limit,
offset: $offset,
sortBy: $sortBy,
sortDirection: $sortDirection
) {
records {
id
userId
accessibleBy
properties {
...AoiPropertiesV2Fragment
}
status
geometry {
...GeometryFragment
}
createdAt
updatedAt
}
meta {
total
snapshotId
}
}
}
Variables
{
"id": KeywordFilter,
"name": StringFilter,
"status": "active",
"intersectsGeometry": GeometryInput,
"areaKm2": FloatFilter,
"createdAt": DateFilter,
"updatedAt": DateFilter,
"limit": 987,
"offset": 987,
"sortBy": "name",
"sortDirection": "asc"
}
Response
{
"data": {
"searchAOIs": {
"records": [AOIv2],
"meta": MetaV2
}
}
}
searchTrackSubpaths
Description
Search for Track Subpaths. Track Subpaths are generated from AIS positions, and represent a vessel's movement.
Searching for Subpaths require at least one of the following:
- One or more specific
track_id
ormmsi
values provided via theeq
orinc
options. - OR A maximum time range of 1 month and an
intersects_geometry
search area of less than 1000 km^2.
Also available as a Vector Tile endpoint.
Response
Returns a SearchTracksSubpathOutput
Arguments
Name | Description |
---|---|
subpathId - KeywordFilter
|
Track Subpath ID filter. Will return a track subpath with the specified subpathId |
trackId - KeywordFilter
|
Track ID filter. Will return all Track Subpaths with the specified trackId. Unique to the Skylight platform |
mmsi - IntFilter
|
MMSI filter |
meanSog - FloatFilter
|
Mean speed over ground (SOG) filter, in km/h |
startTime - DateFilter
|
Start Time filter |
endTime - DateFilter
|
End Time filter |
intersectsGeometry - GeometryInput
|
Intersects Geometry filter. GeoJSON spatial filter expressed as a Geojson formatted Polygon. Specifying this field causes only tracks which intersect with this polygon to be returned. Not available for vector tile endpoint |
activityClassification - ActivityClassificationKeywordFilter
|
Activity Classification Filter. Can be any value of TrackSubpathActivityClassification |
geometryField - TrackSubpathGeometryField
|
Geometry Field. Only used for vector tiles to indicate which field to base the geometry coordinates around. Can be: path_geometry or midpoint_geometry |
createdAt - DateFilter
|
Filter by the createdAt field on the Track Subpath. This is the timestamp that the record was intiially inserted into the Skylight Database |
updatedAt - DateFilter
|
Filter by the updatedAt timestamp on the Track Subpath records. Track Subpaths are typically updated once when they are complete and then once when they are classified. |
numPositions - IntFilter
|
Number of AIS position messages received during this Track Subpath |
limit - Int
|
Limit the number of results displayed per page (default 10) |
offset - Int
|
Offset into paginated results |
sortBy - TrackSubpathSortBy
|
Sort Tracks by the specified field |
sortDirection - SortDirection
|
Sort direction. Default = asc |
snapshotId - String
|
Snapshot Id used for pagination. Pass a value of true on the first request to request a new snapshot to be generated. The snapshotId will be returned in the meta {} object of the response. |
Example
Query
query SearchTrackSubpaths(
$subpathId: KeywordFilter,
$trackId: KeywordFilter,
$mmsi: IntFilter,
$meanSog: FloatFilter,
$startTime: DateFilter,
$endTime: DateFilter,
$intersectsGeometry: GeometryInput,
$activityClassification: ActivityClassificationKeywordFilter,
$geometryField: TrackSubpathGeometryField,
$createdAt: DateFilter,
$updatedAt: DateFilter,
$numPositions: IntFilter,
$limit: Int,
$offset: Int,
$sortBy: TrackSubpathSortBy,
$sortDirection: SortDirection,
$snapshotId: String
) {
searchTrackSubpaths(
subpathId: $subpathId,
trackId: $trackId,
mmsi: $mmsi,
meanSog: $meanSog,
startTime: $startTime,
endTime: $endTime,
intersectsGeometry: $intersectsGeometry,
activityClassification: $activityClassification,
geometryField: $geometryField,
createdAt: $createdAt,
updatedAt: $updatedAt,
numPositions: $numPositions,
limit: $limit,
offset: $offset,
sortBy: $sortBy,
sortDirection: $sortDirection,
snapshotId: $snapshotId
) {
records {
subpathId
trackId
mmsi
meanSog
cog
numPositions
startTime
endTime
startLocation {
...PointFragment
}
endLocation {
...PointFragment
}
pathGeometry {
...GeometryFragment
}
midpointGeometry {
...PointFragment
}
midpointCog
activityClassification
createdAt
updatedAt
}
meta {
total
snapshotId
}
}
}
Variables
{
"subpathId": {"eq": "d5011951-d323-4e64-9cf5-1f767ffb2bed"},
"trackId": {"eq": "B:563034920:1709283241:2837054:903124"},
"mmsi": {"eq": 368156470},
"meanSog": {"gt": 10},
"startTime": {"gte": "2021-01-01T00:00:00Z"},
"endTime": {"lte": "2021-01-01T00:00:00Z"},
"intersectsGeometry": {
"type": "Polygon",
"coordinates": [[[100, -5], [100, 5], [120, 5], [120, -5], [100, -5]]]
},
"activityClassification": {"eq": "transiting"},
"geometryField": "\"eq\": 'path_geometry'}",
"createdAt": {"lte": "2021-01-01T00:00:00Z"},
"updatedAt": {"lte": "2021-01-01T00:00:00Z"},
"numPositions": {"gte": 10},
"limit": 10,
"offset": 0,
"sortBy": "start_time",
"sortDirection": "asc",
"snapshotId": "eyJ0cmFja0lk"
}
Response
{
"data": {
"searchTrackSubpaths": {
"records": [TrackSubpath],
"meta": MetaV2
}
}
}
trackByEventId
Description
Get vessel tracks by eventId. Track segments are generated from AIS positions, and represent a vessel's movement. Tracks display 48 hours prior to the time of the event itself, and up to 48 hours after the event.
Response
Returns [Track]
Arguments
Name | Description |
---|---|
eventId - String!
|
Event ID (unique to the Skylight platform) |
Example
Query
query TrackByEventId($eventId: String!) {
trackByEventId(eventId: $eventId) {
properties {
cog
mean_sog
segment_type
track_id
start {
...StartEndFragment
}
end {
...StartEndFragment
}
}
geometry {
coordinates
type
}
}
}
Variables
{"eventId": "B:224083590:1639013658:1643050:882604:1723421649:1723423470"}
Response
{
"data": {
"trackByEventId": [
{
"properties": "{ 'cog': 114.5999984741211, 'mean_sog': 6.019, 'end': { 'point': { 'lat': 3.31772, 'lon': -18.810928333333333 }, 'time': '2024-03-03T03:32:31+00:00' }, 'start': { 'point': { 'lat': 3.314005, 'lon': -18.812306666666668 }, 'time': '2024-03-03T03:25:58+00:00' }, 'segment_type': 'TRAVEL', 'track_id': 'B:224083590:1639013658:1643050:882604' }",
"geometry": "{ 'coordinates': [[ -18.812306666666668, 3.314005 ], [ -18.810928333333333, 3.31772 ]], 'type': 'LineString' }"
}
]
}
}
vessel
Description
Returns vessel by vesselId
Response
Returns a Vessel
Arguments
Name | Description |
---|---|
vesselId - String
|
Vessel ID (unique to the Skylight platform) |
mmsi - Int
|
Maritime Mobile Service Identity number |
imo - Int
|
International Maritime Organization number |
callSign - String
|
Filter to vessels with a specific call sign as reported over AIS static messages. Used for ship radio communications. |
Example
Query
query Vessel(
$vesselId: String,
$mmsi: Int,
$imo: Int,
$callSign: String
) {
vessel(
vesselId: $vesselId,
mmsi: $mmsi,
imo: $imo,
callSign: $callSign
) {
ais_type
ais_vessel_type
beneficial_owner
beneficial_owner_country_code
call_sign
country_codes
flag
flag_code
imo
length
mmsi
name
operator
owner
owner_country_code
primary_gear_type
secondary_gear_type
tonnage
vessel_category
vessel_class
vessel_id
vessel_type
width
}
}
Variables
{
"vesselId": "B:224587000:1715446092:1667778:960438",
"mmsi": 368156470,
"imo": 734228700,
"callSign": "HC6695"
}
Response
{
"data": {
"vessel": {
"ais_type": 30,
"ais_vessel_type": "Fishing",
"beneficial_owner": null,
"beneficial_owner_country_code": null,
"call_sign": "HPYR",
"country_codes": ["['ESP'],"],
"flag": "Spain",
"flag_code": "ESP",
"imo": 224933000,
"length": 28,
"mmsi": 224933000,
"name": "AGIOS NIKOLAUS",
"operator": null,
"owner": null,
"owner_country_code": null,
"primary_gear_type": null,
"secondary_gear_type": null,
"tonnage": null,
"vessel_category": "fishing",
"vessel_class": "vessel",
"vessel_id": "B:224933000:1681376115:1580146:1000022",
"vessel_type": "other fishing",
"width": 10
}
}
}
vesselLkp
Description
Returns vessel Last Known Position (LKP) by vesselId
Response
Returns a VesselLkp
Arguments
Name | Description |
---|---|
vesselId - String!
|
Vessel ID (unique to the Skylight platform) |
Example
Query
query VesselLkp($vesselId: String!) {
vesselLkp(vesselId: $vesselId) {
vessel_id
track_id
segment_type
time
point {
lat
lon
}
cog
sog
}
}
Variables
{"vesselId": "B:224587000:1715446092:1667778:960438"}
Response
{
"data": {
"vesselLkp": {
"vessel_id": "B:224072680:1509689832:1801369:1285668",
"track_id": "B:224072680:1683616772:1769799:1267433",
"segment_type": null,
"time": "2023-03-28T01:29:37+00:00",
"point": Point,
"cog": 62.29999923706055,
"sog": 13.899999618530273
}
}
}
Mutations
createAOI
Description
Response
Returns an AOIv2
Arguments
Name | Description |
---|---|
input - CreateAOIInput!
|
Example
Query
mutation CreateAOI($input: CreateAOIInput!) {
createAOI(input: $input) {
id
userId
accessibleBy
properties {
aoiId
aoiType
name
bounds
areaKm2
description
uploadedFile
}
status
geometry {
type
coordinates
geometries {
...GeometryFragment
}
}
createdAt
updatedAt
}
}
Variables
{"input": CreateAOIInput}
Response
{
"data": {
"createAOI": {
"id": "1c1ea98b-9120-414a-a38f-e6e25964edf3",
"userId": "6120123fbc8f8661da8a5332",
"accessibleBy": ["6120123fbc8f8661da8a5332", "61b78c70f6f2af542642dc47"],
"properties": AoiPropertiesV2,
"status": "active",
"geometry": Geometry,
"createdAt": "2021-09-01T00:00:00Z",
"updatedAt": "2021-09-01T00:00:00Z"
}
}
}
deleteAOI
Description
Response
Returns a DeleteResourceOutput
Arguments
Name | Description |
---|---|
input - DeleteResourceInput!
|
Example
Query
mutation DeleteAOI($input: DeleteResourceInput!) {
deleteAOI(input: $input) {
deleted
}
}
Variables
{"input": DeleteResourceInput}
Response
{"data": {"deleteAOI": {"deleted": false}}}
updateAOI
Description
Response
Returns an AOIv2
Arguments
Name | Description |
---|---|
input - UpdateAOIInput!
|
Example
Query
mutation UpdateAOI($input: UpdateAOIInput!) {
updateAOI(input: $input) {
id
userId
accessibleBy
properties {
aoiId
aoiType
name
bounds
areaKm2
description
uploadedFile
}
status
geometry {
type
coordinates
geometries {
...GeometryFragment
}
}
createdAt
updatedAt
}
}
Variables
{"input": UpdateAOIInput}
Response
{
"data": {
"updateAOI": {
"id": "1c1ea98b-9120-414a-a38f-e6e25964edf3",
"userId": "6120123fbc8f8661da8a5332",
"accessibleBy": ["6120123fbc8f8661da8a5332", "61b78c70f6f2af542642dc47"],
"properties": AoiPropertiesV2,
"status": "active",
"geometry": Geometry,
"createdAt": "2021-09-01T00:00:00Z",
"updatedAt": "2021-09-01T00:00:00Z"
}
}
}
Types
AOI
Fields
Field Name | Description |
---|---|
accessible_by - [String]
|
List of Skylight user IDs for those users that have access to the Area of Interest (AOI) |
created_by - String
|
User ID of the AOI creator |
geometry - Geometry
|
AOI geometry in GeoJSON format |
owned_by - String
|
User ID of the AOI owner |
properties - AoiProperties
|
Additional AOI properties |
status - AoiStatus
|
AOI status (possible values are 'active' and 'inactive') |
Example
{
"accessible_by": ["6120123fbc8f8661da8a5332", "61b78c70f6f2af542642dc47"],
"created_by": "6120123fbc8f8661da8a5332",
"geometry": Geometry,
"owned_by": "6120123fbc8f8661da8a5332",
"properties": "'aoi_id': '1c1ea98b-9120-414a-a38f-e6e25964edf3', 'name': 'Cook Islands'",
"status": "active"
}
AOIv2
Fields
Field Name | Description |
---|---|
id - String
|
Unique identifier for the AOI |
userId - String
|
User ID of the AOI owner |
accessibleBy - [String]
|
List of Skylight user IDs for those users that have access to the Area of Interest (AOI) |
properties - AoiPropertiesV2
|
Additional AOI properties |
status - AoiStatus
|
AOI status (possible values are 'active' and 'inactive') |
geometry - Geometry
|
AOI geometry in GeoJSON format |
createdAt - String
|
Date and time the AOI was created |
updatedAt - String
|
Date and time the AOI was last updated |
Example
{
"id": "1c1ea98b-9120-414a-a38f-e6e25964edf3",
"userId": "6120123fbc8f8661da8a5332",
"accessibleBy": ["6120123fbc8f8661da8a5332", "61b78c70f6f2af542642dc47"],
"properties": AoiPropertiesV2,
"status": "active",
"geometry": Geometry,
"createdAt": "2021-09-01T00:00:00Z",
"updatedAt": "2021-09-01T00:00:00Z"
}
ActivityClassificationKeywordFilter
Fields
Input Field | Description |
---|---|
eq - TrackSubpathActivityClassification
|
Equal to |
neq - TrackSubpathActivityClassification
|
Not equal to |
inc - [TrackSubpathActivityClassification]
|
Included in list |
ninc - [TrackSubpathActivityClassification]
|
Not included in list |
Example
{"eq": "anchored", "neq": "anchored", "inc": ["anchored"], "ninc": ["anchored"]}
AoiProperties
Example
{
"aoi_id": "c433769f-f980-4f4f-a83a-b2b1ffbc9e52",
"area_km2": 37398.848690181905,
"description": "AOI for our marine protected area",
"name": "MPA"
}
AoiPropertiesV2
Fields
Field Name | Description |
---|---|
aoiId - String
|
Area of Interest ID (unique to the Skylight platform) |
aoiType - String
|
The type of AOI |
name - String
|
Name assigned by the AOI creator |
bounds - [Float]
|
Boundary coordinates of AOI |
areaKm2 - Float
|
Size of the AOI in square kilometers |
description - String
|
Description assigned by the AOI creator |
uploadedFile - String
|
Name of the uploaded KML file, if applicable |
Example
{
"aoiId": "c433769f-f980-4f4f-a83a-b2b1ffbc9e52",
"aoiType": "custom aoi",
"name": "Monitoring Region A",
"bounds": [0, 0, 1, 1],
"areaKm2": 37398.848690181905,
"description": "AOI for our marine protected area",
"uploadedFile": "file.kml"
}
AoiSortBy
Values
Enum Value | Description |
---|---|
|
Sort by AOI name |
|
Sort by AOI created date |
|
Sort by AOI updated date |
|
Sort by AOI area size |
Example
"name"
AoiStatus
Values
Enum Value | Description |
---|---|
|
AOI will generate events |
|
AOI will not generate events |
Example
"active"
Boolean
Description
The Boolean
scalar type represents true
or false
.
Example
true
CoordinatesJSON
Description
The Coordinates associated with a valid GeoJSON geometry object. See RFC 7946 for more information.
- If
geometry.type=Point
, then this is[Float]
- If
geometry.type=LineString
, then this is[[Float]]
- If
geometry.type=Polygon
, then this is[[[Float]]]
- If
geometry.type=Multipolygon
, then this is[[[[Float]]]]
Example
CoordinatesJSON
CreateAOIInput
Description
Input used to create an AOI
Fields
Input Field | Description |
---|---|
name - String!
|
Name of the AOI |
description - String!
|
Description of the AOI |
geometry - GeometryInput!
|
Geometry of the AOI |
Example
{
"name": "abc123",
"description": "abc123",
"geometry": GeometryInput
}
DateFilter
Description
This query object is used to filter date values. For example, the following field returns records created on January 1, 2024:
created: {gt: "2024-01-01T08:00:00Z", lt: "2024-01-02T08:00:00Z"}
Example
{
"lt": "2024-01-01T08:00:00Z",
"gt": "2024-01-01T08:00:00Z",
"lte": "2024-01-01T08:00:00Z",
"gte": "2024-01-01T08:00:00Z"
}
DeleteResourceInput
Fields
Input Field | Description |
---|---|
id - String!
|
ID of the resource |
Example
{"id": "abc123"}
DeleteResourceOutput
Fields
Field Name | Description |
---|---|
deleted - Boolean!
|
True if the resource was successfully deleted |
Example
{"deleted": true}
DetectionType
Values
Enum Value | Description |
---|---|
|
Whether a satellite detection was successfully correlated with a vessel identified via AIS. 'dark' indicates the detection was not correlated with AIS. |
|
Example
"ais_correlated"
EmbeddedVessel
Fields
Field Name | Description |
---|---|
category - String
|
Vessel category (derived from the AIS Shiptype) |
class - String
|
Vessel class (possible values are 'buoy' and 'vessel') |
country_filter - [String]
|
ISO 3166-1 alpha-3 country code (from AIS position messages) |
display_country - String
|
Full country name (from AIS position messages) |
length - Int
|
Vessel length in meters (from AIS static messages) |
mmsi - Int
|
Maritime Mobile Service Identity number (from AIS position messages) |
name - String
|
Vessel name (from AIS static messages) |
type - String
|
Vessel type (from AIS static messages) |
vessel_id - ID
|
Vessel ID (unique to the Skylight platform) |
track_id - String
|
Vessel track ID (unique to the Skylight platform) |
Example
{
"category": "tanker",
"class": "vessel",
"country_filter": ["ESP"],
"display_country": "Spain",
"length": 26,
"mmsi": 368156470,
"name": "PEPE LASAL UNO",
"type": "other fishing",
"vessel_id": "B:224072680:1509689832:1801369:1285668",
"track_id": "B:224072680:1683616772:1769799:1267433"
}
EmbeddedVessels
Fields
Field Name | Description |
---|---|
vessel_0 - EmbeddedVessel
|
Vessel-specific information for the first vessel involved in the event |
vessel_1 - EmbeddedVessel
|
Vessel-specific information for the second vessel involved in the event (applies only for 'standard_rendezvous' event_type) |
Example
{
"vessel_0": "'vessel_0': { 'vessel_id': 'B:209645000:1509683160:2130094:1246471'}",
"vessel_1": "'vessel_1': { 'vessel_id': 'B:247374600:1509507784:1926115:1342970'}"
}
Event
Fields
Field Name | Description |
---|---|
event_id - String!
|
Event ID (unique to the Skylight platform) |
event_type - EventType
|
The type of event (example: 'dark_rendezvous') |
start - StartEnd
|
Event start location and timestamp |
vessels - EmbeddedVessels
|
Vessel-specific information for the vessels involved in the event |
event_details - EventDetails
|
Event-specific information |
end - StartEnd
|
Event end location and timestamp |
user_params - UserParams
|
Additional event parameters (applies only for 'aoi_visit' and 'speed_range' event types) |
Example
{
"event_id": "A:2:B:574818815:1583069236:2869119:991497:B:941001963:1681300510:2891104:996132:1723418820",
"event_type": "standard_rendezvous",
"start": "'point': { 'lat': -20.695788333333333, 'lon': -105.37488166666667},",
"vessels": "'vessel_0': { 'vessel_id': 'B:232301543:1697131710:676214:725822', 'track_id': 'B:232301543:1697131710:676214:725822'}",
"event_details": "'data_source': 'noaa', 'nanowatts': 16.51",
"end": "'point': { 'lat': 17.78}",
"user_params": "'aoi_id': '5823daa5-e036-4c6c-acae-e20bdbdc7175', 'user_id': '6120123fbc8f8661da8a5332'"
}
EventDetails
Fields
Field Name | Description |
---|---|
average_speed - Float
|
Vessel average speed in knots (applies only for speed_range event_type) |
data_source - String
|
Satellite from which the frame was collected (applies only for detection event types) |
distance - Float
|
Vessel distance traveled in Nautical Miles (applies only for 'speed_range' event_type) |
duration - Int
|
Event duration in minutes (applies only for 'speed_range' event_type) |
correlated - Boolean
|
Whether a satellite detection was successfully correlated with a vessel identified via AIS (applies only for detection event types) |
estimated_length - Float
|
Value will always be null
|
image_url - String
|
Image chip URL location (applies only for detection event types) |
meters_per_pixel - Float
|
Image chip resolution (applies only for detection event types) |
orientation - Float
|
Image chip compass orientation (applies only for detection event types) |
entry_speed - String
|
Vessel speed at event start in knots (applies only for 'aoi_visit' event_type) |
entry_heading - String
|
Vessel heading at event start (applies only for 'aoi_visit' event_type) |
end_heading - String
|
Vessel heading at event end (applies only for 'aoi_visit' event_type) |
visit_type - String
|
Type of entry event (possible values are 'start' and 'end') (applies only for 'aoi_visit' event_type) |
radiance_nw - Float
|
Radiance in nanowatts per square centimeter per steradian (nW/cm²/sr) (applies only for 'viirs' event_type) |
nanowatts - Float
|
Duplicates radiance_nw (see above)
|
satellite_name - String
|
Value will always be null
|
scan_angle - [Float]
|
Scan angle array. Returned values are: pitch, yaw, roll (applies only for 'viirs' event_type) |
vendor_vessel - VendorVessel
|
Additional details (applies only for 'viirs' event_type) |
Example
{
"average_speed": 6.364705871133244,
"data_source": "sentinel1",
"distance": 30.017297236305332,
"duration": 9486,
"correlated": true,
"estimated_length": null,
"image_url": "https://cdn.sky-int-a.skylight.earth/sat-service/sentinel1/detections/2024/08/10/S1A_IW_GRDH_1SDV_20240810T001338_20240810T001403_055143_06B85A_5829.SAFE/image_chips/S1A_IW_GRDH_1SDV_20240810T001338_20240810T001403_055143_06B85A_5829.SAFE_0_vh.png",
"meters_per_pixel": 9,
"orientation": 0,
"entry_speed": 12.199999809265137,
"entry_heading": 51,
"end_heading": 1,
"visit_type": "end",
"radiance_nw": 24.38,
"nanowatts": 24.38,
"satellite_name": null,
"scan_angle": [
"-0.00865897722542286, -0.00865897722542286, -0.00865897722542286]"
],
"vendor_vessel": "'clear_sky_confidence': 1, 'moonlight_illumination': 86"
}
EventType
Values
Enum Value | Description |
---|---|
|
Transhipment event where only one vessel is broadcasting AIS |
|
Fishing event |
|
Speed range event in an Area of Interest (AOI) |
|
Transhipment event where both vessels are broadcasting AIS |
|
Entry event in an Area of Interest (AOI) |
|
Visible Infrared Imaging Radiometer Suite (VIIRS) satellite detection event |
|
European Space Agency Sentinel-1 satellite detection event |
|
European Space Agency Sentinel-2 satellite detection event |
|
NASA Landsat 8 or 9 satellite detection event. Note: This event type is currently in beta testing. |
|
Duplicates 'sar_sentinel1' (see above). This field is deprecated; use 'sar_sentinel1' instead. |
Example
"dark_rendezvous"
Events
Example
{
"items": [
"'event_id': 'S1A_IW_GRDH_1SDV_20240122T000056_20240122T000121_052212_064FD2_E31E.SAFE_7', 'event_type': 'detection', 'start': { 'time': '2024-01-22T00:00:56.745000+00:00' }"
],
"meta": "'pageSize': 1, 'pageNum': 1, 'total': 1504913"
}
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
123.45
FloatFilter
FrameEventType
Values
Enum Value | Description |
---|---|
|
European Space Agency Sentinel-1 satellite detection event |
|
European Space Agency Sentinel-2 satellite detection event |
|
Visible Infrared Imaging Radiometer Suite (VIIRS) satellite detection event |
|
Landsat satellite detection event |
Example
"sar_sentinel1"
Geometry
Fields
Field Name | Description |
---|---|
type - String
|
GeoJSON geometry type (possible values are 'LineString', 'Point', 'Polygon', or 'GeometryCollection') |
coordinates - CoordinatesJSON
|
Collection of GeoJSON coordinates |
geometries - [Geometry]
|
Example
{
"type": "Polygon",
"coordinates": [
[
[-89.15052, 20.4076],
[-86.712234, 20.841209],
[-87.004501, 22.347897],
[-89.468567, 21.917629],
[-89.15052, 20.4076]
]
],
"geometries": ["[{ 'type': 'Point', 'coordinates': [ -89.15052, 20.4076 ]"]
}
GeometryInput
Fields
Input Field | Description |
---|---|
type - String
|
GeoJSON geometry type (possible values are 'LineString', 'Point', and 'Polygon') |
coordinates - CoordinatesJSON
|
Collection of GeoJSON coordinates |
Example
{
"type": "Polygon",
"coordinates": [
[
[-89.15052, 20.4076],
[-86.712234, 20.841209],
[-87.004501, 22.347897],
[-89.468567, 21.917629],
[-89.15052, 20.4076]
]
]
}
ID
Description
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
Example
"4"
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
987
IntFilter
KeywordFilter
Description
This query object is used to filter keyword fields, like IDs.
Example
{
"eq": "xyz789",
"neq": "xyz789",
"inc": ["abc123"],
"ninc": ["abc123"]
}
LineString
Meta
MetaV2
Point
SatelliteFrame
Fields
Field Name | Description |
---|---|
targets - SatelliteFrameTargets
|
Counts of correlated and dark detections within the frame |
data_source - String
|
Satellite from which the frame was collected |
vendor_id - String
|
Vendor ID (unique to the Skylight platform) |
frame_id - String
|
Frame ID (unique to the Skylight platform) |
collected_at - String
|
ISO 8601 formatted timestamp of frame collection |
frame_extents - Geometry
|
Frame geometry in GeoJSON format |
created - String
|
Time that the frame was inserted into the Skylight system. ISO 8601 formatted timestamp. |
updated - String
|
ISO 8601 formatted timestamp of last update to the frame |
Example
{
"targets": "'correlated_count': 3, 'dark_count': 4",
"data_source": "sentinel1",
"vendor_id": "S1A_IW_GRDH_1SDV_20240801T000005_20240801T000030_055012_06B3B6_DFA6.SAFE",
"frame_id": "70920c186ebf8cf91e26fa39ad1d84798c151a29",
"collected_at": "2024-08-01T00:00:05.673426Z",
"frame_extents": "'coordinates': [[[ 149.72206068616023, 8.132910271150813 ], [ 149.7157847342396, 7.140816954677312 ], [ 150.7085993421091, 7.133901712573143 ], [ 150.71715846458056, 8.125022545190241 ], [ 149.72206068616023, 8.132910271150813 ]]], 'type': 'Polygon' }",
"created": "2024-08-01T03:49:49.158082Z",
"updated": "2024-08-01T03:49:49.158082Z"
}
SatelliteFrameTargets
SatelliteFrames
Fields
Field Name | Description |
---|---|
items - [SatelliteFrame]
|
Collection of satellite frames |
meta - Meta
|
Result set size and pagination information |
Example
{
"items": [
"{ 'targets': { 'correlated_count':3, 'dark_count':107 }, 'data_source':'sentinel1', 'vendor_id':'S1A_IW_GRDH_1SDV_20240813T000004_20240813T000029_055187_06B9EC_7D70.SAFE', 'frame_id':'0fbb541ec9cf8c5f4ba63ffa41bab089be0c9a17', 'collected_at':'2024-08-13T00:00:04.781000Z', 'frame_extents':{ 'coordinates':[[[ -89.15052, 20.4076 ],[ -86.712234, 20.841209 ], [ -87.004501, 22.347897 ], [ -89.468567, 21.917629 ], [ -89.15052, 20.4076 ]]], 'type':'Polygon' }, 'created':'2024-08-13T09:49:59.520600Z', 'updated':'2024-08-13T09:49:59.540989Z' }"
],
"meta": "'pageNum': 1. 'pageSize': 0, 'total': 1312"
}
SearchAOIsOutput
SearchTracksSubpathOutput
Fields
Field Name | Description |
---|---|
records - [TrackSubpath]
|
List of Tracks |
meta - MetaV2
|
Metadata for paginated results |
Example
{
"records": [TrackSubpath],
"meta": MetaV2
}
SortDirection
Values
Enum Value | Description |
---|---|
|
Ascending order |
|
Descending order |
Example
"asc"
StartEnd
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
StringFilter
Description
This query object is used to filter string fields.
Example
{
"eq": "xyz789",
"neq": "xyz789",
"inc": ["xyz789"],
"ninc": ["abc123"],
"like": "xyz789",
"nlike": "xyz789"
}
Token
Fields
Field Name | Description |
---|---|
access_token - String
|
Token to include in request 'Authorization' header |
expires_in - Int
|
Expiration period for the access token (in milliseconds) |
refresh_token - String
|
Token to send in request to extend the expiration period |
token_type - String
|
Type of token (value is always 'Bearer') |
Example
{
"access_token": "zOrUKsEIlqTGxNbFMdKwRvTO9utjuA",
"expires_in": 86400,
"refresh_token": "2fPyXZTWXggd3Bjw0Doc2QyCzn9n79",
"token_type": "Bearer"
}
Track
Fields
Field Name | Description |
---|---|
properties - TrackProperties
|
Additional Track properties |
geometry - LineString
|
Track geometry in GeoJSON format |
Example
{
"properties": "{ 'cog': 114.5999984741211, 'mean_sog': 6.019, 'end': { 'point': { 'lat': 3.31772, 'lon': -18.810928333333333 }, 'time': '2024-03-03T03:32:31+00:00' }, 'start': { 'point': { 'lat': 3.314005, 'lon': -18.812306666666668 }, 'time': '2024-03-03T03:25:58+00:00' }, 'segment_type': 'TRAVEL', 'track_id': 'B:224083590:1639013658:1643050:882604' }",
"geometry": "{ 'coordinates': [[ -18.812306666666668, 3.314005 ], [ -18.810928333333333, 3.31772 ]], 'type': 'LineString' }"
}
TrackProperties
Fields
Field Name | Description |
---|---|
cog - Float
|
Course over ground as reported by AIS (in degrees) |
mean_sog - Float
|
Mean speed over ground as reported by AIS (in knots) |
segment_type - String
|
Track segment type (possible values are 'NO_DATA', 'STAY' and 'TRAVEL') |
track_id - String
|
Vessel track ID (unique to the Skylight platform) |
start - StartEnd
|
Track start location and timestamp |
end - StartEnd
|
Track end location and timestamp |
Example
{
"cog": 114.5999984741211,
"mean_sog": 6.019,
"segment_type": "TRAVEL",
"track_id": "B:224083590:1639013658:1643050:882604",
"start": "'start': { 'point': { 'lat': 3.314005, 'lon': -18.812306666666668 }, 'time': '2024-03-03T03:25:58+00:00' }",
"end": "'end': { 'point': { 'lat': 3.31772, 'lon': -18.810928333333333 }, 'time': '2024-03-03T03:32:31+00:00' }"
}
TrackSubpath
Description
The TrackSubpath
data model represents a segment of a vessel’s journey, defined by a series of AIS (Automatic Identification System) position points recorded between two specific time points. These time points are determined by the Skylight Platform based on changes in the vessel’s behavior, allowing us to divide a vessel’s full track into meaningful subpaths.
By examining multiple TrackSubpath
s over time, users can reconstruct and visualize the vessel’s overall track. Each TrackSubpath
includes key metadata such as start and end times, the number of AIS position points recorded, and the vessel’s course and speed during that segment. Additionally, a simplified geometry in the form of a downsampled lineString provides an approximation of the vessel’s path for visualization purposes. Due to licensing restrictions, the full set of AIS positions cannot be included.
Fields
Field Name | Description |
---|---|
subpathId - String!
|
Unique identifier for the track subpath |
trackId - String!
|
Track ID (unique to the Skylight platform). Can be multiple track subpaths with the same track id (as they're all part of a larger track) |
mmsi - Int
|
Maritime Mobile Service Identity number (from AIS position messages) |
meanSog - Float
|
Mean speed over ground of the track (Knots) prior to down-sampling. |
cog - Float
|
Course over ground of the first position in the track subpath. |
numPositions - Int
|
Number of AIS position messages in this track. |
startTime - String!
|
Time of the first AIS Position of the track. |
endTime - String!
|
This represents the exclusive upper bound of this track and is actually the send time of the first position of the next track. This track includes all positions up to but excluding this time. |
startLocation - Point!
|
Location of the first AIS Position of the track. |
endLocation - Point!
|
The location of the first position point of the next track. This track includes the location of the vessel up to but excluding this point |
pathGeometry - Geometry
|
A GeoJSON encoded GeometryCollection that includes a Point representing the start location of this track, and a LineString representing the full path the vessel took during this track. The LineString is downsampled. |
midpointGeometry - Point
|
The midpoint of the track path. Stored as a Point for visualization purposes. |
midpointCog - Float
|
The course at the midpoint of the track. Stored for visualization purposes. |
activityClassification - TrackSubpathActivityClassification
|
The predicted activity classification for this track as determined by Skylight AI models. None indicates an unclassified track. |
createdAt - String
|
Date and time the track was initially inserted into the Skylight database |
updatedAt - String
|
Date and time the track was last updated in the Skylight database |
Example
{
"subpathId": "d5011951-d323-4e64-9cf5-1f767ffb2bed",
"trackId": "B:224083590:1639013658:1643050:882604:1723421649:1723423470",
"mmsi": 368156470,
"meanSog": 6.019,
"cog": 114.5999984741211,
"numPositions": 10,
"startTime": "2024-08-29T10:47:20.232",
"endTime": "2024-08-29T10:47:20.232",
"startLocation": {"lat": 3.314005, "lon": -18.812306666666668},
"endLocation": {"lat": 3.31772, "lon": -18.810928333333333},
"pathGeometry": {
"geometries": [
{
"coordinates": [
[-18.812306666666668, 3.314005],
[-18.810928333333333, 3.31772]
],
"type": "LineString"
}
],
"type": "GeometryCollection"
},
"midpointGeometry": {"lat": 3.3158625, "lon": -18.8116175},
"midpointCog": 114,
"activityClassification": "transiting",
"createdAt": "2021-09-01T00:00:00Z",
"updatedAt": "2021-09-01T00:00:00Z"
}
TrackSubpathActivityClassification
Values
Enum Value | Description |
---|---|
|
Vessel is anchored |
|
Vessel is fishing |
|
Vessel is moored |
|
Vessel has not transmitted AIS in > 2 hours |
|
Vessel is transiting |
|
Unknown activity |
Example
"anchored"
TrackSubpathGeometryField
Values
Enum Value | Description |
---|---|
|
|
|
Example
"path_geometry"
TrackSubpathSortBy
Values
Enum Value | Description |
---|---|
|
Sort by Start Time |
|
Sort by End Time |
|
Sort by created at time |
|
Sort by updated at time |
|
Sort by MMSI |
|
Sort by Mean Speed Over Ground |
|
Sort by the number of positions in a track |
Example
"start_time"
UpdateAOIInput
Description
Input used to update an AOI
Fields
Input Field | Description |
---|---|
id - String!
|
ID of the AOI |
name - String
|
Name of the AOI |
description - String
|
Description of the AOI |
status - AoiStatus
|
Status of the AOI |
geometry - GeometryInput
|
Geometry of the AOI |
Example
{
"id": "abc123",
"name": "xyz789",
"description": "xyz789",
"status": "active",
"geometry": GeometryInput
}
UserParams
Fields
Field Name | Description |
---|---|
params_id - String
|
User parameters ID (unique to the Skylight platform) |
user_id - String
|
User ID (unique to the Skylight platform) |
aoi_id - String
|
Area of Interest ID (unique to the Skylight platform) |
speed_min - Int
|
Vessel's minimum speed (in knots) |
speed_max - Int
|
Vessel's maximum speed (in knots) |
display_unit - String
|
Unit of measurement (either time or distance-based) |
filter_type - String
|
Type of event measurement (either time duration or distance) |
min_distance - Float
|
Event minimum distance expressed in display_unit (see above) |
min_duration - Float
|
Event minimum duration in seconds |
Example
{
"params_id": "6245eea388e3f610aa04ba93",
"user_id": "6120123fbc8f8661da8a5332",
"aoi_id": "2ba89a82-79aa-4e07-b0ec-ed8db1b40864",
"speed_min": 10,
"speed_max": 12,
"display_unit": "hr",
"filter_type": "duration",
"min_distance": 14.816,
"min_duration": 3600
}
VendorVessel
Fields
Field Name | Description |
---|---|
clear_sky_confidence - Float
|
Confidence level that a given observation area is free of clouds, expressed as a percent range (from 0 to 100): 0% indicates no confidence (completely cloudy) |
moonlight_illumination - Float
|
Light provided by the moon expressed as a percent range (from 0 to 100) |
radiance_nw - Float
|
Radiance in nanowatts per square centimeter per steradian (nW/cm²/sr) |
nanowatts - Float
|
Duplicates radiance_nw (see above)
|
satellite_name - String
|
Satellite from which the detection was collected |
scan_angle - [Float]
|
Scan angle array. Returned values are: pitch, yaw, roll |
Example
{
"clear_sky_confidence": 0.58,
"moonlight_illumination": 14,
"radiance_nw": 374.6,
"nanowatts": 123.45,
"satellite_name": "Suomi-NPP",
"scan_angle": [
0.000285386573523283,
0.000285386573523283,
-0.00030078276176936924
]
}
Vessel
Fields
Field Name | Description |
---|---|
ais_type - Int
|
Numeric Shiptype code (from AIS static messages) |
ais_vessel_type - String
|
Full vessel type label derived from AIS Shiptype |
beneficial_owner - String
|
Value will always be null
|
beneficial_owner_country_code - String
|
Value will always be null
|
call_sign - String
|
For ship radio communications (from AIS static messages) |
country_codes - [String]
|
Collection of country codes |
flag - String
|
Vessel flag of registry (from AIS static messages) |
flag_code - String
|
ISO 3166-1 alpha-3 country code (from AIS static messages) |
imo - Int
|
International Maritime Organization number (from AIS static messages) |
length - Int
|
Vessel length (in meters) |
mmsi - Int
|
Maritime Mobile Service Identity number (from AIS position messages) |
name - String
|
Vessel name (from AIS static messages) |
operator - String
|
Value will always be null
|
owner - String
|
Value will always be null
|
owner_country_code - String
|
Value will always be null
|
primary_gear_type - String
|
Value will always be null
|
secondary_gear_type - String
|
Value will always be null
|
tonnage - Float
|
Value will always be null
|
vessel_category - String
|
Vessel category (derived from the AIS Shiptype) |
vessel_class - String
|
Vessel class (possible values are buoy and vessel ) |
vessel_id - ID
|
Vessel ID (unique to the Skylight platform) |
vessel_type - String
|
Vessel type (from AIS static messages) |
width - Int
|
Vessel width (in meters) |
Example
{
"ais_type": 30,
"ais_vessel_type": "Fishing",
"beneficial_owner": null,
"beneficial_owner_country_code": null,
"call_sign": "HPYR",
"country_codes": ["['ESP'],"],
"flag": "Spain",
"flag_code": "ESP",
"imo": 224933000,
"length": 28,
"mmsi": 224933000,
"name": "AGIOS NIKOLAUS",
"operator": null,
"owner": null,
"owner_country_code": null,
"primary_gear_type": null,
"secondary_gear_type": null,
"tonnage": null,
"vessel_category": "fishing",
"vessel_class": "vessel",
"vessel_id": "B:224933000:1681376115:1580146:1000022",
"vessel_type": "other fishing",
"width": 10
}
VesselCategory
Description
Vessel categories as self-reported in AIS static messages. See https://www.navcen.uscg.gov/sites/default/files/pdf/AIS/AISGuide.pdf for more details on vessel type.
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"cargo"
VesselLkp
Fields
Field Name | Description |
---|---|
vessel_id - String
|
Vessel ID (unique to the Skylight platform) |
track_id - String
|
Vessel track ID (unique to the Skylight platform) |
segment_type - String
|
Value will always be null
|
time - String
|
ISO 8601 formatted timestamp for the Last Known Position (LKP) |
point - Point
|
Latitude and longitude of the last AIS position point that Skylight has received for this vessel |
cog - Float
|
Course over ground from the last AIS position message (in degrees) |
sog - Float
|
Speed over ground (in knots) |
Example
{
"vessel_id": "B:224072680:1509689832:1801369:1285668",
"track_id": "B:224072680:1683616772:1769799:1267433",
"segment_type": null,
"time": "2023-03-28T01:29:37+00:00",
"point": Point,
"cog": 62.29999923706055,
"sog": 13.899999618530273
}