Annotation Database APIs

From MediaWiki
Jump to navigation Jump to search

There are several ReST endpoints for accessing data in the annotation database. These can be provided for users within MSEA, or requested by users outside of MSEA who consume this data.

API Usage

These endpoints are accessed using HTTP requests by whatever method, be it an R or Python call, wget, curl or a URL typed in a browser address bar. In general, the output format is JSON.

API paths always begin with the prefix /api/v1/.

Note: the APIs aren't really standardised (yet). In the future, a consistent API with complete documentation is the goal.

Authentication

TBD.

Internal Endpoints

These endpoints are available only to clients on the Fisheries and Oceans Intranet.

  • Automatically-generated ReST API documentation is available here.

Outside Endpoints

ODL Cruise and Dive Summaries

This endpoint was requested by the Ocean Discovery League to retrieve a summary of cruises and dives with start and end times, start and end coordinates and maximum depth.

Endpoint Description
URL Accepted Methods Result Format Parameters
/api/v1/cruises/summary/ GET CSV force=true - Force regeneration of the table, otherwise a cached copy is used.
Sample Output
Generated on 2023-10-25 18:31
cruise_id cruise_name cruise_leg dive_name start_time end_time rov max_depth start_lat start_lon end_lat end_lon
855 PAC2000-031 1 5182 2000-08-03 20:26:00 2000-08-03 22:09:00 Delta Oceanographics Submersible 169.0 53.292805 -135.64922 53.29882 -135.647545
855 PAC2000-031 1 5183 2000-08-05 16:34:00 2000-08-05 18:46:00 Delta Oceanographics Submersible 306.0 53.27251333 -135.7125967 53.28022167 -135.7235467