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

Compare with Current View Page History

« Previous Version 16 Next »

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

When this tag exists on a collection, clicking "Download Granules" in Earthdata search when too many granules of the collection are selected will display an error message, and order will not be allowed.

The limit can be configured by the provider per collection as needed to ensure large orders do not adversely impact provider operations.

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 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. Associate each collection with the edsc.limited_collections tag, and set the limit:

    --- to associate a single collection with the edsc.limited_collections tag and set an order limit, create a tag association and include a data field named "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 associate multiple collections with the tag and set limits, you will have to first find all the concept_ids and then do it one at a time.  See examples in ticket  EDSC-1591 - Getting issue details... STATUS

The following command shows the tags for a given collection in PROD (the tags can be found in the tags field):

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

The following command shows all collections that are tagged with the order limit tag edsc.limited_collections:

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