Submit async report job
Changed onInitiates a bulk data export job. Returns report_id immediately with status: _PENDING_. Poll GET /api/v0/report until status is _DONE_, then download the ZIP from result_url.
Report types
| report_type | Description | Credit cost |
|---|---|---|
| vessel_list | Full vessel registry snapshot | 5,000 |
| port_list | Full port list snapshot | 500 |
| request_usage | Your API key usage log | Free |
| inradius_history | Historical AIS for a zone (max 7-day window, max 50 NM radius) | 1 per unique vessel per calendar day, summed across the date range |
| dry_dock_dates | Dry dock bulk export | 2,000 |
| companies | Maritime companies bulk export | 2,000 |
| casualty | Casualties bulk export | 2,000 |
| inspections | Inspections bulk export | 2,000 |
| sales_purchase_demolitions | Sales and demolitions bulk export | 2,000 |
| ownership | Ownership bulk export | 2,000 |
| class_society | Classification society bulk export | 2,000 |
| engine | Engine data bulk export | 2,000 |
Credit cost: the cost of the requested report_type, as listed above. Submitting carries no separate charge on top of that.
You are charged once per report. Checking the status of a report you already submitted is free, however many times you do it, and that includes fetching a fresh result_url after the previous link expired. A failed report deducts no credits.
An existing report cannot be restarted. To change the parameters, submit a new report, which is charged as a new report.
Request
- Base URLhttps://api.datalastic.com
- Auth
- API key in header x-api-key
- or API key in query parameter api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"lat": 51.8951,
"lon": 4.3973,
"radius": 10,
"from": "2022-07-01",
"to": "2022-07-05",
"updated_from": "2023-01-01"
}Response
Job accepted. Poll with the returned report_id.
Example response
{
"data": {
"report_id": "4ddc14e0-9059-9b86-1156-8efd93f0cfe6",
"status": "_PENDING_",
"report_type": "ownership",
"message": "bad parameters: to must be later than from"
},
"meta": {
"duration": 0.012,
"endpoint": "/api/v0/vessel",
"success": true,
"next": "00e32b7a-4067-d6b2-8d73-2bdda4fe72bb"
}
}Changes
- warning
deleted the
queryrequest parameterapi-key - warning
added the new
_DONE_enum value to the/response property for the response status - warning
added the new
_FAILED_enum value to the/response property for the response status - warning
added the new
_IN_PROGRESS_enum value to the/response property for the response status - warning
added the new
_PENDING_enum value to the/response property for the response status - info
added the media type
application/jsonfor the response with the status - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
removed the
DONEenum value from the/response property for the response status - info
removed the
FAILEDenum value from the/response property for the response status - info
removed the
IN_PROGRESSenum value from the/response property for the response status - info
removed the
PENDINGenum value from the/response property for the response status
- warning