Skip to content
Brian Riley edited this page Nov 9, 2022 · 7 revisions

API Overview

Adding Related Identifiers (publications, datasets, etc.) to a DMP

You can attach related identifiers to a user's DMP using the protected access (aka grant_type=authorization_code) see the authentication section for details.

Example request:

curl -v https://dmptool.org/api/v2/related_identifiers \
  -H "Accept: application/json" \
  -H "Authorization: Bearer USERS_ACCESS_TOKEN"

The request body should follow the following format (Note that ALL fields are required):

  • dmp_id the identifier for the DMP you want to attach the related identifiers to. This can be either the API v2 endpoint to fetch the DMP or the DMP ID if available (e.g. https://dmptool.org/api/v2/plans/123 or https://doi.org/10.123/654yxe.532). Note that if you have previously fetched the DMP's JSON, the preferred dmp_id would have been part of the JSON response.
  • dmproadmap_related_identifier an array of related identifiers you want to attach to the DMP
    • descriptor should be one of the relationTypes for relatedIdentifiers defined in the DataCite metadata schema. We require these values to use camel-case to follow the patterns outlined elsewhere in the RDA common metadata standard for DMPs v1.x, so please convert the DataCite values (e.g. IsSupplementTo becomes is_supplement_to.
    • type should be one of the relatedIdentifierType from the DataCite metadata schema
    • identifier is the the value of the identifier

For example:

{
  "dmp": {
    "dmp_id": { "type": "url", "identifier": "https://dmptool.org/api/v2/plans/123" },
    "dmproadmap_related_identifiers": [
      { "descriptor": "is_referenced_by", "type": "doi", "identifier": "https://doi.org/10.987/999zzz" },
      { "descriptor": "is_supplement_to", "type": "doi", "identifier": "https://doi.org/10.123/123abc.45de" },
      { "descriptor": "is_cited_by", "type": "url", "identifier": "https://example.com/path/to/document" }
    ]
  }
}

If the request is successful you will receive an HTTP 201 status code along with the full JSON metadata for the DMP. See an example of the JSON on the Fetch DMP page

If you do not receive a 201 status then please refer to the API Errors page and the specific error messages contained within the response body.

Clone this wiki locally