You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: search-app/docs/src/content/docs/1-requests.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,17 @@ title: Requests
3
3
description: Provides foundational request information for the CMR API.
4
4
---
5
5
6
-
###<aname="general-request-details"></a> General Request Details
6
+
## <aname="general-request-details"></a> General Request Details
7
7
8
-
####<aname="maximum-url-length"></a> Maximum URL Length
8
+
### <aname="maximum-url-length"></a> Maximum URL Length
9
9
10
10
The Maximum URL Length supported by CMR is indirectly controlled by the Request Header Size setting in Jetty which is set to 1MB. This translates to roughly 500k characters, however it is recommended that any GET request be limited to 6,000 characters, and in a web browser the recommended length is no longer than 2000 characters. Clients using the Search API with query parameters should be careful not to exceed this limit or they will get an HTTP response of 413 FULL HEAD. If a client expects that the query url could be extra long so that it exceeds 6k characters, they should use the POST API for searching.
11
11
12
-
####<aname="cors-header-support"></a> CORS Header support
12
+
### <aname="cors-header-support"></a> CORS Header support
13
13
14
14
The CORS headers are supported on search endpoints. Check [CORS Documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) for an explanation of CORS headers. Custom CORS request headers supported are Authorization, Client-Id, CMR-Request-Id, X-Request-Id, CMR-Scroll-Id (**deprecated**) and CMR-Search-After. Custom response headers supported are CMR-Hits, CMR-Request-Id, X-Request-Id, CMR-Scroll-Id (**deprecated**), CMR-Search-After, CMR-Timed-Out, CMR-Shapefile-Original-Point-Count and CMR-Shapefile-Simplified-Point-Count.
*`page_size` - Number of results per page - default is 10, max is 2000.
19
19
*`page_num` - The page number to return. (**deprecated**)
@@ -24,7 +24,7 @@ The CORS headers are supported on search endpoints. Check [CORS Documentation](h
24
24
*`token` - Specifies a user token from EDL or Launchpad for use as authentication. Using the standard [Authorization header](#headers) is the prefered way to supply a token. This parameter may be deprecated in the future.
25
25
*`echo_compatible` - When set to true results will be returned in an ECHO compatible format. This mostly removes fields and features specific to the CMR such as revision id, granule counts and facets in collection results. Metadata format style results will also use ECHO style names for concept ids such as `echo_granule_id` and `echo_dataset_id`.
26
26
27
-
####<aname="paging-details"></a> Paging Details
27
+
### <aname="paging-details"></a> Paging Details
28
28
29
29
__NOTE:__ Deep paging is being deprecated in favor of [Search After](#search-after). Please switch your scroll based queries to [Search After](#search-after) which is more efficient and easier to use.
30
30
@@ -38,7 +38,7 @@ __Note__: In the event which an ingest or delete occurs between paging requests,
38
38
39
39
You can not page past the 1 millionth item. Please contact the CMR Team at cmr-support@nasa.gov if you need to retrieve items in excess of 1 million from the CMR. Additionally granule queries which do not target a set of collections are limited to paging up to the 10,000th item.
40
40
41
-
####<aname="search-after"></a> Search After
41
+
### <aname="search-after"></a> Search After
42
42
43
43
__NOTE__: This is currently the prefered way to request large sets of records.
There will be only 8 granules in the result set. We can deem the search has reached the end because the number of results returned is less than the page_size, but if we search again with the new `CMR-Search-After` header value returned, we will get an empty result set and there won't be a `CMR-Search-After` header in the response.
__IMPORTANT:__ Scrolling is deprecated and will be disabled in the future. When disabled, requests using CMR-Scroll-Id or scroll parameter will return HTTP 400 errors with instructions to migrate to [Search After](#search-after). Please migrate your applications to use the Search After pattern instead, which is more efficient and easier to use.
85
85
@@ -93,7 +93,7 @@ When all the results have been returned subsequent calls using the same `CMR-Scr
93
93
94
94
Important note: Clients using scrolling (especially via programmatic API or scripts) should explicitly invoke [`clear scroll session`] (#clear-scroll) to release the scroll session when they are finished. This will end the scroll session and free up system resources.
The behavior of search with respect to each parameter can be modified using the `options` parameter. The `options` parameter takes the following form:
99
99
@@ -106,7 +106,7 @@ where parameter is the URL parameter whose behavior is to be affected, value is
106
106
*`and` - if set to true and if multiple values are listed for the param, the concepts must have ALL of these values in order to match. The default is `false` which means concepts with ANY of the values match. This option only applies to fields which may be multi-valued; these are documented here.
107
107
*`or` - this option only applies to granule attributes or science-keywords searches. If set to true, the collection/granule will match when any of the grouped search condition is matched. The default is false.
108
108
109
-
#####<aname="collection-result-features"></a> Collection Result Feature Parameters
109
+
#### <aname="collection-result-features"></a> Collection Result Feature Parameters
110
110
111
111
These are query parameters that control what extra data is included with collection search results. They do not impact which collections are matched but can add additional data to the search results like facets, granule counts, and tags.
112
112
@@ -124,9 +124,9 @@ These are query parameters that control what extra data is included with collect
124
124
_The `include_highlights` feature is only supported for the JSON response format and only applies to keyword searches._
125
125
126
126
127
-
####<aname="headers"></a> HTTP Headers
127
+
### <aname="headers"></a> HTTP Headers
128
128
129
-
#####Request Headers
129
+
#### Request Headers
130
130
`Accept` - specifies the MimeType to return search results in. Default is "application/xml".
@@ -147,7 +147,7 @@ These are query parameters that control what extra data is included with collect
147
147
148
148
`CMR-Request-Id` - This header serves the same purpose as `X-Request-Id` header. It is kept to support legacy systems.
149
149
150
-
#####The response headers
150
+
#### The response headers
151
151
152
152
*`CMR-Hits` and `CMR-Took` indicate the number of result hits and the time to build and execute the query, respectively.
153
153
*`CMR-Request-Id` and `X-Request-Id` return the same value - the value passed in through `CMR-Request-Id` request header or `X-Request-Id` request header or a unique id generated for the client request when no value is passed in, This can be used to help debug client errors.
@@ -156,7 +156,7 @@ These are query parameters that control what extra data is included with collect
156
156
*`content-md5` returns the MD5 hash of the content.
157
157
*`content-sha1` returns the SHA1 hash value for the content.
158
158
159
-
####<aname="extensions"></a> Extensions
159
+
### <aname="extensions"></a> Extensions
160
160
161
161
Besides MimeTypes, client can also use extensions to specify the format for search results. Default is xml.
162
162
@@ -189,13 +189,13 @@ Here is a list of supported extensions and their corresponding MimeTypes:
189
189
190
190
__NOTE__: As of version "%CMR-RELEASE-VERSION%", the latest UMM Collection version is `%COLLECTION-UMM-VERSION%`.
In order to provide robust availability and performance for all clients of the service, CMR Search deploys a set of rate throttling rules for request traffic. These rules are defined to target specific request signatures, throttling the allowed rate of these searches in an effort to prevent overall degradation of system performance and availability. If a client request should exceed one of these rate throttling rules, the request will be rejected and a `429` error status returned to the client along with a `retry-after` header value. The suggested practice for any CMR Search client is to honor the `retry-after` header value and delay accordingly before re-issuing the failed request and continuing with its CMR Search processing.
###<aname="temporal-range-searches"></a> Temporal Range searches
41
+
## <aname="temporal-range-searches"></a> Temporal Range searches
42
42
43
43
A couple of parameters used in search expect a date range as input. For example, the parameter "temporal" used in collection and granule searches and the parameter "equator_crossing_longitude" used in granule searches both accept date ranges. All these parameters expect temporal ranges in the same format. The temporal ranges can be specified as a pair of date-time values separated by comma(,). Exactly one of the two bounds of the interval can be omitted. In addition to comma separated values, one can also specify temporal ranges as [ISO 8601 time intervals](https://en.wikipedia.org/?title=ISO_8601#Time_intervals). Some examples of valid temporal range values are:
44
44
@@ -54,7 +54,7 @@ A couple of parameters used in search expect a date range as input. For example,
54
54
55
55
__Note__: ISO 8601 does not allow open-ended time intervals but the CMR API does allow specification of intervals which are open ended on one side. For example, `2000-01-01T10:00:00Z/` and `/2000-01-01T10:00:00Z` are valid ranges.
56
56
57
-
###<aname="search-for-tiles"></a> Search for Tiles
57
+
## <aname="search-for-tiles"></a> Search for Tiles
58
58
59
59
Tiles are geographic regions formed by splitting the world into rectangular regions in a projected coordinate system such as Sinusoidal Projection based off an Authalic Sphere. CMR supports searching of tiles which fall within a geographic region defined by a given input geometry. Currently, only tiles in MODIS Integerized Sinusoidal Grid(click [here](https://lpdaac.usgs.gov/products/modis_products_table/modis_overview) for more details on the grid) can be searched. The input geometry could be either a minimum bounding rectangle or one of point, line or polygon in spherical coordinates. The input coordinates are to be supplied in the same format as in granule and collection spatial searches (See under "Find granules by Spatial").
60
60
@@ -79,7 +79,7 @@ Find all the tiles which a line intersects.
79
79
80
80
The output of these requests is a list of tuples containing tile coordinates, e.g: [[16,8],[16,9],[17,8],[17,9]], in the JSON format. The first value in each tuple is the horizontal grid coordinate(h), i.e. along east-west and the second value is the vertical grid coordinate(v), i.e. along north-south.
The keyword endpoint is used to retrieve the full list of keywords for each of the controlled vocabulary fields. The controlled vocabulary is cached within CMR, but the actual source is the GCMD Keyword Management System (KMS). Users of this endpoint are interested in knowing what the CMR considers as the current controlled vocabulary, since it is the cached CMR values that will eventually be enforced on CMR ingest.
85
85
@@ -171,9 +171,9 @@ Note: Search parameter filtering are not supported - requests are rejected when
171
171
}
172
172
```
173
173
174
-
###<aname="supported-result-formats"></a> Supported Result Formats
174
+
## <aname="supported-result-formats"></a> Supported Result Formats
175
175
176
-
####<aname="html"></a> HTML
176
+
### <aname="html"></a> HTML
177
177
178
178
The HTML response format is intended to be used only in a web browser to view a single collection record. The collection html representation can be viewed by putting the following in the web browser address bar.
179
179
@@ -186,7 +186,7 @@ For private collection, an EDL bearer token or a Launchpad token can be used to
See the [Atom specification](http://tools.ietf.org/html/rfc4287) for a full description of Atom.
192
192
@@ -301,7 +301,7 @@ __Example__
301
301
</feed>
302
302
```
303
303
304
-
####<aname="csv"></a> CSV
304
+
### <aname="csv"></a> CSV
305
305
306
306
The comma separated value (CSV) format is supported for collections and granules.
307
307
Version and Processing Level are strings. When importing into the spreadsheet, please specify text as their column types. This will prevent version "004" to be displayed as "4" in the spreadsheet.
All of the XML Metadata formats (except the XML used in returning references only) have the same structure, differing only in the way each result is returned. These formats return a single XML document with a `<results>` XML element containing the following fields as sub-elements:
327
327
@@ -339,7 +339,7 @@ The results are returned as a sequence of `<result>` XML elements, the contents
339
339
| format | the mime-type for the returned metadata |
340
340
| revision-id | the CMR revision number of the stored concept |
341
341
342
-
####<aname="dif-9"></a> DIF 9
342
+
### <aname="dif-9"></a> DIF 9
343
343
344
344
__NOTE:__ The DIF 9 format is being __deprecated__ in favor of DIF 10. While it is still supported, we strongly discourage its use for new metadata.
345
345
@@ -386,7 +386,7 @@ __Example__
386
386
</results>
387
387
```
388
388
389
-
####<aname="dif-10"></a> DIF 10
389
+
### <aname="dif-10"></a> DIF 10
390
390
391
391
See the [specification](https://cdn.earthdata.nasa.gov/dif/10.x/) for details.
392
392
@@ -454,7 +454,7 @@ __Example__
454
454
</results>
455
455
```
456
456
457
-
####<aname="echo-10"></a> ECHO 10
457
+
### <aname="echo-10"></a> ECHO 10
458
458
459
459
See the [specification](https://cdn.earthdata.nasa.gov/echo/schemas/10.0/) for details.
See the [specification](https://cdn.earthdata.nasa.gov/iso/)
498
498
@@ -591,7 +591,7 @@ __Example__
591
591
</results>
592
592
```
593
593
594
-
####<aname="iso-smap"></a> ISO-SMAP
594
+
### <aname="iso-smap"></a> ISO-SMAP
595
595
596
596
See the [specification](https://cdn.earthdata.nasa.gov/iso/)
597
597
@@ -677,7 +677,7 @@ __Example__
677
677
</results>
678
678
```
679
679
680
-
####<aname="json"></a> ATOM JSON
680
+
### <aname="json"></a> ATOM JSON
681
681
682
682
The JSON response contains all the fields in the *ATOM* response, plus the the following fields:
683
683
@@ -770,7 +770,7 @@ __Example__
770
770
}
771
771
```
772
772
773
-
####<aname="umm-json"></a> UMM JSON
773
+
### <aname="umm-json"></a> UMM JSON
774
774
775
775
The UMM JSON response, unlike ATOM JSON, contains "meta-metadata" of the collection and the UMM fields. The UMM JSON format is applicable to collection, granule, variable, service and tool searches. The UMM-JSON response is helpful if you wish to get the native-id of a concept after ingesting it. The version of the UMM returned will be the version requested or the latest version. Clients are recommended to always specify a version to avoid breaking changes in UMM.
776
776
@@ -903,7 +903,7 @@ __Example__
903
903
904
904
A collection containing "\_errors" is not valid UMM and cannot be ingested into the CMR.
905
905
906
-
####<aname="kml"></a> KML
906
+
### <aname="kml"></a> KML
907
907
908
908
KML is the [XML language](http://www.opengeospatial.org/standards/kml) used by the Google Earth application and is used by the CMR to return spatial data associated with a collection or granule.
909
909
@@ -959,7 +959,7 @@ __Example__
959
959
</kml>
960
960
```
961
961
962
-
####<aname="open-data"></a> Open Data
962
+
### <aname="open-data"></a> Open Data
963
963
964
964
The Open Data format was developed as part of [Project Open Data](https://project-open-data.cio.gov) in an attempt to make data more accessible. See the Open Data [schema](https://project-open-data.cio.gov/v1.1/schema/) for details.
965
965
@@ -997,7 +997,7 @@ __Example__
997
997
}
998
998
```
999
999
1000
-
####<aname="stac"></a> STAC
1000
+
### <aname="stac"></a> STAC
1001
1001
1002
1002
The STAC (SpatioTemporal Asset Catalog) result format is a specification for describing geospatial data with JSON and GeoJSON. The related STAC-API specification defines an API for searching and browsing STAC catalogs. See the [STAC Specification](https://stacspec.org/) for details.
1003
1003
@@ -1190,7 +1190,7 @@ __Granule Retrieval in STAC Format Response Example via POST__
1190
1190
}
1191
1191
}
1192
1192
```
1193
-
####<aname="xml-reference"></a> XML
1193
+
### <aname="xml-reference"></a> XML
1194
1194
1195
1195
The XML response format is used for returning references to search results. It consists of the following fields:
0 commit comments