From a42b9b22e6384d0101ef2e9cb2167a6573a6e010 Mon Sep 17 00:00:00 2001 From: Marten Date: Fri, 5 Jul 2024 10:08:00 -0700 Subject: [PATCH 1/2] Update examples.md added 'last page' response example --- item-search/examples.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/item-search/examples.md b/item-search/examples.md index 4eea6ffb..a6c8750f 100644 --- a/item-search/examples.md +++ b/item-search/examples.md @@ -50,6 +50,41 @@ Response with `200 OK`: Following the link `https://stac-api.example.com/search?page=2` will send the user to the next page of results. +#### Simple GET based search showing the last page of results + +Request: +``` +HTTP GET /search?bbox=-110,39.5,-105,40.5 +``` + +Response with `200 OK`: + +```json +{ + "type": "FeatureCollection", + "features": [], + "links": [ + { + "rel": "first", + "href": "https://stac-api.example.com/search?page=1", + "type": "application/geo+json" + }, + { + "rel": "prev", + "href": "https://stac-api.example.com/search?page=7", + "type": "application/geo+json" + }, + { + "rel": "root", + "href": "https://stac-api.example.com/", + "type": "application/json" + } + ] +} +``` + +Notice the absence of a `next` link. This indicates to the client that this response is the last page of results for the submitted request. + #### POST search with body and merge fields Request to `HTTP POST /search`: From be10ca5f7dba98681db583fd850837324225ead5 Mon Sep 17 00:00:00 2001 From: Marten Date: Sun, 7 Jul 2024 18:12:23 -0700 Subject: [PATCH 2/2] Update examples.md added ... in the results to indicate a non-empty result. note, the first 'simple GET based search' also shows an empty result list --- item-search/examples.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/item-search/examples.md b/item-search/examples.md index a6c8750f..e06bfb94 100644 --- a/item-search/examples.md +++ b/item-search/examples.md @@ -62,7 +62,9 @@ Response with `200 OK`: ```json { "type": "FeatureCollection", - "features": [], + "features": [ + ... + ], "links": [ { "rel": "first",