Difference between revisions of "DOxI Documentation"

From MPDLMediaWiki
Jump to navigation Jump to search
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Authentication==
Authentication is handled by [https://de.wikipedia.org/wiki/HTTP-Authentifizierung#Basic_Authentication basic http authentication]. Please contact the MPDL DOI Service for any questions.


== A short introduction into the service called DOxI ==
==DOI REST API==
 
The MPDL DOI-REST service can be reached under https://doxi.mpdl.mpg.de/doxi <br/>
DOxI is a [https://en.wikipedia.org/wiki/Representational_state_transfer REST API] to the [http://doi.mpdl.mpg.de/ MPDL DOI service] assigning DataCite DOI names to research data and grey literature.
 
Access to DOxI is restricted to users and services registered at MPDL. Please [http://doi.mpdl.mpg.de/contact/ contact us] for any further detail.
 
==REST API==
The MPDL-DOxI REST service can be reached under https://doxi.mpdl.mpg.de/doxi/rest <br/>
Below all possible functions are listed. (PATH needs to be appended to the base URL)
Below all possible functions are listed. (PATH needs to be appended to the base URL)


Line 20: Line 16:
!Create DOI
!Create DOI
| PUT
| PUT
|/doi/{doi}
|/doi/rest/v1/{doi}
|Metadata in XML format. DOI in XML will be replaced.
|Metadata in XML format. DOI in XML will be replaced.
|
|
*url (required): Target URL for this DOI
*url: Target URL for this DOI. If no URL is given, a draft DOI is created (not findable). Use the update method to provide the URL later.
|
|
*HTTP Status: 201 - CREATED
*HTTP Status: 201 - CREATED and findable
*HTTP Status: 202 - CREATED and in draft state
*Body: created DOI in text/plain format
*Body: created DOI in text/plain format


Line 31: Line 28:
!Generate DOI
!Generate DOI
|PUT
|PUT
|/doi
|/doi/rest/v1
|Metadata in XML format. DOI in XML will be replaced.
|Metadata in XML format. DOI in XML will be replaced.
|
|
* url (required): Target URL for this DOI
* url: Target URL for this DOI. If no URL is given, a draft DOI is created (not findable). Use the update method to provide the URL later.
* suffix (optional): Desired suffix for this DOI
* suffix (optional): Desired suffix for this DOI
|
|
*HTTP Status: 201 - CREATED
*HTTP Status: 201 - CREATED
*HTTP Status: 202 - CREATED and in draft state
*Body: created DOI in text/plain format
*Body: created DOI in text/plain format


Line 43: Line 41:
!Update DOI
!Update DOI
|POST
|POST
|/doi/{doi}
|/doi/rest/v1/{doi}
|Metadata in XML format (optional), if it should be updated. DOI in XML will be replaced.
|Metadata in XML format (optional), if it should be updated. DOI in XML will be replaced.
|
|
Line 49: Line 47:
|
|
*HTTP Status: 201 - CREATED
*HTTP Status: 201 - CREATED
*Body: Metadata in application/xml format
*Body: Metadata in application/xml format
*Header 'Location': Target URL of DOI
*Header 'Location': Target URL of DOI
Line 55: Line 54:
!Get DOI
!Get DOI
|GET
|GET
|/doi/{doi}
|/doi/rest/v1/{doi}
|
|
-
-
Line 62: Line 61:
|
|
*HTTP Status: 200 - OK  
*HTTP Status: 200 - OK  
*HTTP Status: 204 - DOI in draft state, no URL available
*Body: Metadata in application/xml format
*Body: Metadata in application/xml format
*Header 'Location': Target URL of DOI
*Header 'Location': Target URL of DOI
Line 68: Line 68:
!Get DOI List
!Get DOI List
|GET
|GET
|/doi
|/doi/rest/v1
|
|
-
-
Line 79: Line 79:
!Inactivate DOI
!Inactivate DOI
|DELETE
|DELETE
|/doi/{doi}
|/doi/rest/v1/{doi}
|
|
-
-
Line 87: Line 87:
*HTTP Status: 200 - OK
*HTTP Status: 200 - OK
|}
|}
==Authentication==
Authentication is handled by [https://de.wikipedia.org/wiki/HTTP-Authentifizierung#Basic_Authentication basic http authentication]


==Exceptions==
==Exceptions==
Line 112: Line 109:
***Alternative Message: The DOI could not be registered at the datacite service.
***Alternative Message: The DOI could not be registered at the datacite service.


==PID REST API==
The MPDL PID-REST service can be reached under https://doxi.mpdl.mpg.de/doxi <br/>
[[File:PidService.png]]
[[File:PidCache.png]]


[[Category:DOI]]
[[Category:DOxI]]

Latest revision as of 09:25, 31 March 2020

Authentication[edit]

Authentication is handled by basic http authentication. Please contact the MPDL DOI Service for any questions.

DOI REST API[edit]

The MPDL DOI-REST service can be reached under https://doxi.mpdl.mpg.de/doxi
Below all possible functions are listed. (PATH needs to be appended to the base URL)

Function HTTP method Path Body URL Parameter Success return value
Create DOI PUT /doi/rest/v1/{doi} Metadata in XML format. DOI in XML will be replaced.
  • url: Target URL for this DOI. If no URL is given, a draft DOI is created (not findable). Use the update method to provide the URL later.
  • HTTP Status: 201 - CREATED and findable
  • HTTP Status: 202 - CREATED and in draft state
  • Body: created DOI in text/plain format
Generate DOI PUT /doi/rest/v1 Metadata in XML format. DOI in XML will be replaced.
  • url: Target URL for this DOI. If no URL is given, a draft DOI is created (not findable). Use the update method to provide the URL later.
  • suffix (optional): Desired suffix for this DOI
  • HTTP Status: 201 - CREATED
  • HTTP Status: 202 - CREATED and in draft state
  • Body: created DOI in text/plain format
Update DOI POST /doi/rest/v1/{doi} Metadata in XML format (optional), if it should be updated. DOI in XML will be replaced.
  • url (required): Target URL for this DOI (please repeat the URL, even if you want to update metadata only)
  • HTTP Status: 201 - CREATED
  • Body: Metadata in application/xml format
  • Header 'Location': Target URL of DOI
Get DOI GET /doi/rest/v1/{doi}

-

-

  • HTTP Status: 200 - OK
  • HTTP Status: 204 - DOI in draft state, no URL available
  • Body: Metadata in application/xml format
  • Header 'Location': Target URL of DOI
Get DOI List GET /doi/rest/v1

-

-

  • HTTP Status: 200 - OK
  • Body: DOIs in text/plain format
Inactivate DOI DELETE /doi/rest/v1/{doi}

-

-

  • HTTP Status: 200 - OK

Exceptions[edit]

  • DoxiException as super class
    • DoiAlreadyExistsException
      • StatusCode: 409
      • Message: This DOI already exists. You can either choose another DOI for creating a new DOI or update the existing one by using the update methode.
    • DoiInvalidException
      • StatusCode: 400
      • Message: This DOI already exists. You can either choose another DOI for creating a new DOI or update the existing one by using the update methode.
    • UrlInvalidException
      • StatusCode: 400
      • Message: The transfered URL is invalid. This can for example be caused by a syntax error.
    • MetadataInvalidException
      • StatusCode: 400
      • Message: Datacite response message if available
      • Alternative Message: The transfered metadata xml is invalid. Please refer to the datacite xml schema (https://schema.datacite.org/).
      • MetadataXml included
    • DoiRegisterException
      • StatusCode: 400
      • Message: Datacite response message if available
      • Alternative Message: The DOI could not be registered at the datacite service.

PID REST API[edit]

The MPDL PID-REST service can be reached under https://doxi.mpdl.mpg.de/doxi

PidService.png

PidCache.png