Skip to content
Open
Show file tree
Hide file tree
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
257 changes: 254 additions & 3 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -806,11 +806,72 @@
}
},
"/dataset/{dataset}/tiles": {
"get": {
"tags": [
"Datasets"
],
"summary": "Retrieves details about a dataset using the internal name.",
"operationId": "get_dataset_tiles_handler",
"parameters": [
{
"name": "dataset",
"in": "path",
"description": "Dataset Name",
"required": true,
"schema": {
"$ref": "#/components/schemas/DatasetName"
}
},
{
"name": "offset",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32",
"minimum": 0
}
},
{
"name": "limit",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DatasetTile"
}
}
}
}
},
"401": {
"$ref": "#/components/responses/UnauthorizedUserResponse"
}
},
"security": [
{
"session_token": []
}
]
},
"post": {
"tags": [
"Datasets"
],
"summary": "Add a tile to a gdal dataset.",
"summary": "Add tiles to a gdal dataset.",
"operationId": "add_dataset_tiles_handler",
"parameters": [
{
Expand All @@ -827,15 +888,121 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AutoCreateDataset"
"type": "array",
"items": {
"$ref": "#/components/schemas/AddDatasetTile"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": ""
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DatasetTileId"
}
}
}
}
}
},
"security": [
{
"session_token": []
}
]
},
"delete": {
"tags": [
"Datasets"
],
"summary": "Retrieves details about a dataset using the internal name.",
"operationId": "delete_dataset_tiles_handler",
"parameters": [
{
"name": "dataset",
"in": "path",
"description": "Dataset Name",
"required": true,
"schema": {
"$ref": "#/components/schemas/DatasetName"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteDatasetTiles"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
},
"401": {
"$ref": "#/components/responses/UnauthorizedUserResponse"
}
},
"security": [
{
"session_token": []
}
]
}
},
"/dataset/{dataset}/tiles/{tile}": {
"put": {
"tags": [
"Datasets"
],
"summary": "Retrieves details about a dataset using the internal name.",
"operationId": "update_dataset_tile_handler",
"parameters": [
{
"name": "dataset",
"in": "path",
"description": "Dataset Name",
"required": true,
"schema": {
"$ref": "#/components/schemas/DatasetName"
}
},
{
"name": "tile",
"in": "path",
"description": "Tile Id",
"required": true,
"schema": {
"$ref": "#/components/schemas/DatasetTileId"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateDatasetTile"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
},
"401": {
"$ref": "#/components/responses/UnauthorizedUserResponse"
}
},
"security": [
Expand Down Expand Up @@ -6240,12 +6407,65 @@
}
}
},
"DatasetTile": {
"type": "object",
"required": [
"id",
"time",
"spatial_partition",
"band",
"z_index",
"params"
],
"properties": {
"band": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"id": {
"$ref": "#/components/schemas/DatasetTileId"
},
"params": {
"$ref": "#/components/schemas/GdalDatasetParameters"
},
"spatial_partition": {
"$ref": "#/components/schemas/SpatialPartition2D"
},
"time": {
"$ref": "#/components/schemas/TimeInterval"
},
"z_index": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
},
"DatasetTileId": {
"type": "string",
"format": "uuid"
},
"DateTimeParseFormat": {
"type": "string"
},
"DateTimeString": {
"type": "string"
},
"DeleteDatasetTiles": {
"type": "object",
"required": [
"tileIds"
],
"properties": {
"tileIds": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DatasetTileId"
}
}
}
},
"DerivedColor": {
"type": "object",
"required": [
Expand Down Expand Up @@ -10287,6 +10507,37 @@
}
}
},
"UpdateDatasetTile": {
"type": "object",
"required": [
"time",
"spatial_partition",
"band",
"z_index",
"params"
],
"properties": {
"band": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"params": {
"$ref": "#/components/schemas/GdalDatasetParameters"
},
"spatial_partition": {
"$ref": "#/components/schemas/SpatialPartition2D"
},
"time": {
"$ref": "#/components/schemas/TimeInterval"
},
"z_index": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
},
"UpdateLayer": {
"type": "object",
"required": [
Expand Down
12 changes: 11 additions & 1 deletion services/src/api/apidoc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#![allow(clippy::needless_for_each)] // TODO: remove when clippy is fixed for utoipa <https://github.com/juhaku/utoipa/issues/1420>

use crate::api::handlers;
use crate::api::handlers::datasets::{AddDatasetTile, VolumeFileLayersResponse};
use crate::api::handlers::datasets::{
AddDatasetTile, DatasetTile, DeleteDatasetTiles, UpdateDatasetTile, VolumeFileLayersResponse,
};
use crate::api::handlers::permissions::{
PermissionListOptions, PermissionListing, PermissionRequest, Resource,
};
Expand Down Expand Up @@ -68,6 +70,7 @@ use crate::api::{
};
use crate::contexts::SessionId;
use crate::datasets::listing::{DatasetListing, OrderBy};
use crate::datasets::postgres::DatasetTileId;
use crate::datasets::storage::{AutoCreateDataset, SuggestMetaData};
use crate::datasets::upload::{UploadId, VolumeName};
use crate::datasets::{DatasetName, RasterDatasetFromWorkflow, RasterDatasetFromWorkflowResult};
Expand Down Expand Up @@ -118,6 +121,9 @@ use utoipa::{Modify, OpenApi};
handlers::datasets::update_dataset_symbology_handler,
handlers::datasets::update_loading_info_handler,
handlers::datasets::add_dataset_tiles_handler,
handlers::datasets::get_dataset_tiles_handler,
handlers::datasets::update_dataset_tile_handler,
handlers::datasets::delete_dataset_tiles_handler,
handlers::layers::add_collection,
handlers::layers::add_existing_collection_to_collection,
handlers::layers::add_existing_layer_to_collection,
Expand Down Expand Up @@ -406,6 +412,10 @@ use utoipa::{Modify, OpenApi};
VolumeName,
DataPath,
AddDatasetTile,
DatasetTile,
DatasetTileId,
UpdateDatasetTile,
DeleteDatasetTiles,

PlotOutputFormat,
WrappedPlotOutput,
Expand Down
Loading