Request an async report
report_requestSubmit an async report job. Reports are generated in the background and can take a while (seconds to many minutes), so this returns a report_id and an initial status (PENDING) — it does NOT wait. Submit ONCE, then poll report_status with the returned report_id until DONE, which yields a result_url. Do not resubmit while a job is running. When done, give the user the result_url to download; the server never downloads report files itself.
Supported report_type values:
request_usage: a FREE log of your account's API usage (endpoint, credits, timestamp); optional from/to (<=31 days), default last month.
vessel_list: the full vessel database (no other parameters).
port_list: the full ports database (no other parameters).
inradius_history: all vessels that passed through an area in a time window; REQUIRES lat, lon, radius (<=50 NM), from and to (<=7 days apart).
Note: vessel_list, port_list and inradius_history consume API credits (vessel_list and inradius_history can be substantial) — it's good to tell the user before submitting. For the add-on bulk datasets (ownership, inspections, etc.) use intel_report_request instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End date YYYY-MM-DD. Optional for request_usage (<=31 days after from); required for inradius_history (<=7 days after from). | |
| lat | No | Center latitude. Required for inradius_history. | |
| lon | No | Center longitude. Required for inradius_history. | |
| from | No | Start date YYYY-MM-DD. Optional for request_usage; required for inradius_history. | |
| radius | No | Radius in nautical miles, max 50. Required for inradius_history. | |
| report_type | Yes | Which report to generate: request_usage, vessel_list, port_list, or inradius_history. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| report_id | Yes | ||
| created_at | Yes | ||
| result_url | Yes | ||
| updated_at | Yes | ||
| report_type | Yes |