Page tree
Skip to end of metadata
Go to start of metadata

Introduction

The ECHO API has added support to ingest DIF metadata. We use XPath mappings to tie a field in the DIF to a searchable field within ECHO.

 

For a complete documentation of the current mapping please refer to this attached table. Note, this is not a final mapping nor is it intended to stay static. Part of our efforts to map to the UMM for both DIF and ECHO will alter the validity of this mapping. This is just the initial version.

 

Assumptions

  • DIF to be ingested has an DIF/Entry_ID, DIF/Entry_Title, DIF/Last_DIF_Revision_Date, DIF/Summary/*:Abstract,
  • The Entry_Title must be unique within the provider. Currently, this value will be used as both ECHO datasetId and longName. This is subject to change as requirements evolve
  • ECHO Ingest will validate that DIF/Temporal_Coverage/Start_Date is prior to DIF/Temporal_Coverage/Stop_Date

 

Steps to Ingest

Pre Flight Checklist

  • Acquire candidate DIF file. This file will be referred to as “DIF_FILE” throughout this document. Refer to the mapping table and the assumptions listed above to ensure successful ingest.
  • Know the environment you will be using for ingest. The base API URLs for the environments are summarized in the table below along with the associated URS environment.

ECHO Environment

Base API URL

Associated URS Environment

GCMD Test Provider

Testbed (TB)

https://testbed.echo.nasa.gov/

https://alpha.urs.eosdis.nasa.gov/

GCMDTEST, GCMDADAPT

Partner Test (PT)

https://api-test.echo.nasa.gov/

https://beta.urs.eosdis.nasa.gov/

<ask Katie>

Operations (OPS)

https://api.echo.nasa.gov/

https://urs.eosdis.nasa.gov/

<Not Yet Created>

 

  • Ensure that you have a valid provider set up in the environment of interest. Email: echo@echo.nasa.gov for help with this.
  • Ensure that you have a URS user and that this user is authorized to PUT data to ECHO’s API. This will involve coordination with the ECHO Operations team. Email: echo@echo.nasa.gov for help with this.

Ingest Method Outline:

 

Route:

https://testbed.echo.nasa.gov/catalog-rest/providers/<provider id>/datasets/<entry_title>

 

Verb:

PUT

 

Header:

Content-Type = application/xml

 

Header:

Xml-Mime-Type = application/dif+xml

 

Header:

Echo-Token = <token by authorized URS user>

(See instructions at the end of this document to create a token.)

 

curl -XPUT  -H "Echo-Token: <token>" -H "Content-Type: application/xml" -H "Xml-Mime-Type: application/dif+xml" –H "Expect: " http://testbed.echo.nasa.gov/catalog-rest/providers/GCMDPRECMR/datasets/ENTRY_TITLE --data @DIF_FILE

Things to note about this cURL statement:

  • The “Xml-Mime-Type” is very important and must be set.
  • The Echo-Token must be associated with an authorized user as mentioned above.
  • The ENTRY_TITLE will have to be encoded (use something like http://meyerweb.com/eric/tools/dencoder/ to make sure this is done properly).
  • If you have a problem returning a 417 status code from your REST route invocation, include the “Expect: “ header as shown in the example above.

Related articles