This API web service provides a way to easily and programmatically access the complete dataset metadata record for a DOI or Query PID. Using the Oceans 3.0 API allows this process to be automated, which facilitates easy computer-to-computer tasks such as scheduled record retrieval or download of large numbers of records. Citations provided along with the metadata record are formatted according to ESIP guidelines established by the earth science community.
Metadata records for ONC DOIs are retrieved from DataCite. The Dataset Metadata Service generates a URL (the dataciteMetadataURL field) that can then be used to call on DataCite's own API to download the full record. As this also uses an API, this two-step process can be fully automated. See more information about DataCite's API at https://support.datacite.org/docs/api-get-doi.
However, DataCite can only provide a metadata record for a complete dataset assigned a DOI. The metadata for specific subsets of ONC data can only be accessed from Ocean Networks Canada's Oceans 3.0 system, using Query PIDs generated for every data search performed in our database. These Query PIDs are stored locally on ONC servers, and when a Query PID is used with the Dataset Metadata Service, the query parameters of that data subset search are returned in addition to the metadata record for the complete parent dataset DOI. See below for details about the information provided when a Query PID is used with the Dataset Metadata Service.
See the External Web Services for method, and responseType usage and error messages.
https:/data.oceannetworks.ca/api/datasetMetadata |
Method | Description | Example |
|---|---|---|
get | Retrieve a dataset's metadata from the DOI or Query PID |
|
The get method retrieves metadata from the DOI in the same fashion as the dataset landing page.
| Parameter | Type | Description | Example |
|---|---|---|---|
| doi | string | DOI that will be used to generate metadata
| 10.34943/e4bc4e8d-06b5-4b7d-b4d8-4813bacdc4df |
| queryPid | string | A query PID
| 123456 |
Example DOI request: https://data.oceannetworks.ca/api/datasetMetadata?method=get&doi=10.34943/115343a9-6d88-4f6c-a88b-9a7b17ad53e0
Example Query PID request: https://data.oceannetworks.ca/api/datasetMetadata?method=get&queryPid=8297994
Currently, a successful API call returns information about the metadata record in JSON format, including a link to call on DataCite's API to retrieve the full metadata record for the dataset.


Key information:


Key information:
errorCode | errorMessage | Description |
|---|---|---|
| 127 | Invalid parameter value | Occurs when an invalid doi or queryPID is used. Most filters require an exact match. |
| 128 | Missing parameter | Occurs when a required parameter is missing. |
| 129 | Invalid parameter name | Occurs when a filter parameter is in the query but is not supported. |