Examples4Wings Interaction
Get AIS vessel presence cell details
Example Interaction request returning the AIS vessel presence behind a single tile cell.
Path parameters
| Parameter | Value | Description |
|---|---|---|
z/x/y/cells | 1/0/0/107 | Tile coordinates and cell index |
Query parameters
| Parameter | Value | Description |
|---|---|---|
date-range | 2021-01-01,2021-12-31 | Filter to 2021 |
datasets[0] | public-global-presence:latest | AIS vessel presence dataset |
Request
# Make sure to replace [TOKEN] with your API Access Token.
curl --location -g --request GET 'https://gateway.api.globalfishingwatch.org/v3/4wings/interaction/1/0/0/107?date-range=2021-01-01,2021-12-31&datasets[0]=public-global-presence:latest' \
-H "Authorization: Bearer [TOKEN]"// Make sure to replace [TOKEN] with your API Access Token.
const res = await fetch(
'https://gateway.api.globalfishingwatch.org/v3/4wings/interaction/1/0/0/107?date-range=2021-01-01,2021-12-31&datasets[0]=public-global-presence:latest',
{ headers: { Authorization: 'Bearer [TOKEN]' } }
)
const data = await res.json()Response
vessel presence hours and vessel details that allow you to get more detail of a vessel by using the Vessel API
{
"total": 1,
"limit": null,
"offset": null,
"nextOffset": null,
"metadata": {},
"entries": [
[
{
"hours": 24.5,
"id": "vessel-id-abc123",
"vessel_type": "cargo",
"flag": "USA",
"speed": "10-15"
},
{
"hours": 18.75,
"id": "vessel-id-def456",
"vessel_type": "carrier",
"flag": "ESP",
"speed": "6-10"
},
{
"hours": 32.25,
"id": "vessel-id-ghi789",
"vessel_type": "passenger",
"flag": "GBR",
"speed": "15-25"
}
]
]
}Get SAR vessel detections cell details
Example Interaction request returning the SAR vessel detections behind a single tile cell.
Generate fishing effort report grouped by year and by custom polygon in JSON format
Example 4Wings report for apparent fishing effort over a custom polygon, aggregated yearly and grouped by flag, as JSON.