Get All Events
Get several events in one request apparent fishing, encounters between vessel types, loitering, port visits and AIS gaps.
You can get all events using the GET or the POST verbs
Events GET examples
These examples are available:
- Example 1 (GET) - Get Apparent Fishing Events
- Example 2 (GET) - Get Encounter Events
- Example 3 (GET) - Get Loitering Events
- Example 4 (GET) - Get Port Visits
Events POST examples
These examples are available:
- Example 1 (POST) - Get Fishing Events
- Example 2 (POST) - Get Encounter Events
- Example 3 (POST) - Get Loitering Events
- Example 4 (POST) - Get Port Visits
- Example 5 (POST) - Get Fishing Events Within Senegal EEZ
Events GET - Specifications
Authorization
ApiKeyAuth In: header
Query Parameters
Vessel types. Possible values: BUNKER,CARGO,DISCREPANCY,CARRIER,FISHING,GEAR,OTHER,PASSENGER,SEISMIC_VESSEL,SUPPORT,NON_FISHING,RESEARCH,
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Flags in format ISO3.
Operators to apply for the filter: [INCLUDE, EXCLUDE]
List of vessel ids separated by comma. You can get this information using the search endpoints
Ids of vessel-groups
Event types. Possible values: ENCOUNTER,FISHING,LOITERING,GAP_START,GAP,PORT_VISIT
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Start date in format YYYY-MM-DD of the start date of the event (inclusive)
End date in format YYYY-MM-DD of the end date of the event (exclusive)
This param applies only to port visits events, check data caveats to understand the different levels. Values go from 2 to 4, where 2 is low confidence, 3 is medium and 4 is high confidence. Values are separated by comma. Possible values: 2, 3, 4
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Possible values: FISHING-BUNKER, BUNKER-FISHING, FISHING-TANKER, TANKER-FISHING, CARRIER-BUNKER, BUNKER-CARRIER, SUPPORT-BUNKER, BUNKER-SUPPORT, FISHING-NON_FISHING, FISHING-RESEARCH, FISHING-, NON_FISHING-FISHING, NON_FISHING-NON_FISHING, NON_FISHING-SUPPORT, NON_FISHING-CARRIER, NON_FISHING-RESEARCH, NON_FISHING-, SUPPORT-NON_FISHING, SUPPORT-RESEARCH, SUPPORT-, CARRIER-NON_FISHING, CARRIER-CARRIER, CARRIER-RESEARCH, CARRIER-, RESEARCH-FISHING, RESEARCH-NON_FISHING, RESEARCH-SUPPORT, RESEARCH-CARRIER, RESEARCH-RESEARCH, RESEARCH-, -FISHING, -NON_FISHING, -SUPPORT, -CARRIER, -RESEARCH, -, FISHING-FISHING, FISHING-SUPPORT, FISHING-CARRIER, SUPPORT-FISHING, SUPPORT-SUPPORT, SUPPORT-CARRIER, CARRIER-FISHING, CARRIER-SUPPORT
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Flag to specify if you want to get those gaps that were intentional or not true means that the gap was intentional, false means that the gap was not intentional. If the flag is not present, then the response contains all gaps.
Specify the properties that you want to obtain. If it's empty, the response will contains all data.
Port ids to filter by
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Time filter mode
"OVERLAP"Dataset of regions to filter by
Dataset ids of regions to filter by
Distance to draw the buffer (negative values are allowed)
Distance to draw the buffer (negative values are allowed)
Value in
- "MILES"
- "NAUTICALMILES"
- "KILOMETERS"
- "RADIANS"
- "DEGREES"
Operation to apply to the region after the buffer. Only works together with buffer-value and buffer-unit query param. If not send, the default operation is dissolve
Value in
- "DIFFERENCE"
- "DISSOLVE"
Min duration in hours (inclusive)
Max duration in hours (exclusive)
Next port id
Operators to apply for the filter: [INCLUDE, EXCLUDE]
If the gap event is closed
Specify the datasets that will be used to search the vessel. You can learn more about which are the possible datasets here.
Events ids.
Flag to specify if the matching with regions should be executed or not. Check our data caveats for details on how the region is matching. Default value is True.
Offset into the search results, used for pagination. It starts at 0. It is used in combination with the param “limit”. For example, you send limit = 5 and you get in the response total vessels =10. So, If you send offset =0, you will get the first 5 results (first page). Therefore, in order to get the second page, you need to send offset = 5 which is the position of the first element you want from the second page.
0 <= valueAmount of search results to return.
1 <= valuecurl -X GET "https://example.com/api/v3/events?datasets=public-global-fishing-events%3Alatest&datasets=public-global-encounter-events%3Alatest&offset=0&limit=1"{ "entries": [ { "boundingBox": [ "-26.6544916667", "-27.4231866667", "-58.2073683333", "-58.7976633333" ], "distances": { "endDistanceFromPortKm": "0.0", "endDistanceFromShoreKm": "0.0", "startDistanceFromPortKm": "0.0", "startDistanceFromShoreKm": "0.0" }, "end": "2015-01-04T02:20:00.000Z", "id": "a6e00481737d3e2c9903e1f565c51143", "position": { "lat": "125.2089", "lon": "12.14587" }, "regions": { "eez": [], "eez12Nm": [], "fao": [], "highSeas": [], "majorFao": [], "mpa": [], "mpaNoTake": [], "mpaNoTakePartial": [], "rfmo": [] }, "start": "2015-01-02T23:50:00.000Z", "type": "loitering", "vessel": { "flag": "ESP", "id": "a6e00481737d3e2c9903e1f565c51143", "name": "Don tito", "nextPort": {}, "publicAuthorizations": "12345789", "ssvid": "12345789", "type": "FSIHING" } } ], "limit": 10, "metadata": {}, "nextOffset": 10, "offset": 0, "total": 152}{ "error": "Unauthorized", "messages": [ { "detail": "No authorized", "metadata": {}, "title": "Unauthorized" } ], "statusCode": 401}{ "error": "Forbidden", "messages": [ { "detail": "You do not have permissions to do the action", "metadata": {}, "title": "Forbidden" } ], "statusCode": 403}{ "error": "Unprocessable Entity", "messages": [ { "detail": "Validation exception", "metadata": {}, "title": "Unprocessable Entity" } ], "statusCode": 422}{ "error": "Service Unavailable", "messages": [ { "detail": "Service unavailable", "metadata": {}, "title": "Service Unavailable" } ], "statusCode": 503}Events POST - Specifications
Authorization
ApiKeyAuth In: header
Query Parameters
Offset into the search results, used for pagination. It starts at 0. It is used in combination with the param “limit”. For example, you send limit = 5 and you get in the response total vessels =10. So, If you send offset =0, you will get the first 5 results (first page). Therefore, in order to get the second page, you need to send offset = 5 which is the position of the first element you want from the second page.
0 <= valueAmount of search results to return.
1 <= valueRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Operation to apply to the region after the buffer. Only works together with buffer-value and buffer-unit query param. If not send, the default operation is dissolve
Value in
- "DIFFERENCE"
- "DISSOLVE"
Distance to draw the buffer (negative values are allowed)
Value in
- "MILES"
- "NAUTICALMILES"
- "KILOMETERS"
- "RADIANS"
- "DEGREES"
Distance to draw the buffer (negative values are allowed)
This param applies only to port visits events, check data caveats to understand the different levels. Values go from 2 to 4, where 2 is low confidence, 3 is medium and 4 is high confidence. Values are separated by comma. Possible values: 2, 3, 4
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Specify the datasets that will be used to search the vessel. You can learn more about which are the possible datasets here.
Min duration, in minutes, of the event
Possible values: FISHING-BUNKER, BUNKER-FISHING, FISHING-TANKER, TANKER-FISHING, CARRIER-BUNKER, BUNKER-CARRIER, SUPPORT-BUNKER, BUNKER-SUPPORT, FISHING-NON_FISHING, FISHING-RESEARCH, FISHING-, NON_FISHING-FISHING, NON_FISHING-NON_FISHING, NON_FISHING-SUPPORT, NON_FISHING-CARRIER, NON_FISHING-RESEARCH, NON_FISHING-, SUPPORT-NON_FISHING, SUPPORT-RESEARCH, SUPPORT-, CARRIER-NON_FISHING, CARRIER-CARRIER, CARRIER-RESEARCH, CARRIER-, RESEARCH-FISHING, RESEARCH-NON_FISHING, RESEARCH-SUPPORT, RESEARCH-CARRIER, RESEARCH-RESEARCH, RESEARCH-, -FISHING, -NON_FISHING, -SUPPORT, -CARRIER, -RESEARCH, -, FISHING-FISHING, FISHING-SUPPORT, FISHING-CARRIER, SUPPORT-FISHING, SUPPORT-SUPPORT, SUPPORT-CARRIER, CARRIER-FISHING, CARRIER-SUPPORT
Operators to apply for the filter: [INCLUDE, EXCLUDE]
End date in format YYYY-MM-DD of the end date of the event (exclusive)
Flags in format ISO3.
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Flag to specify if you want to get those gaps that were intentional or not true means that the gap was intentional, false means that the gap was not intentional. If the flag is not present, then the response contains all gaps.
Geojson of the region to filter
Events ids.
Specify the properties that you want to obtain. If it's empty, the response will contains all data.
If the gap event is closed
Max duration in hours (exclusive)
Min duration in hours (inclusive)
Next port id
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Port ids to filter by
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Region info to filter
Dataset of regions to filter by
Dataset ids of regions to filter by
Regions info to filter
Start date in format YYYY-MM-DD of the start date of the event (inclusive)
Time filter mode
"OVERLAP"Event types. Possible values: ENCOUNTER,FISHING,LOITERING,GAP_START,GAP,PORT_VISIT
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Ids of vessel-groups
Vessel types. Possible values: BUNKER,CARGO,DISCREPANCY,CARRIER,FISHING,GEAR,OTHER,PASSENGER,SEISMIC_VESSEL,SUPPORT,NON_FISHING,RESEARCH,
Operators to apply for the filter: [INCLUDE, EXCLUDE]
List of vessel ids separated by comma. You can get this information using the search endpoints
curl -X POST "https://example.com/api/v3/events?offset=0&limit=1" \ -H "Content-Type: application/json" \ -d '{ "datasets": [ "public-global-fishing-events:latest", "public-global-encounter-events:latest" ] }'{ "entries": [ { "boundingBox": [ "-26.6544916667", "-27.4231866667", "-58.2073683333", "-58.7976633333" ], "distances": { "endDistanceFromPortKm": "0.0", "endDistanceFromShoreKm": "0.0", "startDistanceFromPortKm": "0.0", "startDistanceFromShoreKm": "0.0" }, "end": "2015-01-04T02:20:00.000Z", "id": "a6e00481737d3e2c9903e1f565c51143", "position": { "lat": "125.2089", "lon": "12.14587" }, "regions": { "eez": [], "eez12Nm": [], "fao": [], "highSeas": [], "majorFao": [], "mpa": [], "mpaNoTake": [], "mpaNoTakePartial": [], "rfmo": [] }, "start": "2015-01-02T23:50:00.000Z", "type": "loitering", "vessel": { "flag": "ESP", "id": "a6e00481737d3e2c9903e1f565c51143", "name": "Don tito", "nextPort": {}, "publicAuthorizations": "12345789", "ssvid": "12345789", "type": "FSIHING" } } ], "limit": 10, "metadata": {}, "nextOffset": 10, "offset": 0, "total": 152}{ "error": "Unauthorized", "messages": [ { "detail": "No authorized", "metadata": {}, "title": "Unauthorized" } ], "statusCode": 401}{ "error": "Forbidden", "messages": [ { "detail": "You do not have permissions to do the action", "metadata": {}, "title": "Forbidden" } ], "statusCode": 403}{ "error": "Unprocessable Entity", "messages": [ { "detail": "Validation exception", "metadata": {}, "title": "Unprocessable Entity" } ], "statusCode": 422}{ "error": "Service Unavailable", "messages": [ { "detail": "Service unavailable", "metadata": {}, "title": "Service Unavailable" } ], "statusCode": 503}