This functionality can be used to limit the # of granules which are allowed to be ordered for a given collection in EDSC. This limit can be configured by the provider as needed in order to ensure that large orders do not adversely impact provider operations.
id
field in the response is the 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>’
edsc.limited_collections
, if it doesn't already exist.curl -XPOST -i -H "Content-Type: application/json" -H "Echo-Token: <token from first step>" https://cmr.sit.earthdata.nasa.gov/search/tags -d \ '{"tag_key": "edsc.limited_collections", "description":"give an optional description"}'
edsc.limited_collections
tag: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-1591Getting issue details... STATUS
The following command to shows all cmr info including tags for a given collection in PROD, in this case :
curl -s "https://cmr.earthdata.nasa.gov/search/collections.json?include_tags=*&concept_id=C12345-DAAC_NAME"
The following command shows all collections that have have the order limit tag:
curl "https://cmr.earthdata.nasa.gov/search/collections?tag_key=edsc.limited_collections"