-
Notifications
You must be signed in to change notification settings - Fork 2
Create API.md #1
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bc69777
Create API.md
abarciauskas-bgse 0d11ef8
Merge branch 'main' of https://github.com/developmentseed/titiler-cmr…
vincentsarago 1a9164e
update from main
vincentsarago 6962712
Merge branch 'develop' of https://github.com/developmentseed/titiler-…
vincentsarago 67b52d0
update docs
vincentsarago File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# API Specification | ||
|
||
## API Specification for /tiles/x/y/z Endpoint | ||
|
||
## Endpoint Description | ||
|
||
`GET /tiles/{x}/{y}/{z}` | ||
|
||
This endpoint provides tiled data for specific geographical locations and times. Tiles are defined by their x, y, and z coordinates. | ||
|
||
## Parameters | ||
|
||
- **Path Parameters:** | ||
- `x` (integer): The x coordinate of the tile. | ||
- `y` (integer): The y coordinate of the tile. | ||
- `z` (integer): The zoom level of the tile. | ||
|
||
- **Query Parameters:** | ||
- `collection_concept_id` (string, required): The concept ID of the collection. | ||
- `variable` (string, required): The variable of interest. | ||
- `timestamp` (string, required): The time for which data is requested, in ISO 8601 format. | ||
- `colormap` (string, optional): The name of the colormap to apply. | ||
- `rescale` (string, optional): The rescale range in the format `min,max`. | ||
|
||
## Request Example | ||
|
||
GET /tiles/1/2/3?collection_concept_id=C0000000000-YOCLOUD&variable=temperature×tamp=2024-01-16T00:00:00Z&colormap=viridis&rescale=0,100 | ||
|
||
|
||
## Responses | ||
|
||
- **200 OK:** | ||
- Description: Successful response with tile data. | ||
- Content type: `image/png` | ||
- Body: [Binary Data] | ||
|
||
- **400 Bad Request:** | ||
- Description: The request is invalid. This can happen with missing required parameters or invalid parameter values. | ||
- Content type: `application/json` | ||
- Body: | ||
```json | ||
{ | ||
"error": "Invalid request parameters." | ||
} | ||
``` | ||
|
||
- **404 Not Found:** | ||
- Description: No data found for the specified parameters. | ||
- Content type: `application/json` | ||
- Body: | ||
```json | ||
{ | ||
"error": "No data found for the provided coordinates and time." | ||
} | ||
``` | ||
|
||
- **500 Internal Server Error:** | ||
- Description: Generic server error message for when an error has occurred on the server. | ||
- Content type: `application/json` | ||
- Body: | ||
```json | ||
{ | ||
"error": "Internal server error." | ||
} | ||
``` | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abarciauskas-bgse I think we should try to follow the OGC specification here and use something like
we will also add