Skip to content
Brian Riley edited this page Jul 5, 2022 · 7 revisions

API Overview

This API endpoint requires permission. Please contact us if you would like to use this feature.

Once you have obtained permission to use this endpoint, you can use the standard authentication method. It allows you to create DMPs on behalf of a user. Note that you MUST specify scope=create_dmps in your request for an access token.

A typical scenario would be that your system allows a user to select from a list of available DMP templates and then pass the selected template id in your request.

Please note that we currently only allow you to specify high level information to seed the DMP. The user must then sign in to the DMPTool to continue filling out the narrative elements of the DMP.

If the user does not have an account within the DMPTool, they will be sent an invitation to sign up once the DMP has been created. If the user already has an account, they will receive an email notifying them of the creation of the new DMP.

curl -v http://dmptool.org/api/v2/plans \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer MY_ACCESS_TOKEN"

The request body should follow the RDA common metadata standard for DMPs v1.x. With the following optional additions:

  • dmproadmap_template_id lets you specify a specific DMP template to use. If none is specified the default Digital Curation Centre template will be used.
  • affiliation (on the contact and contributor sections allows you to specify affiliation information
  • dmproadmap_funding_opportunity_id allows you to specify the funding opportunity id if the DMP will accompany a grant proposal
  • dmproadmap_host_id - The r3data id for the repository

Please note that we expect the following:

  • Although the RDA common standard requires the dmp_id we understand that it is often not yet relevant when creating a new DMP. You may include your internal system's identifier if you do this, we will store that identifier and use it when communicating back to you when the plan has been updated (see the Subscriptions section for more information) and will include it as dmproadmap_external_system_id in calls to fetch the DMP. If you do not need or have an identifier for the plan then please do not include this attribute.
  • We expect contributor - role to be from the list of CRediT contributor roles taxonomy
  • We expect affiliation - affiliation_id and funding - funder_id to be identifiers from Research Organization Registry or the Crossref Funder Registry (in the case of funder_id)
  • The distribution - host_id should be from the Re3data repository registry
  • We expect the license - license_ref to comes from the SPDX license registry.
  • We can only accommodate one license per dataset distribution at this time. If you have multiples please use the most current license
  • If you do not see an RDA common standard attribute in the example below, then we do not yet support it! For example a dataset - preservation_statement. These values are contained within the DMP narrative and can be filled out by the user within the DMPTool interface after the DMP has been created by your request.

Example of a request body (including the optional information):

{ 
  "dmp": {
    "title": "Example DMP",
    "description": "This is the example DMP abstract.",
    "language": "eng",
    "created": "2018-04-09T23:10:14Z",
    "modified": "2020-11-24T19:13:24Z",
    "ethical_issues_exist": "unknown",
    "dmp_id": { "type": "other", "identifier": "your_identifier_if_applicable" },
    "contact": {
      "name": "Jane Doe",
      "mbox": "jane.doe@example.org",
      "affiliation": {
        "name": "Example University",
        "affiliation_id": { "type": "ror", "identifier": "https://ror.org/00000XX" }
      },
      "contact_id": { "type": "orcid", "identifier": "https://orcid.org/0000-0000-0000-0000" }
    },
    "contributor": [
      {
        "name": "Samantha Smith",
        "mbox": "samantha.smith@example.org",
        "role": ["http://credit.niso.org/contributor-roles/investigation"],
        "affiliation": {
          "name": "Example University",
          "abbreviation": "EUniv.",
          "affiliation_id": { "type": "ror", "identifier": "https://ror.org/00000XX" }
        }, 
        "contributor_id": { "type": "orcid", "identifier": "https://orcid.org/0000-0000-0000-0000" }
      }
    ],
    "project": [
      {
        "title": "Example DMP",
        "description": "This is the example DMP abstract.",
        "start": "2021-04-16T12:57:52-07:00",
        "end": "2023-04-16T12:57:52-07:00",
        "funding": [
          {
            "name": "National Funding Organization",
            "funder_id": { "type": "fundref", "identifier": "https://doi.org/10.13039/000000000" },
            "grant_id": { "type": "url", "identifier": "https://awards.example.org/123" },
            "funding_status": "granted",
            "dmproadmap_funding_opportunity_id": { "type": "other", "identifier": "32698" }
          }
        ]
      }
    ],
    "dataset": [
      {
        "type": "dataset",
        "title": "Current measurements",
        "description": "<p>Tidal current data from the Straits of Gibralter</p>",
        "personal_data": "no",
        "sensitive_data": "no",
        "issued": "2023-06-17T00:00:00Z",
        "dataset_id": { "type": "other", "identifier": "22" },
        "distribution": [
          {
            "title": "Anticipated distribution for Current measurements",
            "byte_size": 1429365116108,
            "data_access": "embargoed",
            "host": {
              "title": "Example Repository",
              "description": "An example repository database for oceanographic data",
              "url": "http://repo.example.org",
              "dmproadmap_host_id": { "type": "url", "identifier": "https://www.re3data.org/api/v1/repository/r3d100011533" }
            },
            "license": [
              { "license_ref": "http://spdx.org/licenses/EUPL-1.0.json", "start_date": "2021-06-17T00:00:00Z" }
            ]
          }
        ]
      } 
    ],
    "dmproadmap_template": { "id": 12, "title": "Example template" }
  }
}  

If the request was successful, you will receive an HTTP 201 Created message along with the JSON in the RDA common metadata standard v1.x format. See the Fetch DMP API endpoint for an example of the response JSON.

Clone this wiki locally