Annotation Database APIs: Difference between revisions
(Created page with "There are several [https://en.wikipedia.org/wiki/REST 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 [https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods HTTP requests] by whatever method, be it an [https://cran.r-project.org/web/packages/request/request.pdf R] or [https://docs.python-request...") |
Tag: Reverted |
||
Line 12: | Line 12: | ||
These endpoints are available only to clients on the Fisheries and Oceans Intranet. | These endpoints are available only to clients on the Fisheries and Oceans Intranet. | ||
<script type="javascript"> | |||
alert("hi"); | |||
</script> | |||
== Outside Endpoints == | == Outside Endpoints == |
Revision as of 20:11, 21 November 2023
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.
Internal Endpoints
These endpoints are available only to clients on the Fisheries and Oceans Intranet.
<script type="javascript"> alert("hi"); </script>
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.
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. |
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 |