️Command Line API¶
This section contains details on the interfaces for the command line tools.
pds-doi-cmd¶
pds-doi-init¶
Swagger API¶
This section contains details Swagger REST API implemented by pds-doi-api
.
Planetary Data System DOI Service API
PDS API for managing DOI registration with a DOI service provider (OSTI, DataCite, etc.).
More information: https://github.com/NASA-PDS/doi-service
Contact Info: pds-operator@jpl.nasa.gov
Version: 0.2
BasePath:/PDS_APIs/pds_doi_api/0.2
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html
Access
Methods
[ Jump to Models ]Table of Contents
Dois
Dois
Up
get /dois/check
(getCheckDois)
Check submission status of all records pending release.
Query parameters
email (optional)
Query Parameter — If true, the check action sends results to the default recipients and pending DOI submitters. default: false
attachment (optional)
Query Parameter — If true, the check action sends results as an email attachment. Has no effect if the email flag is not set to true. default: false
submitter (required)
Query Parameter — The email address of the user to register as author of the check action. This address is also included in the list of recipients.
Return type
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.application/json
Responses
200
Success doi_record400
DOI service provider cannot be reached500
Internal error
Up
get /doi
(getDoiFromId)
Get the status of a DOI from the transaction database.
Query parameters
identifier (required)
Query Parameter — The PDS identifier associated with the record to fetch.
Return type
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.application/json
Responses
200
Success doi_recordExample data
Content-Type: application/json
[
{
"creation_date":"2021-03-09T00:00:00Z",
"doi":"10.17189/29476",
"identifier":"urn:nasa:pds:lab_shocked_feldspars::1.0",
"node":"eng",
"record":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<records>\n
<record status=\"reserved\">\n <id>29476</id>\n
<title>Laboratory Shocked Feldspars Bundle</title>\n
<doi>10.17189/29476</doi>\n ...\n
<contact_name>PDS Operator</contact_name>\n
<contact_org>PDS</contact_org>\n
<contact_email>pds-operator@jpl.nasa.gov</contact_email>\n
<contact_phone>818.393.7165</contact_phone>\n
</record>\n</records>\n",
"status":"reserved",
"submitter":"my.email@node.gov"
}
]
404
Not existing500
Internal error
Up
get /dois
(getDois)
List the DOI requests within the transaction database
Query parameters
doi (optional)
Query Parameter — List of DOIs to fetch from transaction database.
submitter (optional)
Query Parameter — List of submitter email addresses to filter DOIs by.
node (optional)
Query Parameter — List of PDS node names cited as contributor of the DOI to filter by. Each identifier must be one of the valid PDS steward IDs, see https://pds.nasa.gov/datastandards/documents/dd/current/PDS4_PDS_DD_1D00.html#d5e72146
status (optional)
Query Parameter — List of DOI workflow status values to filter results by. Status must be one of the following - "unknown", "draft", "review", or "findable".
ids (optional)
Query Parameter — List of PDS identifiers to filter DOIs by. Each identifier may contain one or more Unix-style wildcards (*) to pattern match against.
start_date (optional)
Query Parameter — A start date to filter resulting DOI records by. Only records with an update time after this date will be returned. Value must be a valid isoformat string of the form <YYYY>-<mm>-<dd>[T<HH>:<MM>:<SS>.<ms>]
end_date (optional)
Query Parameter — An end date to filter resulting DOI records by. Only records with an update time prior to this date will be returned. Value must be a valid isoformat string of the form <YYYY>-<mm>-<dd>[T<HH>:<SS>.<ms>]
Return type
array[doi_summary]
Example data
Content-Type: application/json
[
{
"identifier" : "identifier",
"node" : "node",
"submitter" : "submitter",
"title" : "title",
"update_date" : "2000-01-23T04:56:07.000+00:00",
"doi" : "doi",
"status" : "status"
},
{
"identifier" : "identifier",
"node" : "node",
"submitter" : "submitter",
"title" : "title",
"update_date" : "2000-01-23T04:56:07.000+00:00",
"doi" : "doi",
"status" : "status"
}
]
Produces
This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.application/json
Responses
200
Success400
Invalid Argument500
Internal error
Up
post /dois
(postDois)
Submit a DOI to reserve or update. The payload includes URLs for one or more records to be submitted. Record URLs must resolve to PDS4 label files (xml).
Consumes
This API call consumes the following media types via the Content-Type request header:application/json
application/xml
Request body
body labels_payload (optional)
Body Parameter — Payload containing one or more labels in JSON or XML (PDS4) format. Required for reserve requests, but optional for update.
example:
{
"labels" : [ {
"status" : "Reserved",
"title" : "Laboratory Shocked Feldspars Bundle",
"publication_date" : "2020-03-11",
"product_type_specific" : "PDS4 Collection",
"author_last_name" : "Johnson",
"author_first_name" : "J. R.",
"related_resource" : "urn:nasa:pds:lab_shocked_feldspars"
} ]
}
Query parameters
action (required)
Query Parameter — The submission action to perform. Must be one of "reserve", "draft" or "update". "draft" is an alias for "update".
submitter (required)
Query Parameter — Email address of the submission requester.
node (required)
Query Parameter — The PDS node name to cite as contributor of the DOI. Must be one of the valid PDS steward IDs, see https://pds.nasa.gov/datastandards/documents/dd/current/PDS4_PDS_DD_1D00.html#d5e72146
url (optional)
Query Parameter — URL to provide as the record to register a DOI for. URL must start with either "http://" or "https://" and resolve to a valid PDS4 label in XML format. This value is only utilized when request is set to "update".
force (optional)
Query Parameter — If true, forces a reserve request to completion, ignoring any warnings encountered. Has no effect for update requests. default: false
Return type
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.application/json
Responses
200
Success doi_recordExample data
Content-Type: application/json
[
{
"creation_date":"2021-03-09T00:00:00Z",
"doi":"10.17189/29476",
"identifier":"urn:nasa:pds:lab_shocked_feldspars::1.0",
"node":"eng",
"record":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n
<records>\n <record status=\"reserved\">\n
<id>29476</id>\n <title>Laboratory Shocked Feldspars Bundle</title>\n
<doi>10.17189/29476</doi>\n ...\n
<contact_name>PDS Operator</contact_name>\n
<contact_org>PDS</contact_org>\n
<contact_email>pds-operator@jpl.nasa.gov</contact_email>\n
<contact_phone>818.393.7165</contact_phone>\n
</record>\n</records>\n",
"status":"reserved",
"submitter":"my.email@node.gov"
}
]
201
Success400
Invalid Argument500
Internal error
Up
post /doi/submit
(postSubmitDoi)
Move a DOI record from draft status to "review".
Query parameters
identifier (required)
Query Parameter — The PDS identifier associated with the record to submit for review.
force (optional)
Query Parameter — If true, forces a submit request to completion, ignoring any warnings encountered. default: false
Return type
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.application/json
Responses
200
Success doi_record400
Can not be released404
No entry found for identifier500
Internal error
Up
put /doi
(putDoiFromId)
Update the record associated with an existing DOI.
Query parameters
identifier (required)
Query Parameter — The PDS identifier associated with the record to fetch.
submitter (optional)
Query Parameter — Email address of the DOI update requester.
node (optional)
Query Parameter — The PDS node name to cite as contributor of the DOI. Must be one of the valid PDS steward IDs, see https://pds.nasa.gov/datastandards/documents/dd/current/PDS4_PDS_DD_1D00.html#d5e72146
url (optional)
Query Parameter — URL to provide as the record to update the DOI with. URL must start with either "http://" or "https://" and resolve to a valid PDS4 label in XML format.
Responses
501
Not implementedModels
[ Jump to Methods ]Table of Contents
doi_record
Up
doi (optional)
identifier (optional)
title (optional)
node (optional)
submitter (optional)
status (optional)
update_date (optional)
Date format: date-time
record (optional)
String full DOI label
creation_date (optional)
Date Creation date of the DOI record in iso8601 format format: date-time
message (optional)
labels_payload
Up
labels (optional)