Files
yucca/packages/yucca-api-client/openapi-specs.json
T

1559 lines
35 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"openapi": "3.0.0",
"paths": {
"/api/auth": {
"get": {
"operationId": "getAuth",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthDto"
}
}
}
}
},
"tags": [
"Auth"
]
}
},
"/api/auth/logout": {
"get": {
"operationId": "logout",
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"Auth"
]
}
},
"/api/auth/oidc/login": {
"get": {
"operationId": "oidcAuthorize",
"parameters": [
{
"name": "code_challenge",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "state",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "redirect",
"required": false,
"in": "query",
"description": "In-app path to land on after login",
"schema": {
"type": "string"
}
},
{
"name": "discord_invite",
"required": false,
"in": "query",
"description": "Discord beta-invite token",
"schema": {
"type": "string"
}
},
{
"name": "invite_code",
"required": false,
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"Auth"
]
}
},
"/api/auth/oidc/callback": {
"get": {
"operationId": "oidcCallback",
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"Auth"
]
}
},
"/api/auth/oidc/device/identity": {
"get": {
"operationId": "oidcDeviceFlowIdentity",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeviceFlowEventDto"
}
}
}
}
},
"tags": [
"Auth"
]
}
},
"/api/auth/oidc/device": {
"get": {
"operationId": "oidcDeviceFlow",
"parameters": [
{
"name": "connection_type",
"required": false,
"in": "query",
"description": "immich | standalone | restic",
"schema": {
"type": "string"
}
},
{
"name": "connection_name",
"required": false,
"in": "query",
"description": "Instance name, e.g. a hostname",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeviceFlowEventDto"
}
}
}
}
},
"tags": [
"Auth"
]
}
},
"/api/auth/ticket": {
"post": {
"operationId": "createTicket",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TicketCreateRequestDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TicketCreateResponseDto"
}
}
}
}
},
"tags": [
"Auth"
]
}
},
"/api/auth/ticket/callback": {
"get": {
"operationId": "ticketCallback",
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"Auth"
]
}
},
"/api/auth/ticket/{id}": {
"get": {
"operationId": "getTicket",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TicketDto"
}
}
}
}
},
"tags": [
"Auth"
]
}
},
"/api/meta": {
"get": {
"operationId": "getMeta",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MetaResponseDto"
}
}
}
}
},
"tags": [
"Meta"
]
}
},
"/api/connections": {
"get": {
"operationId": "listConnections",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectionListResponseDto"
}
}
}
}
},
"tags": [
"Connection"
]
},
"post": {
"operationId": "createConnection",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectionCreateRequestDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectionResponseDto"
}
}
}
}
},
"tags": [
"Connection"
]
}
},
"/api/connections/{id}": {
"patch": {
"operationId": "updateConnection",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectionUpdateRequestDto"
}
}
}
},
"responses": {
"204": {
"description": ""
}
},
"tags": [
"Connection"
]
},
"delete": {
"operationId": "deleteConnection",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"Connection"
]
}
},
"/api/connections/{id}/adopt": {
"post": {
"operationId": "adoptRepositories",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectionAdoptRequestDto"
}
}
}
},
"responses": {
"204": {
"description": ""
}
},
"tags": [
"Connection"
]
}
},
"/api/discord/invites/{code}": {
"get": {
"operationId": "getDiscordInvite",
"parameters": [
{
"name": "code",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiscordInviteResponseDto"
}
}
}
}
},
"tags": [
"Discord"
]
}
},
"/api/discord/link-requests/{code}": {
"get": {
"operationId": "getDiscordLinkRequest",
"parameters": [
{
"name": "code",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiscordLinkRequestResponseDto"
}
}
}
}
},
"tags": [
"Discord"
]
}
},
"/api/discord/link-requests/{code}/confirm": {
"post": {
"operationId": "confirmDiscordLinkRequest",
"parameters": [
{
"name": "code",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"Discord"
]
}
},
"/api/metrics/submit/{repositoryId}/backup/start": {
"post": {
"operationId": "submitMetricBackupStart",
"parameters": [
{
"name": "repositoryId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"metrics"
]
}
},
"/api/metrics/submit/{repositoryId}/backup/end": {
"post": {
"operationId": "submitMetricBackupEnd",
"parameters": [
{
"name": "repositoryId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitBackupEndRequestDto"
}
}
}
},
"responses": {
"204": {
"description": ""
}
},
"tags": [
"metrics"
]
}
},
"/api/metrics/submit/{repositoryId}/size": {
"patch": {
"operationId": "submitMetricRepositorySize",
"parameters": [
{
"name": "repositoryId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitUpdateSizeRequestDto"
}
}
}
},
"responses": {
"204": {
"description": ""
}
},
"tags": [
"metrics"
]
}
},
"/api/metrics/submit/log": {
"post": {
"operationId": "submitStructuredLog",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitStructuredLogRequestDto"
}
}
}
},
"responses": {
"204": {
"description": ""
}
},
"tags": [
"metrics"
]
}
},
"/api/metrics/{repositoryId}/history": {
"get": {
"operationId": "listMetricsHistory",
"parameters": [
{
"name": "repositoryId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"schema": {
"default": 50,
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryMetricsHistoryListResponseDto"
}
}
}
}
},
"tags": [
"metrics"
]
}
},
"/api/repository": {
"post": {
"operationId": "createRepository",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryCreateRequestDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryCreateResponseDto"
}
}
}
}
},
"tags": [
"Repository"
]
},
"get": {
"operationId": "getRepositories",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryListResponseDto"
}
}
}
}
},
"tags": [
"Repository"
]
}
},
"/api/repository/{id}": {
"get": {
"operationId": "getRepository",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryGetResponseDto"
}
}
}
}
},
"tags": [
"Repository"
]
},
"patch": {
"operationId": "updateRepository",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryUpdateRequestDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryUpdateResponseDto"
}
}
}
}
},
"tags": [
"Repository"
]
},
"delete": {
"operationId": "deleteRepository",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
},
{
"name": "ticketId",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"Repository"
]
}
},
"/api/repository/{id}/restic": {
"post": {
"operationId": "createResticUrl",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryCreateResticUrlDto"
}
}
}
}
},
"tags": [
"Repository"
]
}
},
"/api/repository/{id}/worm": {
"delete": {
"operationId": "disableWorm",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
},
{
"name": "ticketId",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"Repository"
]
}
}
},
"info": {
"title": "yucca",
"description": "yucca API",
"version": "1.0.0",
"contact": {}
},
"tags": [],
"servers": [
{
"url": "/"
}
],
"components": {
"schemas": {
"AuthDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"sessionId": {
"type": "string"
},
"connectionId": {
"type": "string",
"nullable": true
},
"features": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
},
"required": [
"id",
"name",
"email",
"sessionId",
"features"
]
},
"DeviceFlowEventType": {
"type": "string",
"enum": [
"START",
"SUCCESS",
"FAILURE"
]
},
"DeviceFlowFailureReason": {
"type": "string",
"enum": [
"UNKNOWN",
"EMAIL_NOT_ALLOWED",
"FEATURE_NOT_ENABLED"
]
},
"DeviceFlowEventDto": {
"type": "object",
"properties": {
"type": {
"allOf": [
{
"$ref": "#/components/schemas/DeviceFlowEventType"
}
]
},
"userCode": {
"type": "string"
},
"verificationUri": {
"type": "string"
},
"accessToken": {
"type": "string"
},
"userId": {
"type": "string"
},
"reason": {
"allOf": [
{
"$ref": "#/components/schemas/DeviceFlowFailureReason"
}
]
}
},
"required": [
"type"
]
},
"TicketAction": {
"type": "string",
"enum": [
"repository.delete",
"repository.disable-worm"
]
},
"TicketCreateRequestDto": {
"type": "object",
"properties": {
"action": {
"allOf": [
{
"$ref": "#/components/schemas/TicketAction"
}
]
},
"repositoryId": {
"type": "string",
"description": "Repository the ticket is bound to"
}
},
"required": [
"action",
"repositoryId"
]
},
"TicketCreateResponseDto": {
"type": "object",
"properties": {
"redirectTo": {
"type": "string",
"description": "IdP URL the browser must be sent to"
}
},
"required": [
"redirectTo"
]
},
"RepositoryMetricsDto": {
"type": "object",
"properties": {
"lastBackup": {
"type": "string"
},
"lastSuccessfulBackup": {
"type": "string"
},
"lastBackupDuration": {
"type": "number"
},
"sizeBytes": {
"type": "number"
}
},
"required": [
"sizeBytes"
]
},
"RepositoryMeterDto": {
"type": "object",
"properties": {
"sizeBytes": {
"type": "number"
},
"objectCount": {
"type": "number"
},
"lastUpdated": {
"type": "string"
}
},
"required": [
"sizeBytes",
"objectCount"
]
},
"TicketDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"action": {
"allOf": [
{
"$ref": "#/components/schemas/TicketAction"
}
]
},
"repositoryId": {
"type": "string"
},
"repositoryName": {
"type": "string"
},
"metrics": {
"$ref": "#/components/schemas/RepositoryMetricsDto"
},
"meter": {
"$ref": "#/components/schemas/RepositoryMeterDto"
}
},
"required": [
"id",
"action",
"repositoryId",
"repositoryName",
"metrics"
]
},
"MetaConfigDto": {
"type": "object",
"properties": {
"restic_pack_size_mib": {
"type": "number"
},
"connections_math": {
"type": "string",
"description": "Client-evaluated expression: integers, cores, min, max, + - * /"
}
},
"required": [
"restic_pack_size_mib",
"connections_math"
]
},
"MetaConfigOverridesDto": {
"type": "object",
"properties": {
"restic_pack_size_mib": {
"type": "number"
},
"connections_math": {
"type": "string",
"description": "Client-evaluated expression: integers, cores, min, max, + - * /"
}
}
},
"MetaClusterDto": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"display_name": {
"type": "string"
},
"cluster_config": {
"description": "Per-cluster overrides of the global and site config",
"allOf": [
{
"$ref": "#/components/schemas/MetaConfigOverridesDto"
}
]
}
},
"required": [
"code",
"display_name",
"cluster_config"
]
},
"MetaSiteDto": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"display_name": {
"type": "string"
},
"description": {
"type": "string"
},
"rest_url": {
"type": "string"
},
"default_cluster": {
"type": "string"
},
"site_config": {
"description": "Per-site overrides of the global config",
"allOf": [
{
"$ref": "#/components/schemas/MetaConfigOverridesDto"
}
]
},
"clusters": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetaClusterDto"
}
}
},
"required": [
"code",
"display_name",
"description",
"rest_url",
"default_cluster",
"site_config",
"clusters"
]
},
"MetaResponseDto": {
"type": "object",
"properties": {
"api_root": {
"type": "string"
},
"config": {
"$ref": "#/components/schemas/MetaConfigDto"
},
"default_site": {
"type": "string"
},
"sites": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetaSiteDto"
}
}
},
"required": [
"api_root",
"config",
"default_site",
"sites"
]
},
"ConnectionDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"immich",
"standalone",
"restic"
]
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"lastSeenAt": {
"type": "string",
"nullable": true
},
"repositoryCount": {
"type": "number"
},
"sizeBytes": {
"type": "number",
"description": "Rolled-up storage across this connection’s repositories (RGW size)."
},
"objectCount": {
"type": "number",
"description": "Rolled-up object count across this connection’s repositories."
},
"billableBytes": {
"type": "number",
"description": "Billed bytes: per-object min-size floor applied (immich exempt)."
}
},
"required": [
"id",
"type",
"name",
"createdAt",
"repositoryCount",
"sizeBytes",
"objectCount",
"billableBytes"
]
},
"ConnectionListResponseDto": {
"type": "object",
"properties": {
"connections": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConnectionDto"
}
}
},
"required": [
"connections"
]
},
"ConnectionCreateRequestDto": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"immich",
"standalone",
"restic"
]
},
"name": {
"type": "string"
}
},
"required": [
"type",
"name"
]
},
"ConnectionResponseDto": {
"type": "object",
"properties": {
"connection": {
"$ref": "#/components/schemas/ConnectionDto"
}
},
"required": [
"connection"
]
},
"ConnectionUpdateRequestDto": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"ConnectionAdoptRequestDto": {
"type": "object",
"properties": {
"repositoryIds": {
"description": "Repositories to move from the default connection to this one",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"repositoryIds"
]
},
"DiscordInviteResponseDto": {
"type": "object",
"properties": {
"discordUsername": {
"type": "string"
}
},
"required": [
"discordUsername"
]
},
"DiscordLinkRequestResponseDto": {
"type": "object",
"properties": {
"discordUsername": {
"type": "string"
}
},
"required": [
"discordUsername"
]
},
"SubmitBackupEndRequestDto": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"durationMs": {
"type": "number"
}
},
"required": [
"success",
"durationMs"
]
},
"SubmitUpdateSizeRequestDto": {
"type": "object",
"properties": {
"sizeBytes": {
"type": "number"
}
},
"required": [
"sizeBytes"
]
},
"SubmitStructuredLogRequestDto": {
"type": "object",
"properties": {
"summary": {
"type": "string"
},
"data": {
"type": "object"
}
},
"required": [
"summary",
"data"
]
},
"RepositoryMetricsHistoryDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"repositoryId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"sizeBytes": {
"type": "number"
},
"started": {
"type": "string"
},
"backup": {
"type": "string"
},
"successfulBackup": {
"type": "string"
},
"backupDuration": {
"type": "number"
}
},
"required": [
"id",
"repositoryId",
"createdAt"
]
},
"RepositoryMetricsHistoryListResponseDto": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RepositoryMetricsHistoryDto"
}
},
"nextCursor": {
"type": "string",
"nullable": true
}
},
"required": [
"items"
]
},
"RepositoryCreateRequestDto": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"worm": {
"type": "boolean"
},
"site": {
"type": "string",
"description": "Internal site code from /meta; defaults to default_site"
}
},
"required": [
"name",
"worm"
]
},
"RepositoryWithMetricsDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"worm": {
"type": "boolean"
},
"name": {
"type": "string"
},
"siteCode": {
"type": "string",
"nullable": true,
"description": "Stable internal site code the repository lives in"
},
"storageClusterCode": {
"type": "string",
"nullable": true,
"description": "Stable, globally unique internal storage cluster code"
},
"connectionId": {
"type": "string"
},
"connectionType": {
"type": "string"
},
"metrics": {
"$ref": "#/components/schemas/RepositoryMetricsDto"
},
"meter": {
"$ref": "#/components/schemas/RepositoryMeterDto"
}
},
"required": [
"id",
"worm",
"name",
"siteCode",
"storageClusterCode",
"connectionId",
"connectionType",
"metrics"
]
},
"RepositoryCreateResponseDto": {
"type": "object",
"properties": {
"repository": {
"$ref": "#/components/schemas/RepositoryWithMetricsDto"
}
},
"required": [
"repository"
]
},
"RepositoryGetResponseDto": {
"type": "object",
"properties": {
"repository": {
"$ref": "#/components/schemas/RepositoryWithMetricsDto"
}
},
"required": [
"repository"
]
},
"RepositoryListResponseDto": {
"type": "object",
"properties": {
"repositories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RepositoryWithMetricsDto"
}
}
},
"required": [
"repositories"
]
},
"RepositoryUpdateRequestDto": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"worm": {
"type": "boolean"
}
}
},
"RepositoryUpdateResponseDto": {
"type": "object",
"properties": {
"repository": {
"$ref": "#/components/schemas/RepositoryWithMetricsDto"
}
},
"required": [
"repository"
]
},
"RepositoryCreateResticUrlDto": {
"type": "object",
"properties": {
"url": {
"type": "string"
}
},
"required": [
"url"
]
}
}
}
}