Query report results in JSON
The query endpoint allows us to get the data in JSON format
The query endpoint allows us to get the data in JSON format.
Get Data in JSON Format Examples
These examples are available:
- Example 1 (GET) - Get data as json sort by structure start date DESC
- Example 2 (GET) - Get data as json sort by detection date ASC
- Example 3 (GET) - Get data as json sort by label
- Example 4 (GET) - Get data as json sort by label confidence
- Example 5 (GET) - Get data as json sort by structure start date DESC and only structure id field
- Example 6 (GET) - Get data as json sort by structure end date ASC and only 3 fields
Get Data in JSON Format - Specifications
GET https://gateway.api.globalfishingwatch.org/v3/bulk-reports/:id/query
Authorization
ApiKeyAuth In: header
Path Parameters
Query Parameters
Amount of search results to return.
1 <= valueOffset 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 <= valueQuery to sort the list of resources. The column name must exists in the data to retrieve
Optional. Fields to include
curl -X GET "https://example.com/api/v3/bulk-reports/string/query?limit=1&offset=0"{ "entries": [ {} ], "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}Get Data in JSON Format - Response fields
Since this is the same dataset Fixed infrastructure detections from Sentinel-1 and Sentinel-2 from our Data Download Portal, you can find the definitions of each field there
Returns a paginated list of detections from the Fixed Infrastructure dataset.
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
detection_id | string | false | - | Unique ID of the satellite detection |
detection_date | string | false | date (YYYY-MM-DD) | Date of the detection |
structure_id | string | true | - | Unique ID that groups all detections of the same structure |
lon | number | true | float | Longitude of the detection |
lat | number | true | float | Latitude of the detection |
structure_start_date | string | false | date (YYYY-MM-DD) | First detection date of the structure |
structure_end_date | string | false | date (YYYY-MM-DD) or null | Last detection date of the structure |
label | string | false | oil, wind, unknown | Predicted type of offshore structure |
label_confidence | string | false | low, medium, high | Classification confidence of the label |