Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update examples.md to include 'last page' response example #449

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions item-search/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,43 @@ 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`:
Expand Down