You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 34 Next »

This describes how to limit the number of granules per order for a collection in Earthdata Search by setting a tag on the collection. 

This functionality allows providers to specify collection-specific order limits as needed to ensure large orders do not adversely impact provider operations.

For a properly tagged collection, clicking "Download Granules" in Earthdata Search when too many granules are selected will display an error message, and the order will not be allowed.

The tag is edsc.limited_collections, and the order limit is specified in the tag data field "limit".

Step-by-step guide

  1. If you do not already have one, generate an ECHO token.  (Note: the id field in the response to the following command is your new token.)

    curl -XPOST \
      https://cmr.earthdata.nasa.gov/legacy-services/rest/tokens \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/xml' \
      -d '<token>
        <username>--ask task lead--</username>
        <password>--ask task lead--</password>
        <client_id>--ED Login client ID. Look it up in EECS or services.yml.erb--</client_id>
        <user_ip_address>--a valid IP address, can be anything. For example, 127.0.0.1--</user_ip_address>
    </token>’
  2. Tag each collection to be limited with the edsc.limited_collections tag, setting desired the order limit:

    --- to tag a single collection with the edsc.limited_collections tag and set the order limit, create a tag association with the desired limit:

    curl -XPOST \
     -i \
     -H "Content-Type: application/json" \ 
     -H "Echo-Token: <token from first step>" \
     https://cmr.earthdata.nasa.gov/search/tags/edsc.limited_collections/associations \
     -d '[{"concept_id":"C12345-DAAC_NAME", "data":{"limit":2000}}]'

    ---to tag multiple collections with the tag and set limits,

    curl -XPOST \
     -i \
     -H "Content-Type: application/json" \ 
     -H "Echo-Token: <token from first step>" \
     https://cmr.earthdata.nasa.gov/search/tags/edsc.limited_collections/associations \
     -d '[{"concept_id":"C00001-DAAC_NAME", "data":{"limit":2000}}, \
     "C00002-DAAC_NAME", "data":{"limit":2000}}, \
     "C00003-DAAC_NAME", "data":{"limit":2000}}, \
     "C00004-DAAC_NAME", "data":{"limit":2000}}, \ 
     "C00005-DAAC_NAME", "data":{"limit":2000}}, \
     "C00006-DAAC_NAME", "data":{"limit":2000}}, \
     "C00007-DAAC_NAME", "data":{"limit":2000}}, \
     "C00008-DAAC_NAME", "data":{"limit":2000}}, \
     "C00009-DAAC_NAME", "data":{"limit":2000}}, \
     "C00010-DAAC_NAME", "data":{"limit":2000}}]'
    


    see examples in ticket  EDSC-1591 - Getting issue details... STATUS

How to: show tags for a given collection (all tags will be returned in the field labeled "tags"):

curl -s "https://cmr.earthdata.nasa.gov/search/collections.json?include_tags=*&concept_id=C12345-DAAC_NAME"

How to: show all collections tagged with the order limit tag:

curl "https://cmr.earthdata.nasa.gov/search/collections?tag_key=edsc.limited_collections" 

CRM Search API: tagging

Limited order collections



  • No labels