Skip to content

Commit

Permalink
cmr-7220 follow up: changed tag, updated api doc (#1239)
Browse files Browse the repository at this point in the history
* CMR-7220
* updating api doc
* changing the tag, removing a period, now is gov.nasa.earthdatacloud.s3
  • Loading branch information
jceaser authored Apr 30, 2021
1 parent f7acc67 commit 0b59a8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions indexer-app/src/cmr/indexer/data/concepts/tag.clj
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

(def earthdata-cloud-s3-tag
"The Earthdata cloud tag for s3 resources"
"gov.nasa.earthdata.cloud.s3")
"gov.nasa.earthdatacloud.s3")

(defn has-cloud-s3-tag?
"Looks through a list of tags and returns true if one of them is the
gov.nasa.earthdata.cloud.s3 tag"
earthdata-cloud-s3-tag"
[tags]
(some? (some #(= (:tag-key-lowercase %) earthdata-cloud-s3-tag) tags)))
2 changes: 1 addition & 1 deletion indexer-app/test/cmr/indexer/test/data/concepts/tag.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

(deftest does-has-cloud-s3-tag-work
"The function has-cloud-s3-tag should only return true if there is a
gov.nasa.earthdata.cloud.s3 tag in the list"
earthdata-cloud-s3-tag in the list"
(let [bad1 (create-tag "This-Is-Not-The-Tag-Your-Looking-For" "My-Id" "Value")
bad2 (create-tag "This-Is-Also-Not-The-Tag-Your-Looking-For" "My-Id" "Value")
good (create-tag tag/earthdata-cloud-s3-tag "My-Id" "Value")
Expand Down
4 changes: 3 additions & 1 deletion search-app/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,9 @@ The `has_granules_or_opensearch` parameter can be set to "true" or "false". When

curl "%CMR-ENDPOINT%/collections?has_opendap_url=true"

#### <a name="c-cloud-hosted"></a> Find collections that have a `DirectDistributionInformation` element or have been tagged with `gov.nasa.earthdata.cloud.s3`.
#### <a name="c-cloud-hosted"></a> Find collections with data that is hosted in the cloud.

The `cloud_hosted` parameter can be set to "true" or "false". When true, the results will be restricted to collections that have a `DirectDistributionInformation` element or have been tagged with `gov.nasa.earthdatacloud.s3`.

curl "%CMR-ENDPOINT%/collections?cloud_hosted=true"

Expand Down

0 comments on commit 0b59a8e

Please sign in to comment.