{ "components": { "examples": { "alreadyExistsError": { "summary": "Already Exists", "value": { "code": 409, "message": "resource already exists", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "ALREADY_EXISTS_ERROR" } }, "badRequestError": { "summary": "Bad Request", "value": { "code": 400, "message": "request is invalid", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "BAD_REQUEST_ERROR" } }, "conflict": { "summary": "Conflict", "value": { "code": 409, "message": "aborted database operation due to active sessions", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "DATABASE_CONFLICT_ERROR" } }, "failedPreconditionError": { "summary": "Failed Precondition", "value": { "code": 412, "message": "precondition for this operation failed", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "FAILED_PRECONDITION_ERROR" } }, "forbiddenError": { "summary": "Forbidden", "value": { "code": 403, "message": "Unauthorized: user is not allowed to perform this operation", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "FORBIDDEN_ERROR" } }, "instanceNameConflictError": { "summary": "Conflict - instance name already exists", "value": { "code": 409, "message": "An instance with the requested name already exists in the project.", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "ALREADY_EXISTS_ERROR" } }, "instanceNotReadyError": { "value": { "code": 423, "message": "The instance is not yet ready to perform this operation.", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "INSTANCE_NOT_READY_ERROR" } }, "internalServerError": { "summary": "Internal Server Error", "value": { "code": 500, "message": "internal server error", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "INTERNAL_ERROR" } }, "notFoundError": { "summary": "Not Found", "value": { "code": 404, "message": "resource not found", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "NOT_FOUND_ERROR" } }, "notImplementedError": { "summary": "Not Implemented", "value": { "code": 501, "message": "endpoint not implemented yet", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "NOT_IMPLEMENTED_ERROR" } }, "unauthorizedError": { "summary": "Unauthorized", "value": { "code": 401, "message": "authorization header is missing", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "UNAUTHORIZED_ERROR" } }, "unavailableServerError": { "summary": "Unavailable Server Error", "value": { "code": 503, "message": "A required downstream service is currently unresponsive", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "UNAVAILABLE_SERVICE_ERROR" } }, "userConflictError": { "summary": "User Conflict Error", "value": { "code": 409, "message": "сan not delete user while active databases exist.", "traceId": "58bab3ea361c37c25d72041afdd8aca2", "type": "USER_CONFLICT_ERROR" } }, "validationError": { "summary": "Validation Error", "value": { "code": 422, "validation": [ { "field": "\u003cfield\u003e", "message": "this field is required" } ] } } }, "parameters": { "backup": { "description": "The ID of the backup.", "example": 123, "explode": false, "in": "path", "name": "backupId", "required": true, "schema": { "format": "int64", "type": "integer" }, "style": "simple" }, "backup.sort": { "description": "Sorting of the backups to be returned on each page.", "example": "index desc", "explode": true, "in": "query", "name": "sort", "schema": { "$ref": "#/components/schemas/backup.sort" }, "style": "form", "x-oapi-codegen-extra-tags": { "validate": "omitempty,backup_sort" } }, "database": { "description": "The ID of the database.", "example": 16999, "explode": false, "in": "path", "name": "databaseId", "required": true, "schema": { "format": "int64", "type": "integer" }, "style": "simple" }, "database.sort": { "description": "Sorting of the databases to be returned on each page.", "example": "index desc", "explode": true, "in": "query", "name": "sort", "schema": { "$ref": "#/components/schemas/database.sort" }, "style": "form", "x-oapi-codegen-extra-tags": { "validate": "omitempty,database_sort" } }, "flavor.sort": { "description": "Sorting of the flavors to be returned on each page.", "example": "index desc", "explode": true, "in": "query", "name": "sort", "schema": { "$ref": "#/components/schemas/flavor.sort" }, "style": "form", "x-oapi-codegen-extra-tags": { "validate": "omitempty,flavor_sort" } }, "flavorId": { "description": "The ID of the flavor.", "example": "2.4", "explode": false, "in": "path", "name": "flavorId", "required": true, "schema": { "type": "string" }, "style": "simple" }, "instance": { "description": "The ID of the instance.", "example": "fb30fa7e-b7d8-4c75-9f04-489e0ba2fe51", "explode": false, "in": "path", "name": "instanceId", "required": true, "schema": { "type": "string" }, "style": "simple", "x-oapi-codegen-extra-tags": { "validate": "uuid_rfc4122" } }, "instance.sort": { "description": "Sorting of the items to be returned on each page.", "example": "index desc", "explode": true, "in": "query", "name": "sort", "schema": { "$ref": "#/components/schemas/instance.sort" }, "style": "form", "x-oapi-codegen-extra-tags": { "validate": "omitempty,list_instance_sort" } }, "page": { "description": "Number of the page of items list to be returned.", "example": 1, "explode": true, "in": "query", "name": "page", "schema": { "default": 1, "format": "int64", "type": "integer" }, "style": "form", "x-oapi-codegen-extra-tags": { "validate": "omitempty,page" } }, "project": { "description": "The STACKIT project ID.", "example": "19feb036-9b61-11ee-b9d1-0242ac120002", "explode": false, "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" }, "style": "simple", "x-oapi-codegen-extra-tags": { "validate": "uuid_rfc4122" } }, "region": { "description": "The region which should be addressed", "example": "eu01", "explode": false, "in": "path", "name": "region", "required": true, "schema": { "enum": [ "eu01", "eu02" ], "type": "string" }, "style": "simple", "x-oapi-codegen-extra-tags": { "validate": "region" } }, "size": { "description": "Number of items to be returned on each page.", "example": 10, "explode": true, "in": "query", "name": "size", "schema": { "default": 10, "format": "int64", "type": "integer" }, "style": "form" }, "user": { "description": "The ID of the user.", "example": 16999, "explode": false, "in": "path", "name": "userId", "required": true, "schema": { "format": "int64", "type": "integer" }, "style": "simple" }, "user.sort": { "description": "Sorting of the users to be returned on each page.", "example": "index desc", "explode": true, "in": "query", "name": "sort", "schema": { "$ref": "#/components/schemas/user.sort" }, "style": "form", "x-oapi-codegen-extra-tags": { "validate": "omitempty,user_sort" } } }, "schemas": { "BackupData": { "properties": { "completionTime": { "$ref": "#/components/schemas/backup.completionTime" }, "id": { "$ref": "#/components/schemas/backup.id" }, "name": { "$ref": "#/components/schemas/backup.name" }, "retainedUntil": { "$ref": "#/components/schemas/backup.retainedUntil" }, "size": { "$ref": "#/components/schemas/backup.size" }, "type": { "$ref": "#/components/schemas/backup.type" } }, "required": [ "completionTime", "id", "name", "retainedUntil", "size", "type" ], "type": "object" }, "CloneInstancePayload": { "properties": { "instanceOverrides": { "$ref": "#/components/schemas/clone.instanceOverrides" }, "pointInTime": { "$ref": "#/components/schemas/clone.pointInTime" } }, "required": [ "pointInTime", "instanceOverrides" ], "type": "object" }, "CloneInstanceResponse": { "properties": { "id": { "$ref": "#/components/schemas/instance.id" } }, "required": [ "id" ], "type": "object" }, "CreateDatabasePayload": { "properties": { "name": { "$ref": "#/components/schemas/database.name" }, "owner": { "$ref": "#/components/schemas/database.owner" } }, "required": [ "name" ], "type": "object" }, "CreateDatabaseResponse": { "properties": { "id": { "$ref": "#/components/schemas/database.id" } }, "required": [ "id" ], "type": "object" }, "CreateInstancePayload": { "properties": { "backupSchedule": { "$ref": "#/components/schemas/backup.schedule" }, "encryption": { "$ref": "#/components/schemas/instance.encryption" }, "flavorId": { "$ref": "#/components/schemas/flavor.flavorId" }, "labels": { "$ref": "#/components/schemas/labels" }, "name": { "$ref": "#/components/schemas/instance.name" }, "network": { "$ref": "#/components/schemas/instance.network.create" }, "retentionDays": { "$ref": "#/components/schemas/retentionDays" }, "storage": { "$ref": "#/components/schemas/storage.create" }, "version": { "$ref": "#/components/schemas/instance.version" } }, "required": [ "network", "backupSchedule", "flavorId", "name", "retentionDays", "storage", "version" ], "type": "object" }, "CreateInstanceResponse": { "properties": { "id": { "$ref": "#/components/schemas/instance.id" } }, "required": [ "id" ], "type": "object" }, "CreateUserPayload": { "properties": { "name": { "$ref": "#/components/schemas/user.name" }, "roles": { "description": "A list containing the user roles for the instance. Please refer to the List Roles endpoint for a list of all available Roles.", "example": [ "exampleRoleString", "secondeRoleString" ], "items": { "$ref": "#/components/schemas/user.role" }, "type": "array", "x-oapi-codegen-extra-tags": { "validate": "required,unique_user_role" } } }, "required": [ "name" ], "type": "object" }, "CreateUserResponse": { "properties": { "id": { "$ref": "#/components/schemas/user.id" }, "name": { "$ref": "#/components/schemas/user.name" }, "password": { "$ref": "#/components/schemas/user.password" }, "state": { "$ref": "#/components/schemas/user.state" } }, "required": [ "id", "name", "password", "state" ], "type": "object" }, "Error": { "properties": { "code": { "description": "The http error code of the error.", "example": 400, "format": "int32", "type": "integer" }, "message": { "description": "More detailed information about the error.", "example": "database not found", "type": "string" }, "traceId": { "description": "The trace id of the request.", "example": "58bab3ea361c37c25d72041afdd8aca2", "type": "string" }, "type": { "description": "Describes in which state the api was when the error happened.", "example": "INTERNAL_ERROR", "type": "string" } }, "required": [ "code", "message", "type", "traceId" ], "type": "object" }, "GetBackupResponse": { "$ref": "#/components/schemas/BackupData" }, "GetDatabaseResponse": { "properties": { "id": { "$ref": "#/components/schemas/database.id" }, "name": { "$ref": "#/components/schemas/database.name" }, "owner": { "$ref": "#/components/schemas/database.owner" } }, "required": [ "id", "name", "owner" ], "type": "object" }, "GetInstanceResponse": { "properties": { "backupSchedule": { "$ref": "#/components/schemas/backup.schedule" }, "connectionInfo": { "$ref": "#/components/schemas/instance.connectionInfo" }, "encryption": { "$ref": "#/components/schemas/instance.encryption" }, "flavorId": { "$ref": "#/components/schemas/flavor.flavorId" }, "id": { "$ref": "#/components/schemas/instance.id" }, "isDeletable": { "$ref": "#/components/schemas/instance.isDeletable" }, "labels": { "$ref": "#/components/schemas/labels" }, "name": { "$ref": "#/components/schemas/instance.name" }, "network": { "$ref": "#/components/schemas/instance.network" }, "retentionDays": { "$ref": "#/components/schemas/retentionDays" }, "state": { "$ref": "#/components/schemas/state" }, "storage": { "$ref": "#/components/schemas/storage" }, "version": { "$ref": "#/components/schemas/instance.version" } }, "required": [ "backupSchedule", "flavorId", "id", "isDeletable", "name", "retentionDays", "state", "storage", "version", "network", "connectionInfo" ], "type": "object" }, "GetUserResponse": { "properties": { "id": { "$ref": "#/components/schemas/user.id" }, "name": { "$ref": "#/components/schemas/user.name" }, "roles": { "description": "A list of user roles.", "example": [ "createdb", "login" ], "items": { "$ref": "#/components/schemas/user.role" }, "type": "array" }, "state": { "$ref": "#/components/schemas/user.state" } }, "required": [ "id", "name", "roles", "state" ], "type": "object" }, "ListBackup": { "$ref": "#/components/schemas/BackupData" }, "ListBackupsResponse": { "properties": { "backups": { "description": "The list containing the information about the backups.", "items": { "$ref": "#/components/schemas/ListBackup" }, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "pagination", "backups" ], "type": "object" }, "ListCollationsResponse": { "properties": { "collations": { "description": "List of collations available for the instance.", "items": { "$ref": "#/components/schemas/database.collation" }, "type": "array" } }, "required": [ "collations" ], "type": "object" }, "ListDatabase": { "properties": { "id": { "$ref": "#/components/schemas/database.id" }, "name": { "$ref": "#/components/schemas/database.name" }, "owner": { "$ref": "#/components/schemas/database.owner" } }, "required": [ "id", "name", "owner" ], "type": "object" }, "ListDatabasesResponse": { "properties": { "databases": { "description": "A list containing all databases for the instance.", "items": { "$ref": "#/components/schemas/ListDatabase" }, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "databases", "pagination" ], "type": "object" }, "ListFlavors": { "description": "The flavor of the instance containing the technical features.", "properties": { "cpu": { "$ref": "#/components/schemas/flavor.cpu" }, "description": { "$ref": "#/components/schemas/flavor.description" }, "id": { "$ref": "#/components/schemas/flavor.flavorId" }, "maxGB": { "$ref": "#/components/schemas/flavor.maxGB" }, "memory": { "$ref": "#/components/schemas/flavor.memory" }, "minGB": { "$ref": "#/components/schemas/flavor.minGB" }, "nodeType": { "$ref": "#/components/schemas/flavor.nodeType" }, "storageClasses": { "$ref": "#/components/schemas/flavor.storageClasses" } }, "required": [ "cpu", "description", "id", "memory", "nodeType", "minGB", "maxGB", "storageClasses" ], "type": "object" }, "ListFlavorsResponse": { "properties": { "flavors": { "description": "List of flavors available for the project.", "items": { "$ref": "#/components/schemas/ListFlavors" }, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "pagination", "flavors" ], "type": "object" }, "ListInstance": { "properties": { "created": { "$ref": "#/components/schemas/instance.created" }, "flavorId": { "$ref": "#/components/schemas/flavor.flavorId" }, "id": { "$ref": "#/components/schemas/instance.id" }, "isDeletable": { "$ref": "#/components/schemas/instance.isDeletable" }, "name": { "$ref": "#/components/schemas/instance.name" }, "state": { "$ref": "#/components/schemas/state" }, "storage": { "$ref": "#/components/schemas/storage" }, "version": { "$ref": "#/components/schemas/instance.version" } }, "required": [ "id", "name", "state", "isDeletable" ], "type": "object" }, "ListInstancesResponse": { "properties": { "instances": { "description": "List of owned instances and their current state.", "items": { "$ref": "#/components/schemas/ListInstance" }, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "pagination", "instances" ], "type": "object" }, "ListRolesResponse": { "properties": { "roles": { "description": "List of all role names available in the instance", "example": [ "createdb", "nocreatedb", "login", "nologin", "createrole", "nocreaterole", "replication" ], "items": { "description": "The name of the role", "example": "createdb", "type": "string" }, "type": "array" } }, "required": [ "roles" ], "type": "object" }, "ListUser": { "properties": { "id": { "$ref": "#/components/schemas/user.id" }, "name": { "$ref": "#/components/schemas/user.name" }, "state": { "$ref": "#/components/schemas/user.state" } }, "required": [ "id", "name", "state" ], "type": "object" }, "ListUsersResponse": { "properties": { "pagination": { "$ref": "#/components/schemas/Pagination" }, "users": { "description": "List of all users inside an instance", "items": { "$ref": "#/components/schemas/ListUser" }, "type": "array" } }, "required": [ "pagination", "users" ], "type": "object" }, "ListVersionsResponse": { "properties": { "versions": { "description": "A list containing available postgres versions.", "items": { "$ref": "#/components/schemas/version" }, "type": "array" } }, "required": [ "versions" ], "type": "object" }, "Pagination": { "properties": { "page": { "format": "int64", "type": "integer" }, "size": { "format": "int64", "type": "integer" }, "sort": { "type": "string" }, "totalPages": { "format": "int64", "type": "integer" }, "totalRows": { "format": "int64", "type": "integer" } }, "required": [ "size", "page", "totalRows", "totalPages", "sort" ], "type": "object" }, "PartialUpdateDatabasePayload": { "properties": { "name": { "$ref": "#/components/schemas/database.name.opt" }, "owner": { "$ref": "#/components/schemas/database.owner.opt" } }, "type": "object" }, "PartialUpdateInstancePayload": { "properties": { "backupSchedule": { "$ref": "#/components/schemas/backup.schedule.opt" }, "flavorId": { "$ref": "#/components/schemas/flavor.flavorId.opt" }, "labels": { "$ref": "#/components/schemas/labels" }, "name": { "$ref": "#/components/schemas/instance.name.opt" }, "network": { "$ref": "#/components/schemas/instance.network.opt" }, "retentionDays": { "$ref": "#/components/schemas/retentionDays.opt" }, "storage": { "$ref": "#/components/schemas/storage.update" }, "version": { "$ref": "#/components/schemas/instance.version.update.opt" } }, "type": "object" }, "PartialUpdateUserPayload": { "properties": { "name": { "$ref": "#/components/schemas/user.name.opt" }, "roles": { "description": "A list containing the user roles for the instance. Please refer to the List Roles endpoint for a list of all available Roles.", "items": { "$ref": "#/components/schemas/user.role" }, "type": "array", "x-oapi-codegen-extra-tags": { "validate": "omitempty,unique_user_role" } } }, "type": "object" }, "ResetUserPasswordResponse": { "properties": { "name": { "$ref": "#/components/schemas/user.name" }, "password": { "$ref": "#/components/schemas/user.password" }, "state": { "$ref": "#/components/schemas/user.state" } }, "required": [ "name", "password", "state" ], "type": "object" }, "UpdateDatabasePartiallyResponse": { "properties": { "database": { "$ref": "#/components/schemas/ListDatabase" } }, "required": [ "database" ], "type": "object" }, "UpdateDatabasePayload": { "properties": { "name": { "$ref": "#/components/schemas/database.name" }, "owner": { "$ref": "#/components/schemas/database.owner" } }, "required": [ "name", "owner" ], "type": "object" }, "UpdateDatabaseResponse": { "properties": { "database": { "$ref": "#/components/schemas/ListDatabase" } }, "required": [ "database" ], "type": "object" }, "UpdateInstancePayload": { "properties": { "backupSchedule": { "$ref": "#/components/schemas/backup.schedule" }, "flavorId": { "$ref": "#/components/schemas/flavor.flavorId" }, "labels": { "$ref": "#/components/schemas/labels" }, "name": { "$ref": "#/components/schemas/instance.name" }, "network": { "$ref": "#/components/schemas/instance.network.update" }, "retentionDays": { "$ref": "#/components/schemas/retentionDays" }, "storage": { "$ref": "#/components/schemas/storage.update" }, "version": { "$ref": "#/components/schemas/instance.version.update" } }, "required": [ "backupSchedule", "flavorId", "name", "retentionDays", "storage", "version", "network" ], "type": "object" }, "UpdateInstanceProtectionPayload": { "properties": { "isDeletable": { "$ref": "#/components/schemas/protect.isDeletable" } }, "required": [ "isDeletable" ], "type": "object" }, "UpdateInstanceProtectionResponse": { "properties": { "isDeletable": { "$ref": "#/components/schemas/protect.isDeletable" } }, "required": [ "isDeletable" ], "type": "object" }, "UpdateUserPayload": { "properties": { "name": { "$ref": "#/components/schemas/user.name" }, "roles": { "description": "A list containing the user roles for the instance. Please refer to the List Roles endpoint for a list of all available Roles.", "items": { "$ref": "#/components/schemas/user.role" }, "type": "array", "x-oapi-codegen-extra-tags": { "validate": "omitempty,unique_user_role" } } }, "required": [ "roles" ], "type": "object" }, "ValidationError": { "properties": { "code": { "description": "the http error should be always 422 for validationError", "example": 422, "format": "int32", "type": "integer" }, "validation": { "description": "errors for all fields where the error happened", "items": { "properties": { "field": { "example": "name", "type": "string" }, "message": { "example": "this field is required", "type": "string" } }, "required": [ "field", "message" ], "type": "object" }, "type": "array" } }, "required": [ "code", "validation" ], "type": "object" }, "acl": { "description": "List of IPv4 CIDR addresses.", "example": [ "198.51.100.0/24" ], "items": { "description": "An IPv4 CIDR.", "example": "198.51.100.0/24", "type": "string" }, "type": "array" }, "acl.opt": { "description": "List of IPv4 CIDR addresses.", "example": [ "198.51.100.0/24" ], "items": { "description": "An IPv4 CIDR.", "example": "198.51.100.0/24", "type": "string" }, "type": "array" }, "backup.completionTime": { "description": "The time when the backup was completed in RFC3339 format.", "example": "2023-12-14T23:25:03Z", "type": "string" }, "backup.id": { "description": "The ID of the backup.", "example": 123, "format": "int64", "type": "integer" }, "backup.name": { "description": "The name of the backup.", "example": "0000002B0000000000000083", "type": "string" }, "backup.recoveryTime": { "description": "the time for the point in time recovery it will be calculated between first backup and last backup", "example": "2023-12-30T23:25:05Z", "format": "date-time", "type": "string" }, "backup.retainedUntil": { "description": "The time until the backup will be retained.", "example": "2023-12-30T23:25:05Z", "type": "string" }, "backup.schedule": { "description": "The schedule for when the database backup will be created. Currently, ONLY daily schedules are supported (every 24 hours). The schedule is written as a cron schedule.", "example": "6 6 * * *", "type": "string" }, "backup.schedule.opt": { "description": "The schedule for when the database backup will be created. Currently, ONLY daily schedules are supported (every 24 hours). The schedule is written as a cron schedule.", "example": "6 6 * * *", "type": "string" }, "backup.size": { "description": "The size of the backup in bytes.", "example": 8394655, "format": "int64", "type": "integer" }, "backup.sort": { "enum": [ "completion_time.desc", "completion_time.asc", "end_time.desc", "end_time.asc", "name.desc", "name.asc", "retained_until.desc", "retained_until.asc", "size.desc", "size.asc", "type.desc", "type.asc" ], "type": "string" }, "backup.storage.class": { "description": "The storage class for the storage.", "example": "premium-perf12-stackit", "type": "string" }, "backup.storage.size": { "description": "The storage size in Gigabytes.", "example": 10, "format": "int64", "type": "integer" }, "backup.type": { "description": "The type of the backup, which can be automated or manually triggered.", "example": "AUTOMATED", "type": "string" }, "clone.instanceOverrides": { "properties": { "class": { "$ref": "#/components/schemas/clone.storage.class" }, "name": { "$ref": "#/components/schemas/clone.name.opt" }, "size": { "$ref": "#/components/schemas/clone.storage.size" } }, "required": [ "size", "class" ], "type": "object" }, "clone.name.opt": { "description": "The name of the cloned instance. If not provided, the default naming behavior of appending '-clone' to the source instance name is used.", "example": "my-cloned-instance", "maxLength": 63, "minLength": 3, "type": "string" }, "clone.pointInTime": { "description": "the time for the point in time recovery it will be calculated between first backup and last backup", "example": "2023-12-30T23:25:05Z", "format": "date-time", "type": "string" }, "clone.storage.class": { "description": "The storage class for the storage.", "example": "premium-perf12-stackit", "type": "string" }, "clone.storage.size": { "description": "The storage size in Gigabytes.", "example": 10, "format": "int64", "type": "integer" }, "database.collation": { "description": "The collation of the database", "example": "de-DE", "type": "string" }, "database.id": { "description": "The id of the database.", "example": 1, "format": "int64", "type": "integer" }, "database.name": { "description": "\"The name of the database.\"\n\"Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, underscores, or hyphens. It cannot end with a hyphen.\"\n", "example": "mydatabase", "maxLength": 63, "minLength": 1, "pattern": "^[a-z_]([a-z0-9_\\-]{0,61}[a-z0-9_])?$", "type": "string" }, "database.name.opt": { "description": "\"The name of the database.\"\n\"Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, underscores, or hyphens. It cannot end with a hyphen.\"\n", "example": "mydatabase", "maxLength": 63, "minLength": 1, "pattern": "^[a-z_]([a-z0-9_\\-]{0,61}[a-z0-9_])?$", "type": "string" }, "database.owner": { "description": "The owner of the database.", "example": "MyUser", "type": "string" }, "database.owner.opt": { "description": "The owner of the database.", "example": "MyUser", "type": "string" }, "database.roles": { "description": "The name and the roles for a database for a user.", "properties": { "name": { "$ref": "#/components/schemas/database.name" }, "roles": { "description": "The name and the roles for a database", "items": { "description": "The name of the role.", "example": "myRole", "type": "string" }, "type": "array" } }, "required": [ "name", "roles" ], "type": "object" }, "database.sort": { "enum": [ "created_at.desc", "created_at.asc", "database_id.desc", "database_id.asc", "database_name.desc", "database_name.asc", "database_owner.desc", "database_owner.asc" ], "type": "string" }, "flavor.cpu": { "description": "The cpu count of the instance.", "example": 1, "format": "int64", "type": "integer" }, "flavor.description": { "description": "The flavor description.", "example": "Small, Compute optimized", "type": "string" }, "flavor.flavorId": { "description": "The id of the instance flavor.", "example": "1.2", "type": "string" }, "flavor.flavorId.opt": { "description": "The id of the instance flavor.", "example": "1.2", "type": "string" }, "flavor.maxGB": { "description": "The maximum storage size in gigabytes that can be ordered for this flavor.", "example": 1, "format": "int32", "type": "integer" }, "flavor.memory": { "description": "The memory of the instance in Gibibyte.", "example": 1, "format": "int64", "type": "integer" }, "flavor.minGB": { "description": "The minimum storage size in gigabytes required for this flavor.", "example": 1, "format": "int32", "type": "integer" }, "flavor.nodeType": { "description": "defines the nodeType it can be either single or replica", "example": "single", "type": "string" }, "flavor.sort": { "enum": [ "cpu.desc", "cpu.asc", "flavor_description.asc", "flavor_description.desc", "id.desc", "id.asc", "size_max.desc", "size_max.asc", "ram.desc", "ram.asc", "size_min.desc", "size_min.asc", "storage_class.asc", "storage_class.desc", "node_type.asc", "node_type.desc" ], "type": "string" }, "flavor.storageClasses": { "description": "The storage classes available for the flavor.", "items": { "$ref": "#/components/schemas/flavor.storageClasses.storageClass" }, "type": "array" }, "flavor.storageClasses.storageClass": { "description": "a storageClass defines how efficient the storage can work", "properties": { "class": { "example": "premium-perf2-stackit", "type": "string" }, "maxIoPerSec": { "example": 1000, "format": "int32", "type": "integer" }, "maxThroughInMb": { "example": 100, "format": "int32", "type": "integer" } }, "required": [ "maxIoPerSec", "maxThroughInMb", "class" ], "type": "object" }, "instance.connectionInfo": { "description": "The connection information of the instance", "properties": { "write": { "$ref": "#/components/schemas/instance.connectionInfo.write" } }, "required": [ "write" ], "type": "object" }, "instance.connectionInfo.write": { "description": "The DNS name and port in the instance overview", "properties": { "host": { "description": "The host of the instance.", "example": "postgresql.eu01.onstackit.cloud", "type": "string" }, "port": { "description": "The port of the instance.", "example": 5432, "format": "int32", "type": "integer" } }, "required": [ "host", "port" ], "type": "object" }, "instance.created": { "description": "The timestamp at which this instance was created.", "example": "2026-09-16T10:03:48Z", "format": "date-time", "type": "string" }, "instance.encryption": { "description": "The configuration for instance's volume and backup storage encryption.\n\n⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", "properties": { "kekKeyId": { "description": "The encryption-key key identifier", "example": "48e3f816-3e38-44bb-bbff-22e05f0567de", "type": "string", "x-oapi-codegen-extra-tags": { "validate": "required,uuid_rfc4122" } }, "kekKeyRingId": { "description": "The encryption-key keyring identifier", "example": "48e3f816-3e38-44bb-bbff-22e05f0567de", "type": "string", "x-oapi-codegen-extra-tags": { "validate": "required,uuid_rfc4122" } }, "kekKeyVersion": { "description": "The encryption-key version", "example": "1", "type": "string", "x-oapi-codegen-extra-tags": { "validate": "required" } }, "serviceAccount": { "example": "example@compute.sa.stackit.cloud", "type": "string", "x-oapi-codegen-extra-tags": { "validate": "required,email" } } }, "required": [ "serviceAccount", "kekKeyRingId", "kekKeyId", "kekKeyVersion" ], "type": "object" }, "instance.id": { "description": "The ID of the instance.", "example": "df727477-8991-486c-a3ed-d11d9d9beb1c", "format": "uuid", "type": "string" }, "instance.isDeletable": { "description": "Whether the instance can be deleted or not.", "example": true, "type": "boolean" }, "instance.name": { "description": "The name of the instance.", "example": "postgres-instance", "maxLength": 63, "minLength": 3, "type": "string" }, "instance.name.opt": { "description": "The name of the instance.", "example": "postgres-instance", "maxLength": 63, "minLength": 3, "type": "string" }, "instance.network": { "description": "The access configuration of the instance", "properties": { "accessScope": { "$ref": "#/components/schemas/instance.network.accessScope" }, "acl": { "$ref": "#/components/schemas/acl" }, "instanceAddress": { "example": "10.0.0.2", "type": "string" }, "routerAddress": { "example": "10.0.0.1", "type": "string" } }, "required": [ "acl" ], "type": "object" }, "instance.network.accessScope": { "default": "PUBLIC", "description": "The access scope of the instance. It defines if the instance is public or airgapped.\n\n⚠️ **Note:** \"SNA\" value for the \"network.accessScope\" field is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", "enum": [ "PUBLIC", "SNA" ], "type": "string" }, "instance.network.create": { "description": "The access configuration of the instance", "properties": { "accessScope": { "$ref": "#/components/schemas/instance.network.accessScope" }, "acl": { "$ref": "#/components/schemas/acl" } }, "required": [ "acl" ], "type": "object" }, "instance.network.opt": { "description": "The access configuration of the instance", "properties": { "acl": { "$ref": "#/components/schemas/acl.opt" } }, "type": "object" }, "instance.network.update": { "description": "The access configuration of the instance", "properties": { "acl": { "$ref": "#/components/schemas/acl" } }, "required": [ "acl" ], "type": "object" }, "instance.sort": { "enum": [ "id.desc", "id.asc", "is_deletable.desc", "is_deletable.asc", "name.asc", "name.desc", "state.asc", "state.desc" ], "type": "string" }, "instance.storageRange": { "description": "Contains the minimum and maximum storage space.", "properties": { "max": { "$ref": "#/components/schemas/storage.max" }, "min": { "$ref": "#/components/schemas/storage.min" } }, "required": [ "max", "min" ], "type": "object" }, "instance.version": { "description": "The Postgres version used for the instance. See [Versions Endpoint](/documentation/postgres-flex-service/version/v3#tag/Version) for supported version parameters.", "type": "string" }, "instance.version.update": { "description": "The Postgres version used for the instance. See [Versions Endpoint](/documentation/postgres-flex-service/version/v3#tag/Version) for supported version parameters.", "type": "string" }, "instance.version.update.opt": { "description": "The Postgres version used for the instance. See [Versions Endpoint](/documentation/postgres-flex-service/version/v3#tag/Version) for supported version parameters.", "type": "string" }, "labels": { "additionalProperties": { "nullable": true, "type": "string" }, "description": "Key-value pairs, 63 characters max, begin and end with an alphanumerical character,\nmay contain dashes (-), underscores (_), dots (.), and alphanumerics between. Key MUST be at least 1 character.\nMax 64 labels\nRegex for keys: ^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$\nRegex for values: ^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$\nThe stackit- prefix is reserved and cannot be used for Keys.\n", "example": { "key1": "value1", "key2": "value2" }, "type": "object" }, "protect.isDeletable": { "description": "Protect instance from deletion.", "example": true, "type": "boolean" }, "retentionDays": { "description": "How long backups are retained. The value can only be between 32 and 90 days.", "example": 35, "format": "int32", "maximum": 90, "minimum": 32, "nullable": true, "type": "integer" }, "retentionDays.opt": { "description": "How long backups are retained. The value can only be between 32 and 90 days.", "example": 35, "format": "int32", "maximum": 90, "minimum": 32, "type": "integer" }, "state": { "description": "The current state of the instance.", "enum": [ "READY", "PENDING", "PROGRESSING", "FAILURE", "UNKNOWN", "TERMINATING" ], "type": "string" }, "storage": { "description": "The object containing information about the storage size and class.", "properties": { "class": { "$ref": "#/components/schemas/storage.class" }, "size": { "$ref": "#/components/schemas/storage.size" } }, "type": "object" }, "storage.class": { "description": "The storage class for the storage.", "example": "premium-perf12-stackit", "type": "string" }, "storage.class.create": { "description": "The storage class for the storage.", "example": "premium-perf12-stackit", "type": "string" }, "storage.create": { "description": "The object containing information about the storage size and class.", "properties": { "class": { "$ref": "#/components/schemas/storage.class.create" }, "size": { "$ref": "#/components/schemas/storage.size.create" } }, "required": [ "size", "class" ], "type": "object" }, "storage.max": { "description": "The maximum available amount of storage.", "example": 1000, "format": "int32", "type": "integer" }, "storage.min": { "description": "The minimum available amount of storage.", "example": 10, "format": "int32", "type": "integer" }, "storage.size": { "description": "The storage size in Gigabytes.", "example": 10, "format": "int64", "type": "integer" }, "storage.size.create": { "description": "The storage size in Gigabytes.", "example": 10, "format": "int64", "type": "integer" }, "storage.update": { "description": "The object containing information about the storage size and class.", "properties": { "size": { "$ref": "#/components/schemas/storage.size" } }, "type": "object" }, "timestamp": { "description": "The timestamp should be specified RFC3339 format.", "example": "2023-12-19T13:18:45.52Z", "type": "string" }, "user.id": { "description": "The ID of the user.", "example": 1, "format": "int64", "type": "integer" }, "user.name": { "description": "The name of the user.", "example": "myUser", "type": "string" }, "user.name.opt": { "description": "The name of the user.", "example": "myUser", "type": "string" }, "user.password": { "description": "The password for the user.", "example": "password123", "type": "string" }, "user.role": { "description": "The user role for the instance. Valid roles depend on the Postgres version of the instance;\nretrieve the allowed roles via GET roles endpoint.\n", "example": "login", "maxLength": 63, "minLength": 1, "type": "string" }, "user.sort": { "enum": [ "id.asc", "id.desc", "name.desc", "name.asc", "state.desc", "state.asc" ], "type": "string" }, "user.state": { "description": "The current state of the user.", "example": "PROCESSED", "type": "string" }, "version": { "description": "The version of the postgres instance and more details.", "properties": { "beta": { "description": "Flag indicating whether the version is a beta version. Beta versions may contain bugs and are not fully tested.", "example": true, "type": "boolean" }, "deprecated": { "description": "Timestamp in RFC3339 format indicating when the version will no longer be supported by STACKIT.", "example": "2023-12-14T23:25:00Z", "type": "string" }, "recommend": { "description": "Flag indicating whether the version is recommended by the STACKIT Team.", "example": true, "type": "boolean" }, "version": { "description": "The postgres version used for the instance.", "example": "15", "type": "string" } }, "required": [ "version", "recommend", "deprecated", "beta" ], "type": "object" } } }, "info": { "contact": { "email": "support@stackit.cloud", "name": "STACKIT Postgres Service Support", "url": "https://www.stackit.de/en/contact" }, "description": "This is the documentation for the STACKIT Postgres Flex service", "termsOfService": "https://www.stackit.de/en/general-terms-and-conditions/", "title": "STACKIT PostgreSQL Flex API", "version": "3.0.0" }, "openapi": "3.0.1", "paths": { "/v3/projects/{projectId}/regions/{region}/flavors": { "get": { "description": "Get all available flavors for a project.", "operationId": "ListFlavors", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/size" }, { "$ref": "#/components/parameters/flavor.sort" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListFlavorsResponse" } } }, "description": "OK: The response contains a list with all available flavors for the project." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "501": { "content": { "application/json": { "examples": { "notImplementedError": { "$ref": "#/components/examples/notImplementedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Endpoint not implemented yet" }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Get Flavors", "x-stackit-authorization": { "actions": [ "postgres-flex.flavor.list" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances": { "get": { "description": "List all available instances for your project.", "operationId": "ListInstances", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/size" }, { "$ref": "#/components/parameters/instance.sort" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListInstancesResponse" } } }, "description": "OK: Contains a list of all project instances." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request." }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later" }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "List Instances", "x-stackit-authorization": { "actions": [ "postgres-flex.instance.list" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "post": { "description": "Create a new instance of a postgres database instance.", "operationId": "CreateInstance", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInstancePayload" } } }, "description": "The request body with the parameters for the instance creation. Every parameter is required.", "required": true }, "responses": { "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInstanceResponse" } } }, "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "422": { "content": { "application/json": { "examples": { "validationError": { "$ref": "#/components/examples/validationError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unprocessable entity" }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Create Instance", "x-stackit-authorization": { "actions": [ "postgres-flex.instance.create" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}": { "delete": { "description": "Delete an available postgres instance.", "operationId": "DeleteInstance", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "responses": { "202": { "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request." }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: Could not find an instance with the provided Id." }, "412": { "content": { "application/json": { "examples": { "failedPreconditionError": { "$ref": "#/components/examples/failedPreconditionError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Precondition Failed: The precondition for this operation was not met." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Delete Instance", "x-stackit-authorization": { "actions": [ "postgres-flex.instance.delete" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "get": { "description": "Get information about a specific available instance", "operationId": "GetInstance", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetInstanceResponse" } } }, "description": "OK: The response contains the properties of the instance." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request." }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: Could not find an instance with the provided Id." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Get Specific Instance", "x-stackit-authorization": { "actions": [ "postgres-flex.instance.get" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "patch": { "description": "Update an available instance of a postgres database. No fields are required.", "operationId": "PartialUpdateInstance", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartialUpdateInstancePayload" } } }, "description": "The request body with the parameters for updating the instance.", "required": true }, "responses": { "202": { "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: Could not find an instance with the provided Id." }, "412": { "content": { "application/json": { "examples": { "failedPreconditionError": { "$ref": "#/components/examples/failedPreconditionError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Precondition Failed: The precondition for this operation was not met." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Update Instance Partially", "x-stackit-authorization": { "actions": [ "postgres-flex.instance.update" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "put": { "description": "Updates an available instance of a postgres database", "operationId": "UpdateInstance", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInstancePayload" } } }, "description": "The request body with the parameters for updating the instance", "required": true }, "responses": { "202": { "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: Could not find an instance with the provided Id." }, "412": { "content": { "application/json": { "examples": { "failedPreconditionError": { "$ref": "#/components/examples/failedPreconditionError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Precondition Failed: The precondition for this operation was not met." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Update Instance", "x-stackit-authorization": { "actions": [ "postgres-flex.instance.update" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups": { "get": { "description": "List all backups which are available for a specific instance.", "operationId": "ListBackups", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/size" }, { "$ref": "#/components/parameters/backup.sort" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListBackupsResponse" } } }, "description": "OK: Contains a list with all backups for a specific instance." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "501": { "content": { "application/json": { "examples": { "notImplementedError": { "$ref": "#/components/examples/notImplementedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Endpoint not implemented yet" }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "List Backups", "x-stackit-authorization": { "actions": [ "postgres-flex.backup.list" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}": { "get": { "description": "Get information about a specific backup for an instance.", "operationId": "GetBackup", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/backup" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetBackupResponse" } } }, "description": "OK: Contains a backup and its parameters with all backups for a specific instance." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "501": { "content": { "application/json": { "examples": { "notImplementedError": { "$ref": "#/components/examples/notImplementedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Endpoint not implemented yet" }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Get specific backup", "x-stackit-authorization": { "actions": [ "postgres-flex.backup.get" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/clone": { "post": { "description": "Clone Instance", "operationId": "CloneInstance", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CloneInstancePayload" } } }, "description": "The request body with the parameters for cloning an instance by a point in time into a new instance." }, "responses": { "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CloneInstanceResponse" } } }, "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "409": { "content": { "application/json": { "examples": { "instanceNameConflictError": { "$ref": "#/components/examples/instanceNameConflictError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Conflict: The request could not be processed due to a conflict, e.g. an instance with the requested name already exists." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "501": { "content": { "application/json": { "examples": { "notImplementedError": { "$ref": "#/components/examples/notImplementedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Endpoint not implemented yet" }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Clone Instance", "x-stackit-authorization": { "actions": [ "postgres-flex.instance.clone" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/collations": { "get": { "description": "Get available collations for an instance", "operationId": "ListCollations", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCollationsResponse" } } }, "description": "A list of available collations for an instance." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "501": { "content": { "application/json": { "examples": { "notImplementedError": { "$ref": "#/components/examples/notImplementedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Endpoint not implemented yet" }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Get Collations for an Instance", "x-stackit-authorization": { "actions": [ "postgres-flex.collation.list" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases": { "get": { "description": "List available databases for an instance.", "operationId": "ListDatabases", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/size" }, { "$ref": "#/components/parameters/database.sort" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDatabasesResponse" } } }, "description": "OK: Contains a list of all databases for a specific instance." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "List Databases", "x-stackit-authorization": { "actions": [ "postgres-flex.database.list" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "post": { "description": "Create database for a user. Note: The name of a valid user must be provided in the 'options' map field using the key 'owner'", "operationId": "CreateDatabase", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDatabasePayload" } } }, "description": "The request body containing the information for the new database.", "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDatabaseResponse" } } }, "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "409": { "content": { "application/json": { "examples": { "alreadyExistsError": { "$ref": "#/components/examples/alreadyExistsError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Database name already exists" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Create Database", "x-stackit-authorization": { "actions": [ "postgres-flex.database.create" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseId}": { "delete": { "description": "Delete database for an instance.", "operationId": "DeleteDatabase", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/database" } ], "responses": { "202": { "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "409": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/conflict" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Database Conflict: Active sessions in database found." }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Delete Database", "x-stackit-authorization": { "actions": [ "postgres-flex.database.delete" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "get": { "description": "Get information about a specific database in an instance.", "operationId": "GetDatabase", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/database" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetDatabaseResponse" } } }, "description": "OK: The response contains the properties of the database." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Get Specific Database", "x-stackit-authorization": { "actions": [ "postgres-flex.database.get" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "patch": { "description": "Update a database partially in an instance.", "operationId": "PartialUpdateDatabase", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/database" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartialUpdateDatabasePayload" } } }, "description": "The request body containing the information for the database update.", "required": true }, "responses": { "202": { "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Update Database partially", "x-stackit-authorization": { "actions": [ "postgres-flex.database.update" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "put": { "description": "Update a database in an instance.", "operationId": "UpdateDatabase", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/database" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDatabasePayload" } } }, "description": "The request body containing the information for the database update.", "required": true }, "responses": { "202": { "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Update Database", "x-stackit-authorization": { "actions": [ "postgres-flex.database.update" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/protections": { "post": { "description": "Toggle the deletion protection for an instance.", "operationId": "UpdateInstanceProtection", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInstanceProtectionPayload" } } }, "description": "The request body containing the isDeletable flag. This parameter is required.", "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInstanceProtectionResponse" } } }, "description": "The instance is now protected / unprotected, depending on the state before the request." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "501": { "content": { "application/json": { "examples": { "notImplementedError": { "$ref": "#/components/examples/notImplementedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Endpoint not implemented yet" }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Toggle Instance Protection", "x-stackit-authorization": { "actions": [ "postgres-flex.instance.protect" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/roles": { "get": { "description": "List available roles for an instance.", "operationId": "ListRoles", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListRolesResponse" } } }, "description": "OK: Contains a list of all roles for a specific instance." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "List Roles", "x-stackit-authorization": { "actions": [ "postgres-flex.role.list" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users": { "get": { "description": "List available users for an instance.", "operationId": "ListUsers", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/size" }, { "$ref": "#/components/parameters/user.sort" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListUsersResponse" } } }, "description": "OK: Contains a list of all users for a specific instance." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "List Users", "x-stackit-authorization": { "actions": [ "postgres-flex.user.list" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "post": { "description": "Create user for an instance.", "operationId": "CreateUser", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserPayload" } } }, "description": "The request body containing the user details.", "required": true }, "responses": { "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserResponse" } } }, "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "409": { "content": { "application/json": { "examples": { "alreadyExistsError": { "$ref": "#/components/examples/alreadyExistsError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "User name already exists" }, "412": { "content": { "application/json": { "examples": { "preconditionFailedError": { "$ref": "#/components/examples/failedPreconditionError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Precondition Failed: The precondition for this operation was not met." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Create User", "x-stackit-authorization": { "actions": [ "postgres-flex.user.create" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}": { "delete": { "description": "Delete a user from a specific instance.", "operationId": "DeleteUser", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/user" } ], "responses": { "202": { "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "409": { "content": { "application/json": { "examples": { "userConflictError": { "$ref": "#/components/examples/userConflictError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Cannot delete user while active databases exist." }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Delete User", "x-stackit-authorization": { "actions": [ "postgres-flex.user.delete" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "get": { "description": "Get a specific available user for an instance.", "operationId": "GetUser", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/user" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetUserResponse" } } }, "description": "OK: Contains information of a user for a specific instance." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Get User", "x-stackit-authorization": { "actions": [ "postgres-flex.user.get" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "patch": { "description": "Update a user partially for an instance.", "operationId": "PartialUpdateUser", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/user" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartialUpdateUserPayload" } } }, "description": "The Request body containing the new information for the user. If empty request body is send via patch, then login and createdb roles are removed from user." }, "responses": { "202": { "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "412": { "content": { "application/json": { "examples": { "preconditionFailedError": { "$ref": "#/components/examples/failedPreconditionError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Precondition Failed: The precondition for this operation was not met." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Update User Partially", "x-stackit-authorization": { "actions": [ "postgres-flex.user.update" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } }, "put": { "description": "Update user for an instance.", "operationId": "UpdateUser", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/user" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserPayload" } } }, "description": "The Request body containing the updated infos for the user.", "required": true }, "responses": { "202": { "description": "Accepted: The request was accepted" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "412": { "content": { "application/json": { "examples": { "preconditionFailedError": { "$ref": "#/components/examples/failedPreconditionError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Precondition Failed: The precondition for this operation was not met." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Update User", "x-stackit-authorization": { "actions": [ "postgres-flex.user.update" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset": { "post": { "description": "Reset a user from a specific instance.", "operationId": "ResetUserPassword", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" }, { "$ref": "#/components/parameters/instance" }, { "$ref": "#/components/parameters/user" } ], "responses": { "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetUserPasswordResponse" } } }, "description": "Accepted: The user reset was successful" }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request" }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } }, "description": "Request failed due to body validation" }, "423": { "content": { "application/json": { "examples": { "instanceNotReadyError": { "$ref": "#/components/examples/instanceNotReadyError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Locked: The instance is not yet ready to perform this operation." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "503": { "content": { "application/json": { "examples": { "unavailableServerError": { "$ref": "#/components/examples/unavailableServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Service Unavailable: A required downstream service is currently unresponsive." } }, "summary": "Reset User", "x-stackit-authorization": { "actions": [ "postgres-flex.user.reset" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } }, "/v3/projects/{projectId}/regions/{region}/versions": { "get": { "description": "Get available postgres versions for the project.", "operationId": "ListVersions", "parameters": [ { "$ref": "#/components/parameters/project" }, { "$ref": "#/components/parameters/region" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListVersionsResponse" } } }, "description": "OK: Returns a list of available postgres versions." }, "400": { "content": { "application/json": { "examples": { "badRequestError": { "$ref": "#/components/examples/badRequestError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Bad Request." }, "401": { "content": { "application/json": { "examples": { "unauthorizedError": { "$ref": "#/components/examples/unauthorizedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Unauthorized: user is not allowed to perform this operation or credentials are not correct" }, "403": { "content": { "application/json": { "examples": { "forbiddenError": { "$ref": "#/components/examples/forbiddenError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Forbidden: No access for the requested resource." }, "404": { "content": { "application/json": { "examples": { "notFoundError": { "$ref": "#/components/examples/notFoundError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Not found: The requested resource was not found." }, "500": { "content": { "application/json": { "examples": { "internalServerError": { "$ref": "#/components/examples/internalServerError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Internal Server Error: An internal error occurred while processing the request. Please contact the support or try again later." }, "501": { "content": { "application/json": { "examples": { "notImplementedError": { "$ref": "#/components/examples/notImplementedError" } }, "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "Endpoint not implemented yet" } }, "summary": "Get Versions", "x-stackit-authorization": { "actions": [ "postgres-flex.version.list" ], "resource-id": "projectId", "resource-id-type": "dynamic", "resource-type": "project" } } } }, "security": [ { "Authorization": [] } ], "servers": [ { "url": "https://postgres-flex-service.api.stackit.cloud", "variables": { "region": { "default": "global" } } } ] }