Is it possible to acess the complete json representation of a metadata record in the CMR Search API results? I know you can get the json (atom) and umm-json, but I am looking for the compete record. Is this the "fat" json I have been hearing about? Thank you
Right now that returns a beta version of UMM JSON search results that we built for MMT before we had UMM JSON ready. We just need to incorporate the current UMM JSON implementation into that to make it work. That issue
CMR-1955
-
Getting issue details...STATUS
which is currently not prioritized for work soon. If you would like us to prioritize it for work sometime soon let us know and we can pull it in.
The workaround in the meantime is to pull data back in the XML reference response:
Note that while testing this last one I found a bug in the CMR.
CMR-2518
-
Getting issue details...STATUS
I have pushed a fix which should be deployed to SIT tonight around 1 am Friday the 26th.
Notice I specified version=1.1 in the Accept header. You can choose a version of UMM JSON you want back, or you can leave the version off to always get the latest version. You can also add the “CMR-Pretty: true” header like with our other APIs to format the response.
5 Comments
Scott Ritz
Is it possible to acess the complete json representation of a metadata record in the CMR Search API results? I know you can get the json (atom) and umm-json, but I am looking for the compete record. Is this the "fat" json I have been hearing about? Thank you
user-7b92a
Eventually you'll be able to do it through the request for UMM JSON like
curl "https://cmr.sit.earthdata.nasa.gov/search/collections.umm-json?page_size=1&pretty=true"
Right now that returns a beta version of UMM JSON search results that we built for MMT before we had UMM JSON ready. We just need to incorporate the current UMM JSON implementation into that to make it work. That issue CMR-1955 - Getting issue details... STATUS which is currently not prioritized for work soon. If you would like us to prioritize it for work sometime soon let us know and we can pull it in.
The workaround in the meantime is to pull data back in the XML reference response:
Then fetch the location as UMM JSON:
Note that while testing this last one I found a bug in the CMR. CMR-2518 - Getting issue details... STATUS I have pushed a fix which should be deployed to SIT tonight around 1 am Friday the 26th.
Chris Durbin
There is one other workaround until CMR-2518 is fixed in all the environments.
This is what MMT does to get back UMM JSON:
1) Get the native metadata and native format back from the CMR search API.
2) Submit the native metadata to the CMR ingest translate endpoint and request UMM-JSON as the response format.
--------------------------
1) curl -i https://cmr.sit.earthdata.nasa.gov:443/search/concepts/C1000000803-DEV08/9
You will get the full native metadata back and a Content-Type header. For this example the content-type header was application/echo10+xml
2) curl -i -H "Accept: application/vnd.nasa.cmr.umm+json;version=1.1" -H "Content-type: application/echo10+xml" -XPOST https://cmr.sit.earthdata.nasa.gov/ingest/tranlate/collection?skip_umm_validation=true -d ‘<the metadata>’
Notice I specified version=1.1 in the Accept header. You can choose a version of UMM JSON you want back, or you can leave the version off to always get the latest version. You can also add the “CMR-Pretty: true” header like with our other APIs to format the response.
user-7b92a
The deployment finished this morning. Either of these work to retrieving UMM JSON
Scott Ritz
Thank you Jason and Chris. We will give this a test.