Closed tloubrieu-jpl closed 3 years ago
@tloubrieu-jpl Looks like the response for searching for a DOI by DOI or LIDVID are different in that the DOI response does not include the XML record field.
For example getting by LIDVID: http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois/100%3A%3A1.0 Returns this:
{
"creation_date": "2021-01-11T00:00:00Z",
"doi": "10.17189/29052",
"lidvid": "100::1.0",
"node": "eng",
"record": "<?xml version='1.0' encoding='UTF-8'?>\n<records><record status=\"Reserved\" index=\"1\">\n <id>29052</id>\n <site_code>NASA-PDS</site_code>\n <title>Laboratory Shocked Feldspars Collection #1</title>\n <sponsoring_organization>National Aeronautics and Space Administration (NASA)</sponsoring_organization>\n <accession_number>100::1.0</accession_number>\n <doi>10.17189/29052</doi>\n <publisher>NASA Planetary Data System</publisher>\n <publication_date>2020-03-11</publication_date>\n <site_url>N/A</site_url>\n <product_type>Collection</product_type>\n <product_type_specific>PDS4 Collection</product_type_specific>\n <date_record_added>2021-01-11</date_record_added>\n <date_record_updated>2021-01-11</date_record_updated>\n <keywords>PDS; PDS4;</keywords>\n <authors>\n <author>\n <first_name>J. R.</first_name>\n <last_name>Johnson</last_name>\n <affiliations/>\n </author>\n </authors>\n <contributors>\n <contributor>\n <full_name>Planetary Data System: Engineering Node</full_name>\n <contributor_type>DataCurator</contributor_type>\n <affiliations/>\n </contributor>\n </contributors>\n <related_identifiers/>\n </record>\n</records>\n",
"status": "Reserved",
"submitter": "eddie.arevalo@jpl.nasa.gov",
"update_date": "2021-01-11T00:00:00Z"
}
But when getting by DOI: http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois?doi=10.17189%2F29052 Returns this:
[
{
"doi": "10.17189/29052",
"lidvid": "100::1.0",
"node": "eng",
"status": "Reserved",
"submitter": "eddie.arevalo@jpl.nasa.gov",
"update_date": "2021-01-11T09:52:33.656643+08:00"
}
]
This doesn't include the record. Will this be added later?
Hi @eddiesarevalo
The reason why it is different is that when you do a search (2nd case), you get a summary of the record with only a few field. When you get the full document (1rst case), you get all the fields, and especially the xml record.
So if you need the full record from the doi, you need to do 2 requests: 1) search/lookup to get the lidvid 2) get the full document from the lidvid
Does that make sense ? if not we can discuss with @collinss-jpl to update that, but I think that should be ok for now.
@tloubrieu-jpl That is what I was thinking as well, I just wanted to make sure that you are ok with making two calls instead of one. I'll use this method.
We can do that with a lookup from the list end point (/dois)