-
Notifications
You must be signed in to change notification settings - Fork 0
API Docs
Welcome to the EKAPEx-Demo wiki!
This document provides a detailed reference for the endpoints defined in app/api/routes.py.
Used for specifying a time range for data retrieval.
{
"baseTime": 1609459200,
"validTime": [1609459200, 1609462800]
}GET /temp_compare/{city_name}/{base_time}
Compares temperature data between GraphCast, Cerrora (prediction), and Ground Truth for a specific city and base time.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
city_name |
Path | string | Yes | Name of the city to compare. |
base_time |
Path | integer | Yes | Base timestamp (Unix epoch). |
| Code | Description | Media Type |
|---|---|---|
| 200 | Successful Response | application/json |
| 422 | Validation Error | application/json |
{
"ground_truth": {
"0": 285.15,
"1": 286.20
},
"cerrora": {
"0": 284.90,
"1": 285.50
},
"graphcast": {
"0": 285.00,
"1": 286.00
}
}GET /get_cordinates/{city_name}
Retrieves coordinate details for a specific city.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
city_name |
Path | string | Yes | Name of the city. |
| Code | Description | Media Type |
|---|---|---|
| 200 | Successful Response | application/json |
| 422 | Validation Error | application/json |
{
"latitude": "48.86129",
"longitude": "2.34049",
"France": {
"minlat": 47.2701114,
"minlon": 5.8663153,
"maxlat": 55.099161,
"maxlon": 15.0419309
}
}POST /data/temp_wind/{model_type}
Generates or retrieves temperature and wind visualization data.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
model_type |
Path | string | Yes | Model type to use. |
| Type | Required | Description |
|---|---|---|
TimeRange |
Yes | Time range for data retrieval. |
Schema:
{
"baseTime": 0,
"validTime": [0]
}| Code | Description | Media Type |
|---|---|---|
| 200 | Successful Response | application/json |
{
"images": [
{
"timestamp": "1609459200_1609462800",
"url": "http://api.url/path/to/image.webp"
}
]
}POST /data/geo/{model_type}
Generates or retrieves geopotential visualization data.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
model_type |
Path | string | Yes | Model type to use. |
| Type | Required | Description |
|---|---|---|
TimeRange |
Yes | Time range for data retrieval. |
| Code | Description | Media Type |
|---|---|---|
| 200 | Successful Response | application/json |
{
"images": [
{
"timestamp": "1609459200_1609462800",
"url": "http://api.url/path/to/image.webp"
}
]
}POST /data/rain
Generates or retrieves precipitation (rain) visualization data using the active model.
No path parameters
| Type | Required | Description |
|---|---|---|
TimeRange |
Yes | Time range for data retrieval. |
| Code | Description | Media Type |
|---|---|---|
| 200 | Successful Response | application/json |
| 500 | Internal Server Error | application/json |
{
"images": [
{
"timestamp": "1609459200_1609462800",
"url": "http://api.url/path/to/image.webp"
}
]
}POST /data/sea_level/{model_type}
Generates or retrieves mean sea level pressure visualization data.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
model_type |
Path | string | Yes | Model type to use. |
| Type | Required | Description |
|---|---|---|
TimeRange |
Yes | Time range for data retrieval. |
| Code | Description | Media Type |
|---|---|---|
| 200 | Successful Response | application/json |
{
"images": [
{
"timestamp": "1609459200_1609462800",
"url": "http://api.url/path/to/image.webp"
}
]
}GET /base-times/{model_type}
Retrieves available base times for a specific model and variable.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
model_type |
Path | string | Yes | Model to query. |
variableType |
Query | string | No | Variable type (e.g., temp_wind). |
queryTime |
Query | string | No | Specific time to query. |
| Code | Description | Media Type |
|---|---|---|
| 200 | Successful Response | application/json |
| 400 | Bad Request | application/json |
| 500 | Internal Server Error | application/json |
[
{
"label": "Fri 01 Jan 2021 00 UTC",
"value": "1609459200"
},
{
"label": "Fri 01 Jan 2021 12 UTC",
"value": "1609502400"
}
]GET /valid-times/{model_type}
Retrieves available valid times for predictions.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
model_type |
Path | string | Yes | Model to query. |
variableType |
Query | string | No | Variable type. |
queryTime |
Query | string | No | Specific time to query. |
| Code | Description | Media Type |
|---|---|---|
| 200 | Successful Response | application/json |
[
{
"label": "Fri 01 Jan 2021 06 UTC",
"value": "1609480800"
}
]