1 / 11

Catalog REST for data providers

Catalog REST for data providers. ECHO Technical Interchange 04/30/13 3:15pm EST Doug Newman. Rationale. Troubleshooting your data issues Managing your data Surgical fixes (REST providers only) On a provider, dataset and granule level. Tools to follow along. Firefox Rest Client add-on

stian
Download Presentation

Catalog REST for data providers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Catalog RESTfor data providers ECHO Technical Interchange 04/30/13 3:15pm EST Doug Newman

  2. Rationale • Troubleshooting your data issues • Managing your data • Surgical fixes (REST providers only) • On a provider, dataset and granule level

  3. Tools to follow along • Firefox Rest Client add-on http://restclient.net/ • Chrome Advanced Rest Client add-on https://chrome.google.com/webstore/detail/advanced-rest-client • IE – on your own • Command line curl

  4. Things you need to know • HTTP • REST (GET, POST, PUT, DELETE) • XML • ECHO ingest

  5. The key to the kingdom (tokens) Request: • POST https://api.echo.nasa.gov/echo-rest/tokens Body: <token> <username>ops urs username</username> <password>ops urs password</password> <client_id>your id</client_id> <user_ip_address>your IP address</user_ip_address> </token> Headers: • Content-Type: application/xml Response: <?xml version="1.0" encoding="UTF-8"?> <token> <id>XXDD5E8D-039C-6386-FF50-D8DC24009051</id> <username>ops urs username</username> <client_id>your id</client_id> <user_ip_address>your IP address</user_ip_address> </token>

  6. Your provider Requests: • GET https://api.echo.nasa.gov/catalog-rest/providers/<provider_id> • PUT https://api.echo.nasa.gov/catalog-rest/providers/<provider_id> Headers: • Accept: application/xml • Content-Type: application/xml • Echo-Token: your token value

  7. Your datasets Requests: • GET https://api.echo.nasa.gov/catalog-rest/providers/<provider id>/datasets/<dataset id> • PUT https://api.echo.nasa.gov/catalog-rest/providers/<provider id>/datasets/<dataset id> A note about encoding: you may have to url-encode your dataset id, etc (not with FF Rest Client) Headers: • Accept: application/xml • Content-Type: application/xml • Echo-Token: your token value

  8. Your granules Requests: • GET https://api.echo.nasa.gov/catalog-rest/providers/<provider id>/granules/<granule id> • PUT https://api.echo.nasa.gov/catalog-rest/providers/<provider id>/granules/<granule id> • DELETE https://api.echo.nasa.gov/catalog-rest/providers/<provider id>/granules/<granule id> A note about encoding: you may have to url-encode your granule id etc (not with FF Rest Client) Headers: • Accept: application/xml • Content-Type: application/xml • Echo-Token: your token value

  9. Visibility to your users https://api.echo.nasa.gov/catalog-rest/echo_catalog/ • datasets.xml • datasets.xml?dataset_id=my_dataset_id • datasets.xml?provider=my_provider • datasets.xml?provider=my_provider&page_size=20&page_num=2 • granules.xml • granules.xml?granule_ur=my_granule_ur • granules.xml?dataset_id=my_dataset_id • granules.xml?dataset_id=my_dataset_id&page_size=20&page_num=2 https://api.echo.nasa.gov/catalog-rest/catalog-docs/index.html

  10. With great power… “I can do that? ” YES

  11. Questions?

More Related