{ "openapi": "3.1.0", "components": { "schemas": { "AccessGrantsResponse": { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceRole" }, "description": "Lists services roles" }, "policies": { "type": "array", "items": { "$ref": "#/components/schemas/PolicyRole" }, "description": "Lists polices roles" }, "disableGlobalPermissions": { "type": "boolean", "description": "Is global permissions disabled" } } }, "AdapterDatabaseCreateRequest": { "type": "object", "description": "The request to create database for REST dbaas adapter", "properties": { "metadata": { "type": "object", "additionalProperties": {} }, "namePrefix": { "type": "string" }, "settings": { "type": "object", "additionalProperties": {} }, "initScriptIdentifiers": { "type": "array", "deprecated": true, "items": { "type": "string" } }, "password": { "type": "string" }, "username": { "type": "string" }, "dbName": { "type": "string" } } }, "AdditionalRoles": { "type": "object", "required": [ "id", "dbName", "connectionProperties", "resources" ], "description": "V3 Additional roles model for sending registration to DBaaS", "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "description": "Logical database Id" }, "dbName": { "type": "string", "description": "Logical database name" }, "connectionProperties": { "type": "array", "items": { "type": "object", "additionalProperties": {} }, "description": "Logical databases connection properties" }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/DbResource" }, "description": "Logical databases resources" } } }, "ApiVersion": { "type": "object", "properties": { "specs": { "type": "array", "items": { "$ref": "#/components/schemas/Spec" }, "description": "The root URL part for that API version" } } }, "BGState": { "type": "object", "properties": { "controllerNamespace": { "type": "string" }, "originNamespace": { "$ref": "#/components/schemas/BGStateNamespace" }, "peerNamespace": { "$ref": "#/components/schemas/BGStateNamespace" }, "updateTime": { "$ref": "#/components/schemas/Date" } } }, "BGStateNamespace": { "type": "object", "properties": { "name": { "type": "string" }, "state": { "type": "string" }, "version": { "type": "string" } } }, "BackupDatabaseResponse": { "type": "object", "required": [ "id", "name", "status", "path" ], "description": "Logical database backup details", "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "examples": [ "550e8400-e29b-41d4-a716-446655440000" ], "description": "Identifier of the backup database" }, "name": { "type": "string", "examples": [ "mydb" ], "description": "Name of the database" }, "classifiers": { "type": "array", "examples": [ [ { "namespace": "namespace", "microserviceName": "microserviceName", "scope": "service" } ] ], "items": { "type": "object", "additionalProperties": {} }, "description": "List of database classifiers. Each classifier is a sorted map of attributes." }, "settings": { "type": "object", "examples": [ { "key": "value" } ], "additionalProperties": {}, "description": "Database settings as a key-value map" }, "users": { "type": "array", "examples": [ [ { "name": "username", "role": "admin" } ] ], "items": { "$ref": "#/components/schemas/User" }, "description": "List of database users" }, "configurational": { "type": "boolean", "examples": [ true ], "description": "Indicates the type of the database" }, "status": { "type": [ "string", "object" ], "enum": [ "NOT_STARTED", "IN_PROGRESS", "FAILED", "RETRYABLE_FAIL", "COMPLETED" ], "description": "Current state of the backup database" }, "size": { "type": "integer", "format": "int64", "examples": [ 12256 ], "description": "Size of the backup" }, "duration": { "type": "integer", "format": "int64", "examples": [ 12000 ], "description": "Duration of the backup operation" }, "path": { "type": "string", "examples": [ "/backups/mydb-2025-11-13.bak" ], "description": "Path to the backup file in the storage" }, "errorMessage": { "type": "string", "examples": [ "Backup Not Found" ], "description": "Error message if the backup failed" }, "creationTime": { "$ref": "#/components/schemas/Instant", "type": "string", "examples": [ "2025-11-13T12:34:56Z" ], "description": "Timestamp when the backup was created" } } }, "BackupExternalDatabaseResponse": { "type": "object", "required": [ "id", "name" ], "description": "External database details", "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "examples": [ "550e8400-e29b-41d4-a716-446655440000" ], "description": "Identifier of the external backup database" }, "name": { "type": "string", "examples": [ "mydb" ], "description": "Name of the external database" }, "type": { "type": "string", "examples": [ "postgresql" ], "description": "Type of the database" }, "classifiers": { "type": "array", "examples": [ [ { "namespace": "namespace", "microserviceName": "microserviceName", "scope": "service" } ] ], "items": { "type": "object", "additionalProperties": {} }, "description": "List of database classifiers. Each classifier is a sorted map of attributes." } } }, "BackupRequest": { "type": "object", "required": [ "backupName", "storageName", "blobPath", "filterCriteria", "externalDatabaseStrategy", "ignoreNotBackupableDatabases" ], "description": "Request to create a database backup", "properties": { "backupName": { "type": "string", "examples": [ "before-prod-update-20251013T1345-G5s8" ], "pattern": "\\S", "description": "Unique name of the backup" }, "storageName": { "type": "string", "examples": [ "s3-backend" ], "pattern": "\\S", "description": "Name of the storage backend containing the backup" }, "blobPath": { "type": "string", "examples": [ "/backups/before-prod-update-20251013T1345-G5s8/logical/dbaas/" ], "pattern": "\\S", "description": "Path in the storage where backup will be stored" }, "filterCriteria": { "type": "object", "description": "Filter criteria", "properties": { "include": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Include databases that match any of the filters in the list" }, "exclude": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Exclude databases that match any of the filters in the list" } } }, "externalDatabaseStrategy": { "type": [ "string", "object" ], "enum": [ "FAIL", "SKIP", "INCLUDE" ], "examples": [ "FAIL" ], "description": "How to handle external databases during backup", "default": "FAIL" }, "ignoreNotBackupableDatabases": { "type": "boolean", "examples": [ false ], "description": "Whether non-backupable databases should be ignored during backup", "default": false } } }, "BackupResponse": { "type": "object", "required": [ "backupName", "storageName", "blobPath", "externalDatabaseStrategy", "ignoreNotBackupableDatabases", "status", "total", "completed", "size" ], "description": "Response containing backup operation details", "properties": { "backupName": { "type": "string", "examples": [ "before-prod-update-20251013T1345-G5s8" ], "pattern": "\\S", "description": "Unique name of the backup" }, "storageName": { "type": "string", "examples": [ "s3-backend" ], "pattern": "\\S", "description": "Name of the storage backend containing the backup" }, "blobPath": { "type": "string", "examples": [ "/backups" ], "pattern": "\\S", "description": "Path to the backup file in the storage" }, "externalDatabaseStrategy": { "type": [ "string", "object" ], "enum": [ "FAIL", "SKIP", "INCLUDE" ], "examples": [ "FAIL" ], "description": "How to handle external databases during backup" }, "ignoreNotBackupableDatabases": { "type": "boolean", "examples": [ false ], "description": "Whether non-backupable databases were ignored during backup" }, "filterCriteria": { "type": "object", "description": "Filter criteria", "properties": { "include": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Include databases that match any of the filters in the list" }, "exclude": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Exclude databases that match any of the filters in the list" } } }, "status": { "type": [ "string", "object" ], "enum": [ "NOT_STARTED", "IN_PROGRESS", "FAILED", "COMPLETED", "DELETE_IN_PROGRESS", "DELETED" ], "description": "Current state of the backup operation" }, "total": { "type": "integer", "format": "int32", "examples": [ 5 ], "description": "Total number of databases being backed up" }, "completed": { "type": "integer", "format": "int32", "examples": [ 3 ], "description": "Number of databases successfully backed up" }, "size": { "type": "integer", "format": "int64", "examples": [ 1073741824 ], "description": "Total size of the backup in bytes" }, "errorMessage": { "type": "string", "examples": [ "Failed to connect to database" ], "description": "Error details if the backup failed" }, "logicalBackups": { "type": "array", "items": { "$ref": "#/components/schemas/LogicalBackupResponse" }, "description": "List of logical backups" }, "externalDatabases": { "type": "array", "items": { "$ref": "#/components/schemas/BackupExternalDatabaseResponse" }, "description": "List of external databases" } } }, "BackupStatusResponse": { "type": "object", "required": [ "status" ], "description": "Current status of a backup operation", "properties": { "status": { "type": [ "string", "object" ], "enum": [ "NOT_STARTED", "IN_PROGRESS", "FAILED", "COMPLETED", "DELETE_IN_PROGRESS", "DELETED" ], "description": "Current state of the backup operation" }, "total": { "type": "integer", "format": "int32", "examples": [ 5 ], "description": "Total number of databases being backed up" }, "completed": { "type": "integer", "format": "int32", "examples": [ 3 ], "description": "Number of databases successfully backed up" }, "size": { "type": "integer", "format": "int64", "examples": [ 1073741824 ], "description": "Total size of the backup in bytes" }, "errorMessage": { "type": "string", "examples": [ "Failed to connect to database" ], "description": "Error details if the backup failed" } } }, "BgNamespaceRequest": { "type": "object", "properties": { "peerNamespace": { "type": "string" }, "originNamespace": { "type": "string" }, "controllerNamespace": { "type": "string" } } }, "BgStateRequest": { "type": "object", "properties": { "BGState": { "$ref": "#/components/schemas/BGState" } } }, "ChangedDatabaseResponse": { "type": "object", "description": "A database whose credentials changed (password rotation or restore). Carries only the identity needed to locate the consumer; connection properties are fetched separately.", "properties": { "id": { "type": "string", "description": "Registry id. Together with lastRotatedAt it forms the keyset cursor the caller echoes back as sinceId to page deterministically through rows that share a timestamp." }, "namespace": { "type": "string", "description": "Namespace where the database is placed." }, "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier identifying the database within the namespace." }, "type": { "type": "string", "description": "Type of database (e.g. postgresql, mongodb)." }, "lastRotatedAt": { "$ref": "#/components/schemas/OffsetDateTime", "type": "string", "description": "Timestamp of the credential change; also serves as the poll cursor." } } }, "ChangedDatabasesCursor": { "type": "object", "description": "Keyset cursor (lastRotatedAt, id) for the changed-databases feed. Seed the poll cursor from the high-water mark on the first (since-less) call; thereafter advance the cursor from the returned items.", "properties": { "lastRotatedAt": { "$ref": "#/components/schemas/OffsetDateTime", "type": "string", "description": "lastRotatedAt component of the cursor." }, "id": { "type": "string", "description": "Registry id component of the cursor (tie-breaker for equal timestamps)." } } }, "ChangedDatabasesResponse": { "type": "object", "description": "Page of databases whose credentials changed since the requested keyset cursor, plus the current high-water mark used to seed the cursor.", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ChangedDatabaseResponse" }, "description": "Databases changed after the requested cursor, ordered by (lastRotatedAt, id) ascending. Advance the cursor from the last item." }, "highWaterMark": { "$ref": "#/components/schemas/ChangedDatabasesCursor", "type": "object", "description": "Latest (lastRotatedAt, id) currently known across all databases. Use it only to SEED the cursor on the first (since-less) call; null when nothing has rotated yet." } } }, "ClassifierDetailsResponse": { "type": "object", "required": [ "type", "classifier" ], "description": "Classifier details used during restore operation", "properties": { "type": { "type": [ "string", "object" ], "enum": [ "NEW", "REPLACED", "TRANSIENT_REPLACED" ], "description": "Type of classifier in restore context" }, "previousDatabase": { "type": [ "string", "null" ], "examples": [ "dbaas_12345" ], "description": "Name of the existing database previously associated with this classifier, used when the classifier replaces or transiently replaces another database during restore" }, "classifier": { "type": "object", "examples": [ { "namespace": "namespace", "microserviceName": "microserviceName", "scope": "service" } ], "additionalProperties": {}, "description": "Final classifier used to create a database in the target environment." }, "classifierBeforeMapper": { "type": [ "object", "null" ], "examples": [ { "namespace": "namespace", "microserviceName": "microserviceName", "scope": "service" } ], "additionalProperties": {}, "description": "Original (pre-mapping) classifier from backup database preserved to track how mapping changed the classifier during restore" } } }, "ClassifierWithRolesRequest": { "type": "object", "required": [ "classifier" ], "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Database composite identify key. See details in https://perch.qubership.org/display/CLOUDCORE/DbaaS+Database+Classifier" }, "originService": { "type": "string", "description": "Origin service which send request" }, "userRole": { "type": "string", "description": "Indicates connection properties with which user role should be returned to a client" } } }, "CleanupMarkedForDropRequest": { "type": "object", "required": [ "namespaces" ], "properties": { "namespaces": { "type": "array", "items": { "type": "string" }, "description": "A list of namespaces where the marked for drop databases should be cleaned" }, "delete": { "type": "boolean", "description": "Confirmation parameter. If this is not passed or \u0027false\u0027 then marked for drop databases will not be deleted and response will contain marked for drop databases that are registered in DBaaS for the specified namespaces" }, "force": { "type": "boolean", "description": "If this parameter is \u0027true\u0027, then deletion errors from physical adapters will be ignored" } } }, "CompositeStructureDto": { "type": "object", "required": [ "id", "namespaces" ], "properties": { "id": { "type": "string", "description": "Composite identifier. Usually it\u0027s baseline or origin baseline in blue-green scheme" }, "namespaces": { "type": "array", "uniqueItems": true, "items": { "type": "string" }, "description": "Namespaces that are included in composite structure (baseline and satellites)" } } }, "Condition": { "type": "object", "properties": { "type": { "type": "string" }, "state": { "type": "string" }, "reason": { "type": [ "string", "null" ] }, "message": { "type": [ "string", "null" ] } } }, "ConnectionDescription": { "type": "object", "properties": { "fields": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/FieldDescription" } } } }, "Database": { "type": "object", "required": [ "oldClassifier", "classifier", "connectionProperties", "namespace", "type", "adapterId", "name", "resources" ], "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "description": "A unique identifier of the document in the database. This field may not be used when searching by classifier for security purpose. In appears in response when Create database API is executed." }, "oldClassifier": { "type": "object", "additionalProperties": {}, "description": "Old classifier describes the purpose of the database and distinguishes this database from other database in the same namespase. It contains such keys as dbClassifier, isService, microserviceName, namespace. Setting keys depends on the database type." }, "classifier": { "type": "object", "deprecated": true, "additionalProperties": {}, "description": "Classifier describes the purpose of the database and distinguishes this database from other database in the same namespase. It contains such keys as dbClassifier, scope, microserviceName, namespace. Setting keys depends on the database type." }, "connectionProperties": { "type": "array", "items": { "type": "object", "additionalProperties": {} }, "description": "The information about connection to database. It contains such keys as url, authDbName, username, password, port, host.Setting keys depends on the database type." }, "namespace": { "type": "string", "deprecated": true, "description": "Namespace where database is placed" }, "type": { "type": "string", "deprecated": true, "description": "Type of database, for example postgresql or mongodb" }, "adapterId": { "type": "string", "description": "This field indicates for which adapter the database was created." }, "name": { "type": "string", "description": "Name of database. It may be generated or, if name was specified in a request then it will be specified." }, "markedForDrop": { "type": "boolean", "description": "A marker indicating that the database will be deleted." }, "timeDbCreation": { "$ref": "#/components/schemas/Date", "type": "string", "description": "Time to create a database" }, "backupDisabled": { "type": "boolean", "description": "This field indicates if backup is disabled or not. If true, database would not be backed up. Example: false" }, "dbOwnerRoles": { "type": "array", "items": { "type": "string" }, "description": "The list of roles which are related to this logical database. The external security service (e.g. DBaaS Agent) can perform a verification process on this field." }, "settings": { "type": "object", "additionalProperties": {}, "description": "Additional settings for creating a database" }, "connectionDescription": { "$ref": "#/components/schemas/ConnectionDescription", "type": "object", "description": "This parameter describes connection properties." }, "warnings": { "type": "array", "items": { "type": "string" }, "description": "Lists warning messages" }, "externallyManageable": { "type": "boolean", "description": "This parameter specifies if a control over the database is not carried out by the DBaaS adapter." }, "bgVersion": { "type": "string", "description": "Database version. It uses for blue-green" }, "physicalDatabaseId": { "type": "string" }, "databaseRegistry": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseRegistry" } }, "resources": { "$ref": "#/components/schemas/DbResource", "description": "It lists resource which will be deleted when sending the request for delete a database" }, "dbState": { "$ref": "#/components/schemas/DbState" } } }, "DatabaseCreateRequest": { "type": "object", "required": [ "classifier", "type", "dbOwner" ], "description": "Request model for adding database to DBaaS", "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of database and distinguishes this database from other databases in the same namespace. It contains such keys as dbClassifier, isServiceDb, microserviceName, namespace. Setting keys depends on the database type. If database with such classifier exists, then this database will be given away. The backupDisabled parameter can not be modified; it is installed only once during creating database request." }, "type": { "type": "string", "description": "Describes the type of database in which you want to create a database. For example mongodb or postgresql" }, "backupDisabled": { "type": "boolean", "description": "This field indicates if backup is disabled or not. If true - database would not be backed up." }, "settings": { "type": "object", "additionalProperties": {}, "description": "Additional settings for creating database. There is a possibility to update settings after database creation." }, "physicalDatabaseId": { "type": "string", "description": "Specifies the identificator of physical database where a logical database will be created. If it is not specified then logical database will be created in default physical database. You can get the list of all physical databases by \"List registered physical databases\" API." }, "namePrefix": { "type": "string", "description": "This is a prefix of the database name. Prefix depends on the type of the database and it should be less than 27 characters if dbName is not specified." }, "dbName": { "type": "string", "description": "This is the name of the database. Name should be unique. If a database having this name exists there will be a conflict. If dbName is absent it will be generated" }, "username": { "type": "string", "description": "It is a username for a user which will be created together with the database. If the username is absent it will be generated." }, "password": { "type": "string", "description": "This is password for a user, which will be created together with the database. If password is absent it will be generated" }, "initScriptIdentifiers": { "type": "array", "deprecated": true, "items": { "type": "string" }, "description": "The list of identifiers of initial scripts which should be executed in the adapter. Deprecated in v1 and v2, will be removed in v3. For more info visit https://perch.qubership.org/display/CLOUDCORE/How+to+remove+initScriptIdentifiers+parameter" }, "dbOwnerRoles": { "type": "array", "items": { "type": "string" }, "description": "The list of roles which are related to this logical database. The external security service (e.g. DBaaA Agent) can perform a verification process on this field." }, "dbOwner": { "type": "string", "description": "Database owner name" } } }, "DatabaseCreateRequestV3": { "type": "object", "required": [ "classifier", "type" ], "description": "V3 Request model for adding database to DBaaS", "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of database and distinguishes this database from other databases in the same namespace. It contains such keys as dbClassifier, isServiceDb, microserviceName, namespace. Setting keys depends on the database type. If database with such classifier exists, then this database will be given away. The backupDisabled parameter can not be modified; it is installed only once during creating database request." }, "type": { "type": "string", "description": "Describes the type of database in which you want to create a database. For example mongodb or postgresql" }, "namePrefix": { "type": "string", "description": "This is a prefix of the database name. Prefix depends on the type of the database and it should be less than 27 characters if dbName is not specified." }, "backupDisabled": { "type": "boolean", "description": "This field indicates if backup is disabled or not. If true - database would not be backed up." }, "settings": { "type": "object", "additionalProperties": {}, "description": "Additional settings for creating database. There is a possibility to update settings after database creation." }, "physicalDatabaseId": { "type": "string", "description": "Specifies the identificator of physical database where a logical database will be created. If it is not specified then logical database will be created in default physical database. You can get the list of all physical databases by \"List registered physical databases\" API." }, "originService": { "type": "string", "description": "Origin service which send request" }, "userRole": { "type": "string", "description": "Indicates connection properties with which user role should be returned to a client" } } }, "DatabaseInfo": { "type": "object", "properties": { "name": { "type": "string" } } }, "DatabaseRegistry": { "type": "object", "required": [ "classifier", "namespace", "type", "database" ], "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "description": "A unique identifier of the document in the database. This field may not be used when searching by classifier for security purpose. In appears in response when Create database API is executed." }, "timeDbCreation": { "$ref": "#/components/schemas/Date", "type": "string", "description": "Time to create a database" }, "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of the database and distinguishes this database from other database in the same namespase. It contains such keys as dbClassifier, scope, microserviceName, namespace. Setting keys depends on the database type." }, "namespace": { "type": "string", "description": "Namespace where database is placed" }, "type": { "type": "string", "description": "Type of database, for example postgresql or mongodb" }, "database": { "$ref": "#/components/schemas/Database", "description": "It lists of database classifiers" }, "dbState": { "$ref": "#/components/schemas/DbState" }, "databaseRegistry": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseRegistry" } }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/DbResource" } }, "oldClassifier": { "type": "object", "additionalProperties": {} }, "connectionProperties": { "type": "array", "items": { "type": "object", "additionalProperties": {} } }, "adapterId": { "type": "string" }, "name": { "type": "string" }, "markedForDrop": { "type": "boolean" }, "backupDisabled": { "type": "boolean" }, "dbOwnerRoles": { "type": "array", "items": { "type": "string" } }, "settings": { "type": "object", "additionalProperties": {} }, "connectionDescription": { "$ref": "#/components/schemas/ConnectionDescription" }, "warnings": { "type": "array", "items": { "type": "string" } }, "externallyManageable": { "type": "boolean" }, "bgVersion": { "type": "string" }, "physicalDatabaseId": { "type": "string" } } }, "DatabaseResponse": { "type": "object", "required": [ "classifier", "connectionProperties", "resources", "namespace", "type", "adapterId", "name" ], "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "description": "A unique identifier of the document in the database. This field might not be used when searching by classifier for security purpose. And it exists in the response when executing Create database API" }, "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of the database and it distinguishes this database from other databases in the same namespace. It contains such keys as dbClassifier, isServiceDb, microserviceName, namespace. Setting keys depends on the database type." }, "connectionProperties": { "type": "object", "additionalProperties": {}, "description": "This is an information about connection to database. It contains such keys as url, authDbName, username, password, port, host.Setting keys depends on the database type." }, "resources": { "$ref": "#/components/schemas/DbResource", "description": "It lists the resources which will be deleted when sending the request to delete the database." }, "namespace": { "type": "string", "description": "Namespace where database is placed." }, "type": { "type": "string", "description": "Type of database, for example postgresql or mongodb" }, "adapterId": { "type": "string", "description": "This field indicates for which adapter the database was created." }, "name": { "type": "string", "description": "Name of database. It may be generated or, if name was specified in the request, then it will be specified." }, "markedForDrop": { "type": "boolean", "description": "A marker indicating if the database will be deleted." }, "timeDbCreation": { "$ref": "#/components/schemas/Date", "type": "string", "description": "Time to create a database." }, "backupDisabled": { "type": "boolean" }, "settings": { "type": "object", "additionalProperties": {}, "description": "Additional settings for creating a database." }, "connectionDescription": { "$ref": "#/components/schemas/ConnectionDescription", "type": "object", "description": "This parameter describes a connection properties." }, "warnings": { "type": "array", "items": { "type": "string" }, "description": "List of warning messages." }, "externallyManageable": { "type": "boolean", "description": "This parameter specifies if a control over the database is not carried out by the DBaaS adapter" }, "dbOwnerRoles": { "type": "array", "items": { "type": "string" }, "description": "The list of roles which are related to this logical database. The external security service (e.g. DBaaA Agent) can perform a verification process on this field." }, "classifierV3Migrated": { "type": "boolean", "description": "Indicate that classifier migrated correctly to V3 structure" } } }, "DatabaseResponseV3ListCP": { "type": "object", "required": [ "classifier", "namespace", "type", "name", "connectionProperties" ], "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "description": "A unique identifier of the document in the database. This field might not be used when searching by classifier for security purpose. And it exists in the response when executing Create database API" }, "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of the database and it distinguishes this database from other databases in the same namespace. It contains such keys as dbClassifier, isServiceDb, microserviceName, namespace. Setting keys depends on the database type." }, "namespace": { "type": "string", "description": "Namespace where database is placed." }, "type": { "type": "string", "description": "Type of database, for example PostgreSQL or MongoDB" }, "name": { "type": "string", "description": "Name of database. It may be generated or, if name was specified in the request, then it will be specified." }, "externallyManageable": { "type": "boolean", "description": "This parameter specifies if a control over the database is not carried out by the DBaaS adapter" }, "timeDbCreation": { "$ref": "#/components/schemas/Date", "type": "string", "description": "Time to create a database." }, "settings": { "type": "object", "additionalProperties": {}, "description": "Additional settings for creating a database." }, "backupDisabled": { "type": "boolean", "description": "This field indicates if backup is disabled or not. If true, database would not be backed up. Example: false" }, "physicalDatabaseId": { "type": "string", "description": "Physical database identifier where the registered database should be located. If it is absent, adapter id may be used to identify the target physical database." }, "connectionProperties": { "type": "array", "items": { "type": "object", "additionalProperties": {} }, "description": "This is an information about connection to database. It contains such keys as url, authDbName, username, password, port, host.Setting keys depends on the database type." }, "resources": { "$ref": "#/components/schemas/DbResource", "description": "list of resources is necessary for bulk drop resources operation. Specified if you add query parameter \"withResources\" \u003d true to request" } } }, "DatabaseStateStatus": { "type": "string", "enum": [ "PROCESSING", "CREATED", "DELETING", "DELETING_FAILED", "ARCHIVED", "ORPHAN" ] }, "DatabasesBackup": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/UUID" }, "status": { "$ref": "#/components/schemas/Status1", "type": "string", "description": "This field contains the status of backup process of the specific adapter." }, "adapterId": { "type": "string", "description": "This field contains the adapter id." }, "localId": { "type": "string", "description": "Identifier of an adapter associated with backup process" }, "trackId": { "type": "string", "description": "Identifier for polling process specific adapter." }, "trackPath": { "type": "string", "description": "Priority path for polling process." }, "databases": { "type": "array", "items": { "type": "string" }, "description": "List of databases\u0027 names" } } }, "DatabasesInfo": { "type": "object", "properties": { "global": { "$ref": "#/components/schemas/DatabasesInfoSegment" }, "perAdapters": { "type": "array", "items": { "$ref": "#/components/schemas/DatabasesInfoSegment" } } } }, "DatabasesInfoSegment": { "type": "object", "properties": { "name": { "type": "string" }, "totalDatabases": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseInfo" } }, "registration": { "$ref": "#/components/schemas/DatabasesRegistrationInfo" }, "deletingDatabases": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseInfo" } } } }, "DatabasesRegistrationInfo": { "type": "object", "properties": { "totalDatabases": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseInfo" } }, "lostDatabases": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseInfo" } }, "ghostDatabases": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseInfo" } } } }, "Date": { "type": "string", "format": "date", "examples": [ "2022-03-10" ] }, "DbResource": { "type": "object", "required": [ "kind", "name" ], "properties": { "kind": { "type": "string", "description": "The kind of resource. For example database or user" }, "name": { "type": "string", "description": "Name of the resource." } } }, "DbState": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/UUID" }, "state": { "$ref": "#/components/schemas/DatabaseStateStatus", "type": "string", "deprecated": true }, "databaseState": { "$ref": "#/components/schemas/DatabaseStateStatus" }, "description": { "type": "string" }, "podName": { "type": "string" } } }, "DebugDatabaseDeclarativeConfigV3": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/UUID" }, "settings": { "type": "object", "additionalProperties": {} }, "lazy": { "type": "boolean" }, "instantiationApproach": { "type": "string" }, "versioningApproach": { "type": "string" }, "versioningType": { "type": "string" }, "classifier": { "type": "object", "additionalProperties": {} }, "type": { "type": "string" }, "namePrefix": { "type": "string" }, "namespace": { "type": "string" } } }, "DebugLogicalDatabaseV3": { "type": "object", "properties": { "namespace": { "type": "string" }, "microservice": { "type": "string" }, "tenantId": { "type": "string" }, "logicalDbName": { "type": "string" }, "bgVersion": { "type": "string" }, "type": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "physicalDbId": { "type": "string" }, "physicalDbAdapterUrl": { "type": "string" }, "declaration": { "$ref": "#/components/schemas/DebugDatabaseDeclarativeConfigV3" } } }, "DebugRulesRequest": { "type": "object", "required": [ "microservices", "rules" ], "description": "Debug rules request allows to validate a list of rules against a list of microservices to check what database is going to be assigned to each microservice", "properties": { "microservices": { "type": "array", "items": { "type": "string" }, "description": "List of microservices" }, "rules": { "type": "array", "items": { "$ref": "#/components/schemas/OnMicroserviceRuleRequest" }, "description": "List of rules" } } }, "DeclarativeResponse": { "type": "object", "properties": { "status": { "type": "string" }, "trackingId": { "type": [ "string", "null" ] }, "conditions": { "type": "array", "items": { "$ref": "#/components/schemas/Condition" } } } }, "DeleteOrphansRequest": { "type": "object", "required": [ "namespaces" ], "properties": { "namespaces": { "type": "array", "items": { "type": "string" }, "description": "List of namespaces orhan databases of which is needed to delete" }, "delete": { "type": "boolean", "description": "confirmation parameter. If this is not passed or false then orhan database will not be deleted and response will contain orhan databases that are registered in DBaaS" } } }, "DeleteResult": { "type": "object", "properties": { "databasesBackup": { "$ref": "#/components/schemas/DatabasesBackup" }, "status": { "$ref": "#/components/schemas/Status1" }, "adapterId": { "type": "string" }, "message": { "type": "string" } } }, "DumpResponseV3": { "type": "object", "properties": { "rules": { "type": "array", "items": {} }, "logicalDatabases": { "type": "array", "items": {} }, "physicalDatabases": { "type": "array", "items": {} }, "declarativeConfigurations": { "type": "array", "items": {} }, "blueGreenDomains": { "type": "array", "items": {} }, "backups": { "type": "array", "items": {} }, "restores": { "type": "array", "items": {} } } }, "ExternalDatabaseRequestV3": { "type": "object", "required": [ "classifier", "connectionProperties", "type", "dbName" ], "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "See the description of \"classifier\" properties of DatabaseCreateRequest entity" }, "connectionProperties": { "type": "array", "items": { "type": "object", "additionalProperties": {} }, "description": "There is an information about connection to database. It contains such keys as url, authDbName, username, password, port, host, etc. You should specify them in order for the client to be able to connect to the database." }, "type": { "type": "string", "description": "Type of physical database." }, "dbName": { "type": "string", "description": "Name of logical database." }, "updateConnectionProperties": { "type": "boolean", "description": "Is connection properties update required. False by default. If true, then old connection properties will be replaced by the new ones provided." } } }, "FailureRegistrationV3": { "type": "object", "required": [ "id", "message" ], "description": "Errors during the migration process", "properties": { "id": { "type": "string", "description": "Record Id" }, "message": { "type": "string", "description": "Message about error" } } }, "FieldDescription": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/FieldTypeEnum" } } }, "FieldTypeEnum": { "type": "string", "enum": [ "PASSWORD" ] }, "Filter": { "type": "object", "description": "Single filter criteria for backup and restore operations", "properties": { "namespace": { "type": "array", "items": { "type": "string" }, "description": "Filter by Kubernetes namespaces" }, "microserviceName": { "type": "array", "items": { "type": "string" }, "description": "Filter by microservice names" }, "databaseType": { "type": "array", "items": { "type": "string" }, "description": "Filter by database types" }, "databaseKind": { "type": "array", "items": { "type": "string", "enum": [ "CONFIGURATION", "TRANSACTIONAL" ] }, "description": "Filter by database kinds" } } }, "FilterCriteria": { "type": "object", "description": "Filter criteria", "properties": { "include": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Include databases that match any of the filters in the list" }, "exclude": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Exclude databases that match any of the filters in the list" } } }, "GetOrCreateUserRequest": { "type": "object", "required": [ "classifier", "logicalUserId", "type" ], "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of the database and distinguishes this database from other database in the same namespase. It contains such keys as scope, microserviceName, namespace." }, "logicalUserId": { "type": "string", "description": "User uniq identifier. Using this field with classifier and type dbaas will determine to create or return created before user." }, "type": { "type": "string", "description": "The physical type of logical database. For example postgresql" }, "physicalDbId": { "type": "string", "description": "Identificator of physical database related to a logical database." }, "usernamePrefix": { "type": "string", "description": "Prefix for username" }, "userRole": { "type": "string", "description": "User role, for example admin, rw, ro" } } }, "GetOrCreateUserResponse": { "type": "object", "required": [ "userId", "connectionProperties" ], "properties": { "userId": { "type": "string", "description": "The user identificator." }, "connectionProperties": { "type": "object", "additionalProperties": {}, "description": "The information about connection to database. It contains such keys as url, authDbName, username, password, port, host.Setting keys depends on the database type." } } }, "GhostDatabasesResponse": { "type": "object", "required": [ "physicalDatabaseId", "dbNames" ], "properties": { "physicalDatabaseId": { "type": "string", "description": "Physical database identificator." }, "dbNames": { "type": "array", "items": { "type": "string" }, "description": "Ghost databases names related to adapter with this physical databases id." }, "errorMessage": { "type": "string", "description": "Error message from adapter." } } }, "HttpBasicCredentials": { "type": "object", "required": [ "username", "password" ], "properties": { "username": { "type": "string", "description": "Basic authentication username." }, "password": { "type": "string", "description": "Basic authentication password." } } }, "Instant": { "type": "string", "format": "date-time", "examples": [ "2022-03-10T16:15:50Z" ] }, "Instruction": { "type": "object", "required": [ "id", "additionalRoles" ], "description": "V3 Response model for starting the migration procedure", "properties": { "id": { "type": "string", "description": "Current instruction Id" }, "additionalRoles": { "type": "array", "items": { "$ref": "#/components/schemas/AdditionalRoles" }, "description": "Connection properties properties that require additional roles" } } }, "InstructionRequestV3": { "type": "object", "description": "V3 Request model to continue register new roles", "properties": { "success": { "type": "array", "items": { "$ref": "#/components/schemas/SuccessRegistrationV3" }, "description": "Databases for which roles have been successfully created" }, "failure": { "$ref": "#/components/schemas/FailureRegistrationV3", "type": "object", "description": "Errors when creating roles" } } }, "LinkDatabasesRequest": { "type": "object", "required": [ "serviceNames", "targetNamespace" ], "description": "Request model for linking existing databases to different namespace", "properties": { "serviceNames": { "type": "array", "items": { "type": "string" }, "description": "The list of microservice names whose databases will be linked to target namespace" }, "targetNamespace": { "type": "string", "description": "Namespace, to which databases will be linked" } } }, "LogicalBackupResponse": { "type": "object", "required": [ "id", "logicalBackupName", "adapterId", "type", "status", "backupDatabases" ], "description": "Logical backup details", "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "examples": [ "550e8400-e29b-41d4-a716-446655440000" ], "description": "Identifier of the logical backup" }, "logicalBackupName": { "type": "string", "description": "Name of the logical backup in adapter" }, "adapterId": { "type": "string", "examples": [ "4e1e9922-e5bf-490d-bb57-18a14de593c6" ], "description": "Unique identifier of the adapter" }, "type": { "type": "string", "description": "Type of the adapter" }, "status": { "type": [ "string", "object" ], "enum": [ "NOT_STARTED", "IN_PROGRESS", "FAILED", "RETRYABLE_FAIL", "COMPLETED" ], "description": "Current state of the backup databases of one adapter" }, "errorMessage": { "type": "string", "examples": [ "Backup Not Found" ], "description": "Error message if backup failed" }, "creationTime": { "$ref": "#/components/schemas/Instant", "type": "string", "examples": [ "2025-11-13T12:34:56Z" ], "description": "Timestamp when the backup was created" }, "completionTime": { "$ref": "#/components/schemas/Instant", "type": "string", "examples": [ "2025-11-13T12:45:00Z" ], "description": "Timestamp when the backup completed" }, "backupDatabases": { "type": "array", "items": { "$ref": "#/components/schemas/BackupDatabaseResponse" }, "description": "List of logical backup databases" } } }, "LogicalRestoreResponse": { "type": "object", "required": [ "id", "logicalRestoreName", "adapterId", "type", "restoreDatabases", "status" ], "description": "Logical restore details", "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "examples": [ "550e8400-e29b-41d4-a716-446655440000" ], "description": "Identifier of the logical restore" }, "logicalRestoreName": { "type": "string", "description": "Name of the logical restore in adapter" }, "adapterId": { "type": "string", "examples": [ "4e1e9922-e5bf-490d-bb57-18a14de593c6" ], "description": "Unique identifier of the adapter" }, "type": { "type": "string", "examples": [ "postgres" ], "description": "Type of the adapter" }, "restoreDatabases": { "type": "array", "items": { "$ref": "#/components/schemas/RestoreDatabaseResponse" }, "description": "List of logical restore databases" }, "status": { "type": [ "string", "object" ], "enum": [ "NOT_STARTED", "IN_PROGRESS", "FAILED", "RETRYABLE_FAIL", "COMPLETED" ], "description": "Current state of the restore operation" }, "errorMessage": { "type": "string", "description": "Information about error message during restore process" }, "creationTime": { "$ref": "#/components/schemas/Instant", "type": "string", "description": "Aggregated information about creation time of databases in adapter" }, "completionTime": { "$ref": "#/components/schemas/Instant", "type": "string", "description": "Aggregated information about completion time of databases in adapter" } } }, "Mapping": { "type": "object", "description": "Defines how source database configurations map to target configurations during restore", "properties": { "namespaces": { "type": "object", "examples": [ { "source-namespace": "target-namespace" } ], "additionalProperties": { "type": "string" }, "description": "Mapping of source namespace to target namespace" }, "tenants": { "type": "object", "examples": [ { "source-tenant": "target-tenant" } ], "additionalProperties": { "type": "string" }, "description": "Mapping of source tenant to target tenant" } } }, "Metadata": { "type": "object", "required": [ "apiVersion", "supportedRoles", "features" ], "properties": { "apiVersion": { "type": "string", "description": "Adapter API version" }, "apiVersions": { "$ref": "#/components/schemas/ApiVersion", "type": "object", "description": "Adapter API version" }, "supportedRoles": { "type": "array", "items": { "type": "string" }, "description": "list of supported roles" }, "features": { "type": "object", "additionalProperties": { "type": "boolean" }, "description": "Prohibition or permission of features" }, "roHost": { "type": "string", "description": "Host of RO pod" } } }, "MigrationResult": { "type": "object", "properties": { "migrated": { "type": "array", "items": { "type": "string" } }, "migratedDbInfo": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseResponseV3ListCP" } }, "conflicted": { "type": "array", "items": { "type": "string" } }, "failed": { "type": "array", "items": { "type": "string" } }, "failureReasons": { "type": "array", "items": { "type": "string" } } } }, "NamespaceBackup": { "type": "object", "required": [ "id", "namespace", "databases", "databaseRegistries" ], "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "description": "A unique identifier of the backup process. Backup process is associated with this id." }, "backups": { "type": "array", "items": { "$ref": "#/components/schemas/DatabasesBackup" }, "description": "List of adapters with backup information." }, "failReasons": { "type": "array", "items": { "type": "string" }, "description": "List of errors that can occur during backup process." }, "namespace": { "type": "string", "description": "This parameter specifies project namespace whose databases are needed to save." }, "databases": { "type": "array", "items": { "$ref": "#/components/schemas/Database" }, "description": "List of backup databases." }, "databaseRegistries": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseRegistry" }, "description": "List of backup database registers" }, "restorations": { "type": "array", "items": { "$ref": "#/components/schemas/NamespaceRestoration" }, "description": "The object stores a restoring information related to this backup." }, "created": { "$ref": "#/components/schemas/Date", "type": "string", "description": "Data of backup process creation." }, "status": { "$ref": "#/components/schemas/Status", "type": "string", "description": "Status of backup process. This field may contain: FAIL, ACTIVE, PROCEEDING, RESTORING, INVALIDATED, DELETION_FAILED" } } }, "NamespaceBackupDTO": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/UUID" }, "backups": { "type": "array", "items": { "$ref": "#/components/schemas/DatabasesBackup" } }, "failReasons": { "type": "array", "items": { "type": "string" } }, "namespace": { "type": "string" }, "databases": { "type": "array", "items": { "$ref": "#/components/schemas/Database" } }, "databaseRegistries": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseRegistry" } }, "restorations": { "type": "array", "items": { "$ref": "#/components/schemas/NamespaceRestoration" } }, "created": { "$ref": "#/components/schemas/Date" }, "status": { "$ref": "#/components/schemas/Status" } } }, "NamespaceBackupDeletion": { "type": "object", "properties": { "deleteResults": { "type": "array", "items": { "$ref": "#/components/schemas/DeleteResult" } }, "failReasons": { "type": "array", "items": { "type": "string" } }, "status": { "$ref": "#/components/schemas/Status1" } } }, "NamespaceRestoration": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/UUID" }, "restoreResults": { "type": "array", "items": { "$ref": "#/components/schemas/RestoreResult" } }, "failReasons": { "type": "array", "items": { "type": "string" } }, "status": { "$ref": "#/components/schemas/Status1" } } }, "NotRecreated": { "type": "object", "required": [ "type", "classifier", "error" ], "properties": { "type": { "type": "string", "description": "Requested physical type of logical database. For example mongodb or postgresql" }, "classifier": { "type": "object", "additionalProperties": {}, "description": "Requested classifier" }, "error": { "type": "string", "description": "Contains a message of error that occurred during recreating" } } }, "OffsetDateTime": { "type": "string", "format": "date-time", "examples": [ "2022-03-10T12:15:50-04:00" ] }, "OnMicroserviceRuleRequest": { "type": "object", "required": [ "type", "microservices" ], "description": "Rule registration request allows to add a new rule for the specific type of logical databases, which would be applied in specific order.", "properties": { "type": { "type": "string", "description": "Type of physical database which logical base belongs to" }, "rules": { "type": "array", "items": { "$ref": "#/components/schemas/RuleOnMicroservice" }, "description": "List of rules to microservices. Allows to define physical database" }, "microservices": { "type": "array", "items": { "type": "string" }, "description": "List of microservice names to which the specified rule has a place to be" } } }, "OperationDetails": { "type": "object", "properties": { "tasks": { "type": "array", "items": { "$ref": "#/components/schemas/TaskDetails" } } } }, "OperationState": { "type": "object", "properties": { "status": { "type": "string" }, "description": { "type": "string" } } }, "OperationStatusExtendedResponse": { "type": "object", "properties": { "status": { "type": "string", "readOnly": true }, "message": { "type": "string" }, "operationDetails": { "$ref": "#/components/schemas/OperationDetails" } } }, "OverallStatusResponse": { "type": "object", "properties": { "overallHealthStatus": { "type": "string", "description": "Overall health status" }, "overallLogicalDbNumber": { "type": "integer", "format": "int32", "description": "Number of logical databases" }, "physicalDatabaseInfoList": { "type": "array", "items": { "$ref": "#/components/schemas/PhysicalDatabaseInfo" }, "description": "Information about physical databases" } } }, "PasswordChangeRequestV3": { "type": "object", "required": [ "type" ], "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Composite database identifier." }, "type": { "type": "string", "description": "Database type." }, "userRole": { "type": "string", "description": "Indicates which grants should have user in connection properties" } } }, "PasswordChangeResponse": { "type": "object", "properties": { "changed": { "type": "array", "items": { "$ref": "#/components/schemas/PasswordChanged" }, "description": "List containing \"classifier:connection\" information with which the password was changed successfully." }, "failed": { "type": "array", "items": { "$ref": "#/components/schemas/PasswordFailed" }, "description": "List containing fail information." } } }, "PasswordChanged": { "type": "object", "required": [ "classifier", "connection" ], "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Database composite identify key." }, "connection": { "type": "object", "additionalProperties": {}, "description": "New database connection." } } }, "PasswordFailed": { "type": "object", "required": [ "classifier", "message" ], "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Database composite identify key." }, "message": { "type": "string", "description": "Error message." } } }, "PermanentPerNamespaceRuleDTO": { "type": "object", "required": [ "dbType", "physicalDatabaseId", "namespaces" ], "description": "Rule allows to define in which physical database new logical databases should be created", "properties": { "dbType": { "type": "string", "description": "Physical db type (ex. postgresql, mongodb, etc), for which rule should be applied." }, "physicalDatabaseId": { "type": "string", "description": "Identifier of physical database where newly created logical databases should be placed." }, "namespaces": { "type": "array", "uniqueItems": true, "items": { "type": "string" }, "description": "Namespaces for which rules should be applied" } } }, "PermanentPerNamespaceRuleDeleteDTO": { "type": "object", "required": [ "namespaces" ], "properties": { "dbType": { "type": "string", "description": "Db type for which rules should be deleted. If omitted all rules for specified namespaces will be deleted." }, "namespaces": { "type": "array", "uniqueItems": true, "items": { "type": "string" }, "description": "Namespaces for which rules should be deleted" } } }, "PhysicalDatabaseInfo": { "type": "object", "properties": { "physicalDatabaseId": { "type": "string", "description": "Physical database identifier" }, "healthStatus": { "type": "string", "description": "Adapter health status" }, "logicalDbNumber": { "type": "string", "description": "Number of logical databases related to this physical database" } } }, "PhysicalDatabaseRegistrationResponseDTOV3": { "type": "object", "required": [ "type", "adapterId", "adapterAddress", "global", "labels", "supports" ], "properties": { "type": { "type": "string", "description": "Adapter type." }, "adapterId": { "type": "string", "description": "Adapter identifier." }, "adapterAddress": { "type": "string", "description": "Adapter address." }, "global": { "type": "boolean", "description": "If physical database is global, it is used as a default for its database type." }, "labels": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Additional information that has been sent during physical database registration." }, "supports": { "type": "object", "additionalProperties": { "type": "boolean" }, "description": "Information about features this adapter supports." }, "features": { "type": "object", "additionalProperties": { "type": "boolean" } }, "supportedVersion": { "type": "string" }, "supportedRoles": { "type": "array", "items": { "type": "string" } } } }, "PhysicalDatabaseRegistryRequestV3": { "type": "object", "required": [ "adapterAddress", "httpBasicCredentials", "metadata", "status" ], "description": "V3 Request model for sending physical database registration to DBaaS", "properties": { "adapterAddress": { "type": "string", "description": "Physical address of DBaaS adapter. The address is used for CRUD operation with logic databases." }, "httpBasicCredentials": { "$ref": "#/components/schemas/HttpBasicCredentials", "type": "object", "description": "Basic authentication username and password for requests from DBaaS Aggregator to DBaaS adapter." }, "labels": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Additional information about physical database. It may be a version of database cluster, any labels, and etc." }, "metadata": { "$ref": "#/components/schemas/Metadata", "type": "object", "description": "Information about supported roles, adapter api version and features" }, "status": { "type": "string", "description": "Adapter status: running or run" } } }, "PolicyRole": { "type": "object", "properties": { "type": { "type": "string" }, "defaultRole": { "type": "string" }, "additionalRole": { "type": "array", "items": { "type": "string" } } } }, "RecreateDatabaseRequest": { "type": "object", "required": [ "type", "classifier", "physicalDatabaseId" ], "description": "Request model for recreate existing database. The database will have the same settings and classifier as original", "properties": { "type": { "type": "string", "description": "The physical type of logical database. For example mongodb or postgresql" }, "classifier": { "type": "object", "additionalProperties": {}, "description": "The unique key of existing database. The list of all created databases in a specific namespace can be found by by \u0027List of all databases\u0027 API." }, "physicalDatabaseId": { "type": "string", "description": "Specifies the identificator of physical database where a logical database will be recreated. You can get the list of all physical databases by \"List registered physical databases\" API." } } }, "RecreateDatabaseResponse": { "type": "object", "description": "Response model for recreate existing database API. The model contains successful and unsuccessful databases", "properties": { "successfully": { "type": "array", "items": { "$ref": "#/components/schemas/Recreated" }, "description": "The list contains successfully recreated databases." }, "unsuccessfully": { "type": "array", "items": { "$ref": "#/components/schemas/NotRecreated" }, "description": "The list contains requests from which an error occurred during recreating. For these requests databases were not recreated." } } }, "Recreated": { "type": "object", "required": [ "classifier", "type", "newDb" ], "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Requested classifier" }, "type": { "type": "string", "description": "Requested physical type of logical database. For example mongodb or postgresql" }, "newDb": { "$ref": "#/components/schemas/DatabaseResponse", "type": "object", "description": "A recreated logical database. This database has the same classifier as a original but connection properties are different (url, dbname, username, password)" } } }, "RegisterDatabaseRequest": { "type": "object", "required": [ "classifier", "connectionProperties", "resources", "namespace", "type", "name" ], "description": "Request to add database to registration", "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of database, it should not exist in registration, or the request would be ignored." }, "connectionProperties": { "type": "object", "additionalProperties": {}, "description": "Connection properties used to connect to database. It contains such keys as url, authDbName, username, password, port, host. Setting keys depends on the database type." }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/DbResource" }, "description": "List of the resources needed to drop during database drop." }, "namespace": { "type": "string", "description": "Namespace where database is placed." }, "type": { "type": "string", "description": "The type of database, for example postgresql or mongodb." }, "adapterId": { "type": "string", "description": "Identifier of an adapter to work with database. If not specified then the default would be used." }, "name": { "type": "string", "description": "Name of database." }, "backupDisabled": { "type": "boolean", "description": "This parameter specifies if the DBaaS should except this database from backup/restore procedure. The parameter cannot be modified and it is installed only once during registration request." }, "physicalDatabaseId": { "type": "string", "description": "Physical database identifier where the registered database should be located. If it is absent, adapter id may be used to identify the target physical database." } } }, "RegisterDatabaseRequestV3": { "type": "object", "required": [ "classifier", "connectionProperties", "resources", "namespace", "type", "name" ], "description": "Request to add database to registration", "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of database, it should not exist in registration, or the request would be ignored." }, "connectionProperties": { "type": "array", "items": { "type": "object", "additionalProperties": {} }, "description": "Connection properties used to connect to database. It contains such keys as url, authDbName, username, password, port, host. Setting keys depends on the database type." }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/DbResource" }, "description": "List of the resources needed to drop during database drop." }, "namespace": { "type": "string", "description": "Namespace where database is placed." }, "type": { "type": "string", "description": "The type of database, for example postgresql or mongodb." }, "adapterId": { "type": "string", "description": "Identifier of an adapter to work with database. If not specified then the default would be used." }, "name": { "type": "string", "description": "Name of database." }, "backupDisabled": { "type": "boolean", "description": "This parameter specifies if the DBaaS should except this database from backup/restore procedure. The parameter cannot be modified and it is installed only once during registration request." }, "physicalDatabaseId": { "type": "string", "description": "Physical database identifier where the registered database should be located. If it is absent, adapter id may be used to identify the target physical database." }, "dbHost": { "type": "string", "description": "Physical database host where the registered database is located. Must be in format: \u003cservice-name\u003e.\u003cnamespace\u003e, e.g.: pg-patroni.postgresql-core" } } }, "RegisterDatabaseWithUserCreationRequest": { "type": "object", "required": [ "classifier", "type", "name" ], "description": "Request to add database to registration", "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of database, it should not exist in registration, or the request would be ignored." }, "type": { "type": "string", "description": "The type of database, for example postgresql or mongodb." }, "name": { "type": "string", "description": "Name of database." }, "backupDisabled": { "type": "boolean", "description": "This parameter specifies if the DBaaS should except this database from backup/restore procedure. The parameter cannot be modified and it is installed only once during registration request." }, "physicalDatabaseId": { "type": "string", "description": "Physical database identifier where the registered database should be located. If it is absent, adapter id may be used to identify the target physical database." }, "dbHost": { "type": "string", "description": "Physical database host where the registered database is located. Must be in format: \u003cservice-name\u003e.\u003cnamespace\u003e, e.g.: pg-patroni.postgresql-core" } } }, "RegisteredPhysicalDatabasesDTO": { "type": "object", "properties": { "identified": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/PhysicalDatabaseRegistrationResponseDTOV3" }, "description": "List of registered physical databases with with a known identifier" } } }, "RestoreDatabaseResponse": { "type": "object", "required": [ "id", "name", "status", "path" ], "description": "Logical database restore details", "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "examples": [ "550e8400-e29b-41d4-a716-446655440000" ], "description": "Identifier of the restore database" }, "name": { "type": "string", "examples": [ "mydb" ], "description": "Name of the database" }, "classifiers": { "type": "array", "examples": [ [ { "namespace": "namespace", "microserviceName": "microserviceName", "scope": "service" } ] ], "items": { "$ref": "#/components/schemas/ClassifierDetailsResponse" }, "description": "List of database classifiers. Each classifier is a sorted map of attributes." }, "users": { "type": "array", "examples": [ "[{\"name\":\"username\",\"role\":\"admin\"}" ], "items": { "$ref": "#/components/schemas/User1" }, "description": "List of database users" }, "settings": { "type": "object", "examples": [ { "key": "value" } ], "additionalProperties": {}, "description": "Database settings as a key-value map" }, "bgVersion": { "type": "string", "examples": [ "v2.1.0" ], "description": "Blue-Green version of database" }, "status": { "type": [ "string", "object" ], "enum": [ "NOT_STARTED", "IN_PROGRESS", "FAILED", "RETRYABLE_FAIL", "COMPLETED" ], "description": "Current state of the restore database" }, "duration": { "type": "integer", "format": "int64", "examples": [ 12000 ], "description": "Duration of the restore operation" }, "path": { "type": "string", "examples": [ "/backups/mydb-2025-11-13.bak" ], "description": "Path to the restore file in the storage" }, "errorMessage": { "type": "string", "examples": [ "Restore Not Found" ], "description": "Error message if the restore failed" }, "creationTime": { "$ref": "#/components/schemas/Instant", "type": "string", "examples": [ "2025-11-13T12:34:56Z" ], "description": "Timestamp when the restore was created" } } }, "RestoreExternalDatabaseResponse": { "type": "object", "required": [ "id", "name" ], "description": "External database details", "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "examples": [ "550e8400-e29b-41d4-a716-446655440000" ], "description": "Identifier of the external restore database" }, "name": { "type": "string", "examples": [ "mydb" ], "description": "Name of the external database" }, "type": { "type": "string", "examples": [ "postgresql" ], "description": "Type of the database" }, "classifiers": { "type": "array", "items": { "$ref": "#/components/schemas/ClassifierDetailsResponse" }, "description": "List of classifier objects describing database attributes." } } }, "RestorePasswordRequest": { "type": "object", "required": [ "physicalDbId", "type" ], "description": "Request to start passwords restoration", "properties": { "physicalDbId": { "type": "string", "description": "Id of physical database where is needed to restore passwords" }, "type": { "type": "string", "description": "Type of physical database where is needed to restore passwords (ex. opensearch)" }, "settings": { "type": "object", "additionalProperties": {}, "description": "Field with additional information for adapter" } } }, "RestoreRequest": { "type": "object", "required": [ "restoreName", "storageName", "blobPath", "externalDatabaseStrategy" ], "description": "Request to restore a database from a backup", "properties": { "restoreName": { "type": "string", "examples": [ "restore-before-prod-update-20251203T1020-4t6S" ], "pattern": "\\S", "description": "Unique name of the restore" }, "storageName": { "type": "string", "examples": [ "s3-backend" ], "pattern": "\\S", "description": "Name of the storage backend containing the restore" }, "blobPath": { "type": "string", "examples": [ "/backups" ], "pattern": "\\S", "description": "Path to the restore file in the storage" }, "filterCriteria": { "type": "object", "description": "Filter criteria", "properties": { "include": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Include databases that match any of the filters in the list" }, "exclude": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Exclude databases that match any of the filters in the list" } } }, "mapping": { "type": "object", "description": "Mapping to use for the restore operation", "properties": { "namespaces": { "type": "object", "examples": [ { "source-namespace": "target-namespace" } ], "additionalProperties": { "type": "string" }, "description": "Mapping of source namespace to target namespace" }, "tenants": { "type": "object", "examples": [ { "source-tenant": "target-tenant" } ], "additionalProperties": { "type": "string" }, "description": "Mapping of source tenant to target tenant" } } }, "externalDatabaseStrategy": { "type": [ "string", "object" ], "enum": [ "FAIL", "SKIP", "INCLUDE" ], "examples": [ "FAIL" ], "description": "How to handle external databases during restore", "default": "FAIL" } } }, "RestoreResponse": { "type": "object", "required": [ "restoreName", "backupName", "storageName", "externalDatabaseStrategy", "status", "total", "completed" ], "description": "Response containing the restore operation details", "properties": { "restoreName": { "type": "string", "examples": [ "restore-before-prod-update-20251203T1020-4t6S" ], "pattern": "\\S", "description": "Unique name of the restore" }, "backupName": { "type": "string", "examples": [ "before-prod-update-20251013T1345-G5s8" ], "pattern": "\\S", "description": "Unique name of the backup" }, "storageName": { "type": "string", "examples": [ "s3-backend" ], "pattern": "\\S", "description": "Name of the storage backend containing the restore" }, "blobPath": { "type": "string", "examples": [ "/backups" ], "description": "Path to the restore file in the storage" }, "externalDatabaseStrategy": { "type": [ "string", "object" ], "enum": [ "FAIL", "SKIP", "INCLUDE" ], "examples": [ "FAIL" ], "description": "How to handle external databases during restore" }, "filterCriteria": { "type": "object", "description": "Criteria used to filter restore operations", "properties": { "include": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Include databases that match any of the filters in the list" }, "exclude": { "type": "array", "items": { "$ref": "#/components/schemas/Filter" }, "description": "Exclude databases that match any of the filters in the list" } } }, "mapping": { "type": "object", "description": "Mapping configuration for the restore", "properties": { "namespaces": { "type": "object", "examples": [ { "source-namespace": "target-namespace" } ], "additionalProperties": { "type": "string" }, "description": "Mapping of source namespace to target namespace" }, "tenants": { "type": "object", "examples": [ { "source-tenant": "target-tenant" } ], "additionalProperties": { "type": "string" }, "description": "Mapping of source tenant to target tenant" } } }, "status": { "type": [ "string", "object" ], "enum": [ "NOT_STARTED", "IN_PROGRESS", "FAILED", "COMPLETED", "DELETED" ], "description": "Current state of the restore operation" }, "total": { "type": "integer", "format": "int32", "examples": [ 5 ], "description": "Total number of databases being restored" }, "completed": { "type": "integer", "format": "int32", "examples": [ 5 ], "description": "Completed databases restore operation" }, "errorMessage": { "type": "string", "examples": [ "Backup Not Found" ], "description": "Aggregated error messages during restore operation" }, "logicalRestores": { "type": "array", "items": { "$ref": "#/components/schemas/LogicalRestoreResponse" }, "description": "List of logical restores" }, "externalDatabases": { "type": "array", "items": { "$ref": "#/components/schemas/RestoreExternalDatabaseResponse" }, "description": "List of external databases" } } }, "RestoreResult": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/UUID" }, "databasesBackup": { "$ref": "#/components/schemas/DatabasesBackup", "type": "object", "description": "This object contains information about restoring the specific adapter." }, "status": { "$ref": "#/components/schemas/Status1", "type": "string", "description": "The field contains the restore status of specific adapter." }, "adapterId": { "type": "string" }, "changedNameDb": { "type": "object", "additionalProperties": { "type": "string" }, "description": "This associative array contain database names, where key: \"old db name\", value: \"new db name\". This array will not be empty if the targetNamespace parameter will be passed and it will be filled during restore to another namespace." } } }, "RestoreStatusResponse": { "type": "object", "required": [ "status" ], "description": "Current status of a restore operation", "properties": { "status": { "type": [ "string", "object" ], "enum": [ "NOT_STARTED", "IN_PROGRESS", "FAILED", "COMPLETED", "DELETED" ], "description": "Current state of the restore operation" }, "total": { "type": "integer", "format": "int32", "examples": [ 5 ], "description": "Total number of databases to be restored", "minimum": 0 }, "completed": { "type": "integer", "format": "int32", "examples": [ 3 ], "description": "Number of databases successfully restored", "minimum": 0 }, "errorMessage": { "type": "string", "examples": [ "Insufficient permissions to create database" ], "description": "Error details if the restore failed" } } }, "RestoreUsersRequest": { "type": "object", "required": [ "classifier", "type" ], "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of the database and distinguishes this database from other database in the same namespase. It contains such keys as scope, microserviceName, namespace." }, "type": { "type": "string", "description": "The physical type of logical database. For example postgresql" }, "role": { "type": "string", "description": "User role" } } }, "RestoreUsersResponse": { "type": "object", "properties": { "unsuccessfully": { "type": "array", "items": { "$ref": "#/components/schemas/UnsuccessfulRestore" } }, "successfully": { "type": "array", "items": { "$ref": "#/components/schemas/SuccessfullRestore" } } } }, "RuleBody": { "type": "object", "required": [ "type", "config" ], "description": "Rule allows to define physical database for new logical databases", "properties": { "type": { "$ref": "#/components/schemas/RuleType", "type": "string", "description": "Type of rule is required, it defines what logic would be used when rule is applying." }, "config": { "type": "object", "additionalProperties": {}, "description": "Configuration contains rule-specific information: \n - perNamespace rule only expects phydbid (physical database identifier) to be specified in rule." } } }, "RuleOnMicroservice": { "type": "object", "required": [ "label" ], "description": "Rule allows to define physical database for new logical databases on microservice", "properties": { "label": { "type": "string", "description": "Label uses to find physical DB which contains this label" } } }, "RuleRegistrationRequest": { "type": "object", "required": [ "type" ], "description": "Rule registration request allows to add a new rule for the specific type of logical databases, which would be applied in specific order.", "properties": { "order": { "type": "integer", "format": "int64", "description": "Inside namespace+type domain, order defines which rule would be used first. Thelesser order takes precedence. The order is optional; if not specified then the maximum over namespace+type domain would be calculated." }, "type": { "type": "string", "description": "Type of database required. The rule would only work on logical databases of the specified type." }, "rule": { "$ref": "#/components/schemas/RuleBody" } } }, "RuleType": { "type": "string", "enum": [ "perNamespace" ], "description": "Rule type specified what configuration applies to which logic. \n - perNamespace rule would just use specified physical database for any new logical database in namespace, where rule works" }, "ServiceRole": { "type": "object", "properties": { "name": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } } } }, "Source": { "type": "object", "description": "Represents the particular part of the request which led to the validation error", "properties": { "pointer": { "type": "string", "description": "JSON path to the part of the request which led to the error" }, "parameter": { "type": "string", "description": "Request parameter which led to the error" }, "pathVariable": { "type": "string", "description": "URI path variable name which led to the error" } } }, "Spec": { "type": "object", "properties": { "specRootUrl": { "type": "string", "description": "The root URL part for that API version" }, "major": { "type": "integer", "format": "int32", "description": "The last adapter API major version" }, "minor": { "type": "integer", "format": "int32", "description": "The last adapter API minor version" }, "supportedMajors": { "type": "array", "items": { "type": "integer", "format": "int32" }, "description": "Contains a list of supported adapter API major versions" } } }, "Status": { "type": "string", "enum": [ "FAIL", "ACTIVE", "PROCEEDING", "RESTORING", "INVALIDATED", "DELETION_FAILED" ] }, "Status1": { "type": "string", "enum": [ "SUCCESS", "PROCEEDING", "FAIL" ] }, "SuccessRegistrationV3": { "type": "object", "required": [ "id", "connectionProperties", "resources" ], "description": "V3 Request model for registration new physical databases roles ", "properties": { "id": { "$ref": "#/components/schemas/UUID", "type": "string", "description": "Record Id" }, "connectionProperties": { "type": "array", "items": { "type": "object", "additionalProperties": {} }, "description": "Additional roles" }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/DbResource" }, "description": "Resources" } } }, "SuccessfulRestoreUsersResponse": { "type": "object", "properties": { "message": { "type": "string" } } }, "SuccessfullRestore": { "type": "object", "properties": { "connectionProperties": { "type": "object", "additionalProperties": {} } } }, "TaskDetails": { "type": "object", "properties": { "taskId": { "type": "string" }, "taskName": { "type": "string" }, "state": { "$ref": "#/components/schemas/OperationState" }, "classifier": { "type": "object", "additionalProperties": {} }, "type": { "type": "string" }, "backupId": { "type": "string" }, "restoreId": { "type": "string" } } }, "TmfError": { "type": "object", "properties": { "id": { "type": "string" }, "referenceError": { "type": "string" }, "code": { "type": "string" }, "reason": { "type": "string" }, "message": { "type": "string" }, "status": { "type": "string" }, "source": {}, "meta": { "type": "object", "additionalProperties": {} } } }, "TmfErrorResponse": { "type": "object", "properties": { "id": { "type": "string" }, "referenceError": { "type": "string" }, "code": { "type": "string" }, "reason": { "type": "string" }, "message": { "type": "string" }, "status": { "type": "string" }, "source": {}, "meta": { "type": "object", "additionalProperties": {} }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/TmfError" } }, "@type": { "type": "string" }, "@schemaLocation": { "type": "string" } } }, "UUID": { "type": "string", "format": "uuid", "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" }, "UnsuccessfulRestore": { "type": "object", "properties": { "connectionProperties": { "type": "object", "additionalProperties": {} }, "errorMessage": { "type": "string" } } }, "UpdateClassifierRequestV3": { "type": "object", "required": [ "from", "to" ], "description": "Contains primary or source (\"from\") classifier by which a database record will be found and changed to target classifier (\"from\")", "properties": { "from": { "type": "object", "additionalProperties": {}, "description": "Primary or source classifier." }, "to": { "type": "object", "additionalProperties": {}, "description": "Target classifier." }, "fromV1orV2ToV3": { "type": "boolean", "examples": [ false ], "description": "Target classifier." }, "clone": { "type": "boolean", "examples": [ false ], "description": "Create copy of record database in dbaas." } } }, "UpdateConnectionPropertiesRequest": { "type": "object", "required": [ "classifier", "connectionProperties" ], "description": "Contains classifier by which a database record for updating connection properties will be found and new connection properties", "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Database classifier." }, "connectionProperties": { "type": "object", "additionalProperties": {}, "description": "New connection properties. Structure of connection properties for different db types may be found at https://perch.qubership.org/pages/viewpage.action?spaceKey\u003dCLOUDCORE\u0026title\u003dDbaaS+Adapters" }, "physicalDatabaseId": { "type": "string", "description": "Specifies the new identification of physical database where a logical database is already located. You have to pass this parameter if your goal is to update and specify a new physical database.It is an optional parameter and if not specified then physical database will not change. FYI: You can get the list of all physical databases by \"List registered physical databases\" API." }, "resources": { "$ref": "#/components/schemas/DbResource", "description": "The list of the resources which related to the logical database, for example: user, database.You should pass this parameter if you change username or database name. In order to update the list you should get an original list, change one use and pass. FYI: You can get the list of origin database resources by \"List of all databases\" API with \"withResources\" query parameter." }, "dbName": { "type": "string", "description": "Name of database." } } }, "UpdateHostRequest": { "type": "object", "required": [ "type", "classifier", "physicalDatabaseHost", "physicalDatabaseId" ], "description": "Request object containing the necessary information to update the physical host in a logical database", "properties": { "type": { "type": "string", "description": "The physical type of logical database. For example mongodb or postgresql" }, "classifier": { "type": "object", "additionalProperties": {}, "description": "The unique key of existing database. " }, "makeCopy": { "type": "boolean", "description": "If true, a copy of the logical database registry will be created before applying changes. If false, changes will be made directly to the existing registry.", "default": true }, "physicalDatabaseHost": { "type": "string", "description": "Contains physical database host on which it\u0027s needed to change. The host must follow the format: \u003cphysical database k8s service\u003e.\u003cphysical database namespace\u003e. Example: pg-patroni.core-postgresql." }, "physicalDatabaseId": { "type": "string", "description": "Specifies id of new physical database. The value can be found in dbaas-adapter env" } } }, "UpdateSettingsAdapterRequest": { "type": "object", "required": [ "currentSettings", "newSettings" ], "description": "Contains current and new settings", "properties": { "currentSettings": { "type": "object", "additionalProperties": {}, "description": "All current database settings already applied to the target database." }, "newSettings": { "type": "object", "additionalProperties": {}, "description": "New version of all database settings to apply to the database. Must consist of all settings the target database must incorporate after this update request will be executed." } } }, "User": { "type": "object", "description": "Database user information", "properties": { "name": { "type": "string", "examples": [ "username" ], "description": "Name of the database user" }, "role": { "type": "string", "examples": [ "admin" ], "description": "Role of the database user" } } }, "User1": { "type": "object", "description": "Database user information", "properties": { "name": { "type": "string", "examples": [ "username" ], "description": "Name of the database user" }, "role": { "type": "string", "examples": [ "admin" ], "description": "Role of the database user" } } }, "UserOperationRequest": { "type": "object", "properties": { "classifier": { "type": "object", "additionalProperties": {}, "description": "Classifier describes the purpose of the database and distinguishes this database from other database in the same namespase. It contains such keys as dbClassifier, scope, microserviceName, namespace. Setting keys depends on the database type." }, "logicalUserId": { "type": "string", "description": "User uniq identifier. Using this field with classifier and type dbaas will determine to create or return created before user." }, "type": { "type": "string", "description": "The physical type of logical database. For example mongodb or postgresql" }, "userId": { "type": "string", "description": "The user identificator." } } }, "ValidateRulesResponse": { "type": "object", "required": [ "mapLabelToPhysicalDb", "defaultPhysicalDatabases" ], "properties": { "mapLabelToPhysicalDb": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Map with pairs of \u0027label : corresponding physical database\u0027." }, "defaultPhysicalDatabases": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Default physical databases for each registered type." } } } }, "securitySchemes": { "SecurityScheme": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Authentication" } } }, "tags": [ { "name": "API version controller", "description": "Providing API version info" }, { "name": "Backup \u0026 Restore", "description": "Backup \u0026 Restore operations for DBaaS" }, { "name": "Backups administration", "description": "Allows to get list of available backups, trigger backup collector and restore some specific backup. All backup management is per namespace." }, { "name": "Balancing Rules Administration V3", "description": "Allows to configure a logic of balancing logical databases over physical. " }, { "name": "Controller Database administration", "description": "Allows to create, access and drop databases. This API uses classifier as a key to create and retrieve databases. Classifier is an abstract key that could be any JSON object mapping to (String -\u003e Object) map. For example classifier could be \u0026#123; \"tenantId\": \"uuid\", \"namespace\": \"cloud-catalog-ci\", \"microserviceName\": \"product-catalog-manager\"\u0026#125;" }, { "name": "Controller for debug operations" }, { "name": "Controller for internal operations" }, { "name": "Database operation controller v3", "description": "This controller contains API for operations with already created databases, users." }, { "name": "Database users controller v3", "description": "This controller contains API for operations with database users." }, { "name": "Global Database Operation Controller v3", "description": "This controller provides APIs for performing operations on existing databases and users without requiring a specific namespace in the endpoints." }, { "name": "Microservice controller v3", "description": "This controller contains APIs based on microservice value." }, { "name": "Migration controller", "description": "Provides API to migrate: database registration from another source, database passwords to external system." }, { "name": "Physical databases registration controller", "description": "Provides API to register new physical databases" } ], "paths": { "/api-version": { "get": { "tags": [ "API version controller" ], "responses": { "200": { "description": "Current APi version and supported API versions", "content": { "application/json": { "schema": {} } } } }, "summary": "Api Version Info" } }, "/api/backups/v1/backup": { "post": { "summary": "Initiate database backup", "description": "Starts an asynchronous backup operation for the specified databases. Returns immediately with a backup name that can be used to track progress.", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "name": "dryRun", "in": "query", "schema": { "type": "boolean", "default": false } } ], "requestBody": { "description": "Backup request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupRequest" } } }, "required": true }, "responses": { "200": { "description": "Backup operation completed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupResponse" } } } }, "202": { "description": "Backup operation initiated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupResponse" } } } }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "404": { "description": "The requested resource could not be found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "422": { "description": "The request was accepted, but the server couldn\u0027t process due to incompatible resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/backups/v1/backup/{backupName}": { "get": { "summary": "Get backup details", "description": "Retrieve details about a specific backup operation", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Unique name of the backup", "required": true, "name": "backupName", "in": "path", "schema": { "type": "string", "pattern": "\\S" } } ], "responses": { "200": { "description": "Backup details retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupResponse" } } } }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "404": { "description": "The requested resource could not be found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] }, "delete": { "summary": "Delete backup", "description": "Delete the backup operation", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Unique name of the backup", "required": true, "name": "backupName", "in": "path", "schema": { "type": "string", "pattern": "\\S" } }, { "name": "force", "in": "query", "schema": { "type": "boolean", "default": false } } ], "responses": { "202": { "description": "Backup delete initialized successfully" }, "204": { "description": "Backup deleted successfully" }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "422": { "description": "The request was accepted, but the server couldn\u0027t process due to incompatible resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/backups/v1/backup/{backupName}/metadata": { "get": { "summary": "Get backup metadata", "description": "Retrieve metadata about a completed backup", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Unique name of the backup", "required": true, "name": "backupName", "in": "path", "schema": { "type": "string", "pattern": "\\S" } } ], "responses": { "200": { "description": "Backup metadata retrieved successfully", "headers": { "Digest": { "description": "Digest header with SHA-256 checksum of the response body", "schema": { "type": "string", "examples": [ "SHA-256\u003dabc123..." ] } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupResponse" } } } }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "404": { "description": "The requested resource could not be found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "422": { "description": "The request was accepted, but the server couldn\u0027t process due to incompatible resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/backups/v1/backup/{backupName}/restore": { "post": { "summary": "Restore from backup", "description": "Initiate a database restore operation from an existing backup.This operation is asynchronous and returns immediately with a restore name that can be used to track progress.Operation is not idempotent", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Unique name of the backup", "required": true, "name": "backupName", "in": "path", "schema": { "type": "string", "pattern": "\\S" } }, { "name": "dryRun", "in": "query", "schema": { "type": "boolean", "default": false } } ], "requestBody": { "description": "Restore request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreRequest" } } }, "required": true }, "responses": { "202": { "description": "Restore operation initiated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreResponse" } } } }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "404": { "description": "The requested resource could not be found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "422": { "description": "The request was accepted, but the server couldn\u0027t process due to incompatible resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/backups/v1/backup/{backupName}/status": { "get": { "summary": "Get backup status", "description": "Retrieve the current status of a backup operation", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Unique name of the backup", "required": true, "name": "backupName", "in": "path", "schema": { "type": "string", "pattern": "\\S" } } ], "responses": { "200": { "description": "Backup status retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupStatusResponse" } } } }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "404": { "description": "The requested resource could not be found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/backups/v1/operation/uploadMetadata": { "post": { "summary": "Upload backup metadata", "description": "Upload backup metadata", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Digest header in format: SHA-256\u003d\u003cbase64-hash\u003e", "in": "header", "name": "Digest", "required": true, "schema": { "type": "string", "examples": [ "SHA-256\u003dnOJRJg..." ] } } ], "requestBody": { "description": "Backup metadata", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupResponse" } } }, "required": true }, "responses": { "200": { "description": "Backup metadata uploaded successfully", "content": { "application/json": { "schema": {} } } }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/backups/v1/restore/{restoreName}": { "get": { "summary": "Get restore details", "description": "Retrieve details about a specific restore operation", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Unique name of the restore operation", "required": true, "name": "restoreName", "in": "path", "schema": { "type": "string", "pattern": "\\S" } } ], "responses": { "200": { "description": "Restore details retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreResponse" } } } }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "404": { "description": "The requested resource could not be found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] }, "delete": { "summary": "Delete restore", "description": "Delete a restore operation", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Unique name of the restore operation", "required": true, "name": "restoreName", "in": "path", "schema": { "type": "string", "pattern": "\\S" } } ], "responses": { "204": { "description": "Restore operation deleted successfully" }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "422": { "description": "The request was accepted, but the server couldn\u0027t process due to incompatible resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/backups/v1/restore/{restoreName}/retry": { "post": { "summary": "Retry restore", "description": "Retry a failed restore operation", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Unique name of the restore operation", "required": true, "name": "restoreName", "in": "path", "schema": { "type": "string", "pattern": "\\S" } } ], "responses": { "202": { "description": "Restore retry accepted and is being processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "404": { "description": "The requested resource could not be found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "422": { "description": "The request was accepted, but the server couldn\u0027t process due to incompatible resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/backups/v1/restore/{restoreName}/status": { "get": { "summary": "Get restore status", "description": "Retrieve the current status of a restore operation", "tags": [ "Backup \u0026 Restore" ], "parameters": [ { "description": "Unique name of the restore operation", "required": true, "name": "restoreName", "in": "path", "schema": { "type": "string", "pattern": "\\S" } } ], "responses": { "200": { "description": "Restore status retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreStatusResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "404": { "description": "The requested resource could not be found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/bluegreen/v1/operation/commit": { "post": { "summary": "Commit Blue-Green Domain", "description": "Group namespaces into one Blue-Green domain", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BgStateRequest" } } }, "required": true }, "responses": { "200": { "description": "Commit operation successfully done", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Incorrect request" }, "409": { "description": "Invalid request body" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/destroy-domain": { "delete": { "summary": "Delete Blue-Green domain", "description": "Destroy a registered Blue-Green domain", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BgNamespaceRequest" } } }, "required": true }, "responses": { "200": { "description": "Blue-green domain successfully destroyed", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Incorrect request" }, "404": { "description": "Blue-Green domain not found" }, "409": { "description": "Invalid request body" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/get-domains": { "get": { "summary": "Get all Blue-Green domains", "description": "Get all registered Blue-Green domains", "responses": { "200": { "description": "All registered Blue-Green domains", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/get-domains/{namespace}": { "get": { "summary": "Get specific Blue-Green domain", "description": "Get specific registered Blue-Green domain by namespace", "parameters": [ { "name": "namespace", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Specific registered Blue-Green domain", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/init-domain": { "post": { "summary": "Init Blue-Green Domain", "description": "Group namespaces into one Blue-Green domain", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BgStateRequest" } } }, "required": true }, "responses": { "200": { "description": "Blue-green domain successfully registered", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Incorrect request" }, "409": { "description": "Invalid request body" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/list-domains": { "get": { "summary": "List all Blue-Green domains", "description": "List of registered Blue-Green domains", "responses": { "200": { "description": "List of registered Blue-Green domains", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/orphans": { "post": { "summary": "Get list of orphan databases", "description": "List of databases with orphan state related to requested namespaces", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "List of databases", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal processing error" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] }, "delete": { "summary": "Cleanup orphan databases", "description": "Housekeeping operation which drops all databases with ORPHAN state.WARNING! If delete\u003dtrue this operation will drop databases even when DBaaS is in PROD mode", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOrphansRequest" } } }, "required": true }, "responses": { "200": { "description": "Orphan databases successfully dropped", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Bad request" }, "500": { "description": "Internal processing error" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/promote": { "post": { "summary": "Promote", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BgStateRequest" } } }, "required": true }, "responses": { "200": { "description": "Promote is already done", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Incorrect request" }, "409": { "description": "Invalid request body" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/rollback": { "post": { "summary": "rollback", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BgStateRequest" } } }, "required": true }, "responses": { "200": { "description": "Rollback is already done", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Incorrect request" }, "409": { "description": "Invalid request body" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/warmup": { "post": { "summary": "Warmup namespace", "description": "The API prepares databases in namespace to work in versioning mode. If database is versioned then will be create full copy.If database is static will be create only new classifier", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BgStateRequest" } } }, "required": true }, "responses": { "200": { "description": "Warmup is already done", "content": { "application/json": { "schema": {} } } }, "202": { "description": "Warmup process has started, return trackingId " }, "400": { "description": "Incorrect request" }, "409": { "description": "Invalid request body" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/{trackingId}/status": { "get": { "summary": "Operation status", "description": "Get operation status by trackingId", "parameters": [ { "description": "Id to track operation", "required": true, "name": "trackingId", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Return operation status", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/bluegreen/v1/operation/{trackingId}/terminate": { "post": { "summary": "Terminate operation", "description": "Terminate operation by trackingId", "parameters": [ { "description": "Id to track operation", "required": true, "name": "trackingId", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Terminate operation and return status", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Blue Green Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/composite/v1/structures": { "post": { "summary": "Save or update composite", "description": "Create a new composite structure or update an existing one.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompositeStructureDto" } } }, "required": true }, "responses": { "204": { "description": "Composite is saved" }, "400": { "description": "Validation error" }, "409": { "description": "Conflict error. Namespace in request body is already associated with another composite structure" }, "500": { "description": "Internal server error" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Composite Controller" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] }, "get": { "summary": "Get all composite structures", "description": "Retrieve all composite structures that are registered in DBaaS.", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Internal server error" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Composite Controller" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/composite/v1/structures/{compositeId}": { "get": { "summary": "Get composite structure by composite id", "description": "Retrieve a composite structure by its Id. Composite id by design is baseline or baseline origin if namespace in blue-green", "parameters": [ { "name": "compositeId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Composite is found", "content": { "application/json": { "schema": {} } } }, "404": { "description": "Composite not found" }, "500": { "description": "Internal server error" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Composite Controller" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/composite/v1/structures/{compositeId}/delete": { "delete": { "summary": "Delete composite by composite id", "description": "Delete a composite structure by its ID.", "parameters": [ { "name": "compositeId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Composite is deleted successfully" }, "404": { "description": "Composite not found" }, "500": { "description": "Internal server error" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Composite Controller" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/dbaas/declarative/namespaces/{namespace}/service/{serviceName}": { "post": { "deprecated": true, "parameters": [ { "name": "namespace", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "serviceName", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "text/plain": { "schema": { "type": "string" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "summary": "Declarative Settings", "tags": [ "Declarative Controller" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/dbaas/declarative/status/{trackingId}": { "get": { "summary": "Operation status", "description": "Get operation status by trackingId", "deprecated": true, "parameters": [ { "description": "Id to track operation", "required": true, "name": "trackingId", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Return operation status", "content": { "application/json": { "schema": {} } } }, "404": { "description": "Not found operation status" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Declarative Controller" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/declarations/v1/apply": { "post": { "summary": "Apply config", "description": "Apply declarative config", "requestBody": { "content": { "text/plain": { "schema": { "type": "string" } } }, "required": true }, "responses": { "200": { "description": "Operation completed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclarativeResponse" } } } }, "202": { "description": "Asynchronous execution started", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclarativeResponse" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Config Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/declarations/v1/operation/{trackingId}/extendedTroubleshootingInfo": { "get": { "summary": "Operation status", "description": "Get operation status by trackingId", "parameters": [ { "description": "Id to track operation", "required": true, "name": "trackingId", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Return operation status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OperationStatusExtendedResponse" } } } }, "404": { "description": "Not found operation status" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Config Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/declarations/v1/operation/{trackingId}/status": { "get": { "summary": "Operation status", "description": "Get operation status by trackingId", "parameters": [ { "description": "Id to track operation", "required": true, "name": "trackingId", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Return operation status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclarativeResponse" } } } }, "404": { "description": "Not found operation status" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Config Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/declarations/v1/operation/{trackingId}/terminate": { "post": { "summary": "Terminate operation", "description": "Terminate operation by trackingId", "parameters": [ { "description": "Id to track operation", "required": true, "name": "trackingId", "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "Operation completed successfully" }, "404": { "description": "Incorrect trackingID" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Config Controller V 1" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/backups/{backupId}/restorations/{restorationId}": { "get": { "summary": "V3. Get restoration info", "description": "Returns restoration info", "tags": [ "Backups administration" ], "parameters": [ { "description": "Identifier of backup process", "required": true, "name": "backupId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } }, { "description": "Identifier of restore process", "required": true, "name": "restorationId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } } ], "responses": { "404": { "description": "Selected backup or restoration not found" }, "200": { "description": "Backup is validated and can be restored", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NamespaceBackup" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/v3/dbaas/backups/{backupId}/{parameter}": { "post": { "summary": "V3. Restore database", "description": "Restores backup for a specific backup ID", "tags": [ "Backups administration" ], "parameters": [ { "description": "Identifier of backup process", "required": true, "name": "backupId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } }, { "description": "This parameter specifies namespace for restoring to another project. This parameter is needed to use if backup and restore projects are different.", "name": "targetNamespace", "in": "query", "schema": { "type": "string" } } ], "responses": { "202": { "description": "Namespace restoration started, return backup id to track status" }, "400": { "description": "Selected backup cannot be restored" }, "404": { "description": "Selected backup not found" }, "200": { "description": "Backup successfully restored", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/v3/dbaas/balancing/rules/permanent": { "get": { "summary": "V3. Get permanent namespace balancing rule", "description": "Get list of applied permanent balancing rules.", "tags": [ "Balancing Rules Administration V3" ], "parameters": [ { "description": "Namespace for which the rules will be searched", "required": false, "name": "namespace", "in": "query", "schema": { "type": "string" } } ], "responses": { "404": { "description": "Rules not found" }, "200": { "description": "Return founded rules", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT", "DBAAS_DB_EDITOR" ] } ] }, "delete": { "summary": "V3. Delete permanent namespace balancing rule", "description": "Delete all permanent balancing rules on namespace. ", "tags": [ "Balancing Rules Administration V3" ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PermanentPerNamespaceRuleDeleteDTO" } } } }, "required": true }, "responses": { "200": { "description": "Rules deleted", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT", "DBAAS_DB_EDITOR" ] } ] }, "put": { "summary": "V3. Add permanent namespace balancing rule", "description": "Allows adding new permanent namespace balancing rule. Balancing rules are intended to define in which physical database new logical database should be created. This API allows add such rule for a namespace: it means that all logical databases for microservices in this namespace will be placed in specific physical database according to rule. Such rule is permanent and it won\u0027t be deleted during physical database deletion. \n + *WARNING! Rules can be overridden. Rule\u0027s integrity and validity is the responsibility of project(applies) side.* \n It means that rule doesn\u0027t merge and there can be only one version of rule. If you change configuration of previous rule and send it, then logical databases will be created by the new changed rule. Therefore, be careful before deleting or modifying the rule.", "tags": [ "Balancing Rules Administration V3" ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PermanentPerNamespaceRuleDTO" } } } }, "required": true }, "responses": { "400": { "description": "Cannot create two different rules for same namespace with different physicalDbId and same DbType" }, "200": { "description": "New rules created", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT", "DBAAS_DB_EDITOR" ] } ] } }, "/api/v3/dbaas/databases/changed": { "get": { "summary": "V3. List databases changed since a cursor", "description": "Returns databases whose credentials changed (password rotation or restore) strictly after the given cursor, ordered by change time, plus the current high-water mark. Consumed by the dbaas-operator rotation poller. Cluster-scoped: requires the CLUSTER_OPERATOR role.", "parameters": [ { "description": "Maximum number of databases to return (1..1000).", "name": "limit", "in": "query", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "description": "Registry id component of the keyset cursor (tie-breaker for rows sharing sinceTs). Defaults to the zero UUID when omitted.", "name": "sinceId", "in": "query", "schema": { "type": "string" } }, { "description": "Return databases changed strictly after this ISO-8601 timestamp (keyset cursor, paired with sinceId). Omit on the first call to receive only the current high-water mark.", "name": "sinceTs", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Changed databases and the current high-water mark", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangedDatabasesResponse" } } } }, "400": { "description": "Invalid \u0027since\u0027 or \u0027limit\u0027 parameter", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided", "content": { "application/json": { "schema": { "type": "string" } } } }, "403": { "description": "Not Allowed" } }, "tags": [ "Aggregated Database Administration No Namespace Controller V 3" ], "security": [ { "SecurityScheme": [ "CLUSTER_OPERATOR" ] } ] } }, "/api/v3/dbaas/databases/find-by-name/{dbname}": { "get": { "summary": "V3. Get database by name", "description": "Returns list of databases for the specific logical database name", "parameters": [ { "name": "dbname", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "namespace", "in": "query", "schema": { "type": "string" } }, { "name": "withDecryptedPassword", "in": "query", "schema": { "type": "boolean", "default": "false" } } ], "responses": { "500": { "description": "Internal error" }, "200": { "description": "List of databases with the specific logical database name", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseResponseV3ListCP" } } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "tags": [ "Aggregated Database Administration No Namespace Controller V 3" ], "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/databases/marked-for-drop": { "post": { "summary": "Get list of marked for drop databases", "description": "List of databases with marked for drop state related to requested namespaces (orphan databases are also included)", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, "required": true }, "responses": { "200": { "description": "List of marked for drop databases", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseResponseV3ListCP" } } } } }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided", "content": { "application/json": { "schema": { "type": "string" } } } }, "500": { "description": "Internal processing error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "403": { "description": "Not Allowed" } }, "tags": [ "Aggregated Database Administration No Namespace Controller V 3" ], "security": [ { "SecurityScheme": [ "NAMESPACE_CLEANER" ] } ] }, "delete": { "summary": "Cleanup marked for drop databases", "description": "Housekeeping operation which drops all databases with marked for drop state (orphan databases are also included)", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CleanupMarkedForDropRequest" } } }, "required": true }, "responses": { "200": { "description": "List of marked for drop databases, no cleanup performed", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseResponseV3ListCP" } } } } }, "202": { "description": "List of marked for drop databases, async cleanup process is started", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseResponseV3ListCP" } } } } }, "400": { "description": "The request is invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided", "content": { "application/json": { "schema": { "type": "string" } } } }, "403": { "description": "DBaaS is working in PROD mode. Deleting logical databases is prohibited", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "Internal processing error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "tags": [ "Aggregated Database Administration No Namespace Controller V 3" ], "security": [ { "SecurityScheme": [ "NAMESPACE_CLEANER" ] } ] } }, "/api/v3/dbaas/databases/update-host": { "post": { "summary": "V3. Update Physical Host in Connection Properties", "description": "This API updates the physical database host in the connection properties of logical databases. In the request body, you can specify whether to create a copy of the registry record (default behavior) or to make changes in place. If changes are made in place, the original database record will be updated.", "tags": [ "Global Database Operation Controller v3" ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateHostRequest" } } } }, "required": true }, "responses": { "200": { "description": "The host have been updated successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseResponseV3ListCP" } } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/debug/internal/databases": { "get": { "summary": "V3. Debug Get Logical Databases", "description": "Retrieves Logical Database instances in near-tabular form.\nOperation supports filters in \u0027filter\u0027 query parameter in style of RESTful Service Query Language (RSQL).", "tags": [ "Controller for debug operations" ], "parameters": [ { "description": "This parameter specifies custom RESTful Service Query Language (RSQL) query to apply filtering.", "name": "filter", "in": "query", "schema": { "type": "string" } } ], "responses": { "500": { "description": "An error occurred during getting response" }, "400": { "description": "Incorrect RSQL query in \u0027filter\u0027 query parameter" }, "200": { "description": "Successfully retrieved list of debug logical databases", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DebugLogicalDatabaseV3" } } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/debug/internal/dump": { "get": { "summary": "V3. Get Dump", "description": "Retrieves a dump of DBaaS database information, including logical databases, physical databases, declarative configurations, Blue-Green domains and balancing rules.\nBy default, response body is returned as compressed zip file with json file inside.\nHowever, it is possible to get response body in JSON format instead of file.", "tags": [ "Controller for debug operations" ], "responses": { "500": { "description": "An error occurred during getting dump" }, "200": { "description": "Successfully retrieved dump", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DumpResponseV3" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/DumpResponseV3" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/debug/internal/ghost": { "get": { "summary": "V3. Get ghost databases", "description": "Returns list of ghost databases (databases that exist in adapter, but not registered in DBaaS)", "tags": [ "Controller for debug operations" ], "responses": { "500": { "description": "Internal error" }, "200": { "description": "List of ghost databases", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GhostDatabasesResponse" } } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/debug/internal/info": { "get": { "summary": "V3. Get overall status", "description": "Get DBaaS overall status", "tags": [ "Controller for debug operations" ], "responses": { "500": { "description": "An error occurred during getting overall status" }, "200": { "description": "Successfully retrieved status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OverallStatusResponse" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/debug/internal/lost": { "get": { "summary": "V3. Get lost databases", "description": "Returns list of lost databases (databases that are registered in DBaaS but do not exist in the adapter)", "tags": [ "Controller for debug operations" ], "responses": { "500": { "description": "Internal error" }, "200": { "description": "List of lost databases", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseResponseV3ListCP" } } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/migration/databases": { "put": { "summary": "V3. Register databases", "description": "This API allows you to register the database in DBaaS. The registered database would not be created, and it is assumed that it already exists in the cluster The purpose for this API is to register databases which weren not created through DBaaS. If registered database already exist in DBaaS then it will not be added.", "tags": [ "Migration controller" ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RegisterDatabaseRequestV3" } } } }, "required": true }, "responses": { "200": { "description": "Migration completed", "content": { "application/json": { "schema": { "type": "string" } } } }, "500": { "description": "Internal error during migration", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "MIGRATION_CLIENT" ] } ] } }, "/api/v3/dbaas/migration/databases/with-user-creation": { "put": { "summary": "V3. Register databases with user creation", "description": "This API allows you to register the database in DBaaS with user creation. It can be useful when username and password is unknown and you want you database to dbaas registry. Previous users will not be unbind, so in point of security you should unbind user them by yourself.The registered database would not be created, and it is assumed that it already exists in the cluster The purpose for this API is to register databases which were not created through DBaaS. If registered database already exist in DBaaS then it will not be added.", "tags": [ "Migration controller" ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RegisterDatabaseWithUserCreationRequest" } } } }, "required": true }, "responses": { "200": { "description": "Migration completed. Response is a map where key is database type and value is MigrationResult", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MigrationResult" } } } }, "409": { "description": "There are some conflicts detected during migration. Response is a map where key is database type and value is MigrationResult", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MigrationResult" } } } }, "500": { "description": "Internal error during migration. Response is a map where key is database type and value is MigrationResult", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MigrationResult" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "MIGRATION_CLIENT", "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/namespaces/{namespace}/databases/link": { "post": { "summary": "V3. Link databases for the requested microservices to target namespace", "description": "Create additional classifiers for required databases in the target namespace, if there is no such classifiers.", "tags": [ "Database operation controller v3" ], "parameters": [ { "description": "Project namespace in which the databases are used", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LinkDatabasesRequest" } } }, "required": true }, "responses": { "200": { "description": "All databases for requested microservices were linked to target namespace", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DatabaseResponseV3ListCP" } } } } }, "400": { "description": "Request does not pass validation. Maybe some required fields are empty", "content": { "application/json": { "schema": { "type": "string" } } } }, "500": { "description": "Some error during databases linking", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DBAAS_DB_EDITOR" ] } ] } }, "/api/v3/dbaas/namespaces/{namespace}/databases/recreate": { "post": { "summary": "V3. Recreate database with existing classifier. Prohibited for Blue-Green", "description": "Recreate existing database with same classifier in the same physicalDb or in another. The API can be useful if you want to migrate associated with microservice logical db to another physical database. So, DBaaS creates a new empty database. After it, you will get a new connection and can perform a migration.Pay attention, each request will produce a new database even if the database was previously recreated. So, if your response contains unsuccessful databases you must leave only these databases in the request. Otherwise successful databases will be recreated again. The previous database is not deleted but is marked as archived.", "tags": [ "Database operation controller v3" ], "parameters": [ { "description": "namespace where microservices live that associated with these databases", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RecreateDatabaseRequest" } } } }, "required": true }, "responses": { "200": { "description": "All requested databases were recreated. There are no unsuccessful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecreateDatabaseResponse" } } } }, "500": { "description": "Some requested databases were not recreated. There are unsuccessful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecreateDatabaseResponse" } } } }, "400": { "description": "Request does not pass validation. Maybe passed physical databases id is unregistered or logical database with requested classifier has not been created before.", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DBAAS_DB_EDITOR" ] } ] } }, "/api/v3/dbaas/namespaces/{namespace}/databases/update-classifier/{type}": { "put": { "summary": "V3. Update existing database classifier", "description": "The API allows to update existing database classifier", "tags": [ "Database operation controller v3" ], "parameters": [ { "description": "Project namespace in which the databases are used", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } }, { "description": "Type of physical database where database was created, e.g. mongodb, postgresql", "required": true, "name": "type", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateClassifierRequestV3" } } }, "required": true }, "responses": { "400": { "description": "\"from\" or \"to\" classifiers must not be empty", "content": { "application/json": { "schema": { "type": "string" } } } }, "406": { "description": "\"from\" or \"to\" classifiers contain namespace different from in the path", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Requested role is not allowed", "content": { "application/json": { "schema": { "type": "string" } } } }, "409": { "description": "There is a database with provided \"to\" classifier or ", "content": { "application/json": { "schema": { "type": "string" } } } }, "404": { "description": "There is no database with provided \"from\" classifier", "content": { "application/json": { "schema": { "type": "string" } } } }, "200": { "description": "The database classifier was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Database" } } } }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DBAAS_DB_EDITOR", "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/namespaces/{namespace}/databases/update-connection/{type}": { "put": { "summary": "V3. Update existing database connection properties", "description": "The API allows to update existing database connection properties", "tags": [ "Database operation controller v3" ], "parameters": [ { "description": "Project namespace in which the databases are used", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } }, { "description": "Type of physical database where database was created, e.g. mongodb, postgresql", "required": true, "name": "type", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateConnectionPropertiesRequest" } } }, "required": true }, "responses": { "400": { "description": "Validation error", "content": { "application/json": { "examples": { "MissingClassifierOrProperties": { "value": "\"Database classifier or new connection properties must not be nil\"" }, "MissingRoleKey": { "value": "\"New connection properties must contain key \u0027role\u0027\"" }, "EncryptedPasswordAsPlaintext": { "value": "\"Connection properties containing encryptedPassword must be stored in encrypted form, not as plaintext\"" }, "NamespaceMismatch": { "value": "\"The classifier contains a namespace that differs from the one in the path\"" } }, "schema": { "type": "string" } } } }, "404": { "description": "Not found", "content": { "application/json": { "examples": { "NoSuchDatabase": { "value": "\"there is no existing database with such type and classifier\"" }, "NoConnectionPropertiesForRole": { "value": "\"Database with classifier does not contain connection properties for role\"" } }, "schema": { "type": "string" } } } }, "200": { "description": "Database connection properties were updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Database" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DBAAS_DB_EDITOR" ] } ] } }, "/api/v3/dbaas/namespaces/{namespace}/password-changes": { "post": { "summary": "V3. Change user password", "description": "The API changes password of a user that is related to the specified database. A password will be changed to a random value.If classifier is not passed then all passwords of databases in the namespace and type will be changed.", "tags": [ "Database operation controller v3" ], "parameters": [ { "description": "Project namespace in which the databases are used", "name": "namespace", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PasswordChangeRequestV3" } } }, "required": true }, "responses": { "401": { "description": "Requested role is not allowed", "content": { "application/json": { "schema": { "type": "string" } } } }, "200": { "description": "The passwords have been changed successfully. If errors will occur during the password changes, then the errors are aggregated and returned with maximum error status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PasswordChangeResponse" } } } }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/namespaces/{namespace}/services/{serviceName}/access-grants": { "get": { "summary": "V3. Get actual access grants for microservice databases", "description": "The API allows to get actual access grants of microservice databases.", "tags": [ "Microservice controller v3" ], "parameters": [ { "description": "Project namespace in which the databases are used", "name": "namespace", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Microservice name", "name": "serviceName", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Access grants were successfully found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccessGrantsResponse" } } } }, "404": { "description": "Access grants for service\u0027s databases was not founded", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/users": { "put": { "summary": "V3. Get or create user", "description": "The API allows to get or create specific user for database.", "tags": [ "Database users controller v3" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOrCreateUserRequest" } } }, "required": true }, "responses": { "200": { "description": "User is already created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOrCreateUserResponse" } } } }, "201": { "description": "New user is created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOrCreateUserResponse" } } } }, "202": { "description": "Operation in progress", "content": { "application/json": { "schema": { "type": "string" } } } }, "404": { "description": "Error", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] }, "delete": { "summary": "V3. Delete user", "description": "The API allows to delete specific user for database.", "tags": [ "Database users controller v3" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserOperationRequest" } } }, "required": true }, "responses": { "200": { "description": "User is successfully deleted", "content": { "application/json": { "schema": { "type": "string" } } } }, "204": { "description": "User is not found", "content": { "application/json": { "schema": { "type": "string" } } } }, "404": { "description": "Error", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/users/restore": { "post": { "summary": "V3. Restore users", "description": "The API allows to restore users for database. If role field is passed, then only users with this role will be processed.", "tags": [ "Database users controller v3" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RestoreUsersRequest" } } }, "required": true }, "responses": { "200": { "description": "Users recreated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessfulRestoreUsersResponse" } } } }, "500": { "description": "Error during restore", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RestoreUsersResponse" } } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/users/rotate-password": { "post": { "summary": "V3. Rotate user password.", "description": "The API allows to rotate password for specific user.", "tags": [ "Database users controller v3" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserOperationRequest" } } }, "required": true }, "responses": { "200": { "description": "Password was successfully reset.", "content": { "application/json": { "schema": { "type": "string" } } } }, "404": { "description": "Error", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/backups": { "get": { "summary": "V3. Get all backups of namespace", "description": "Lists all backups prepared for specified namespace", "tags": [ "Backups administration" ], "parameters": [ { "name": "namespace", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully returned backups.", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/v3/dbaas/{namespace}/backups/collect": { "post": { "summary": "V3. Backup namespace", "description": "Start backup collection process for specified namespace", "tags": [ "Backups administration" ], "parameters": [ { "description": "Namespace of the database needs to be saved", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } }, { "description": "Allows to disable eviction on adapters for current backup", "name": "allowEviction", "in": "query", "schema": { "type": "boolean", "default": "true" } }, { "description": "The parameter enables(by default)/disables validating of DBaaS adapters on the supported backup procedure", "name": "ignoreNotBackupableDatabases", "in": "query", "schema": { "type": "boolean", "default": "false" } } ], "responses": { "202": { "description": "Backup of namespace databases started, return backup id to track status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UUID" } } } }, "201": { "description": "Backup successfully collected", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NamespaceBackup" } } } }, "501": { "description": "Some backup adapters do not support backup operation", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/v3/dbaas/{namespace}/backups/{backupId}": { "get": { "summary": "V3. Get backup info", "description": "Returns backup info", "tags": [ "Backups administration" ], "parameters": [ { "description": "Identifier of backup", "required": true, "name": "backupId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } }, { "description": "Namespace where backup was made", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "responses": { "404": { "description": "Selected backup not found" }, "200": { "description": "Backup info was successfully collected", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NamespaceBackup" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] }, "delete": { "summary": "V3. Delete backup", "description": "Start delete backup process for specified namespace", "tags": [ "Backups administration" ], "parameters": [ { "description": "Identifier of backup needs to be deleted ", "required": true, "name": "backupId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } }, { "description": "Namespace of the database backup", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Backup successfully deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NamespaceBackupDeletion" } } } }, "403": { "description": "Backup deletion is forbidden", "content": { "application/json": { "schema": { "type": "string" } } } }, "404": { "description": "Backup is not found", "content": { "application/json": { "schema": { "type": "string" } } } }, "500": { "description": "The following backup can not be deleted", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Not Authorized" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] }, "put": { "summary": "V3. Add new backup info", "description": "Adds new backup info to specified backup id", "tags": [ "Backups administration" ], "parameters": [ { "description": "Identifier of backup process", "required": true, "name": "backupId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } }, { "description": "Namespace of databases in backup time", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NamespaceBackupDTO" } } }, "required": true }, "responses": { "200": { "description": "Information was added successfully", "content": { "application/json": { "schema": {} } } }, "403": { "description": "Backup namespace and specified namespace are different" }, "401": { "description": "Not Authorized" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/v3/dbaas/{namespace}/backups/{backupId}/restorations/{restorationId}": { "get": { "summary": "V3. Get restoration info", "description": "Returns restoration info", "tags": [ "Backups administration" ], "parameters": [ { "description": "Identifier of backup process", "required": true, "name": "backupId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } }, { "description": "Namespace where backup was made", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } }, { "description": "Identifier of restore process", "required": true, "name": "restorationId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } } ], "responses": { "404": { "description": "Selected backup or restoration not found" }, "200": { "description": "Restoration info was successfully collected", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NamespaceBackup" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/v3/dbaas/{namespace}/backups/{backupId}/validate": { "get": { "summary": "V3. Validate backup", "description": "Validates backup of the specified namespace", "tags": [ "Backups administration" ], "parameters": [ { "description": "Identifier of backup", "required": true, "name": "backupId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } }, { "description": "Namespace where backup was made", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "responses": { "500": { "description": "Selected backup cannot be restored, probably it had been removed or failed to be collected" }, "404": { "description": "Selected backup not found" }, "200": { "description": "Backup is validated and can be restored", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/v3/dbaas/{namespace}/backups/{backupId}/{parameter}": { "post": { "summary": "V3. Restore namespace", "description": "Restores database within the initial namespace which was used during backup or to another namespace", "tags": [ "Backups administration" ], "parameters": [ { "description": "Backup identifier", "required": true, "name": "backupId", "in": "path", "schema": { "$ref": "#/components/schemas/UUID" } }, { "description": "This parameter specifies namespace where backup was made", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } }, { "description": "This parameter specifies namespace for restoring to another project. This parameter is needed if backup and restore projects are different.", "name": "targetNamespace", "in": "query", "schema": { "type": "string" } } ], "responses": { "202": { "description": "Namespace restoration started, return backup id to track status" }, "400": { "description": "Selected backup cannot be restored" }, "404": { "description": "Selected backup not found" }, "200": { "description": "Backup successfully restored", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "BACKUP_MANAGER" ] } ] } }, "/api/v3/dbaas/{namespace}/databases": { "put": { "summary": "V3. Creates new database V3", "description": "Creates new database and returns it with connection information, or returns the already created database if it exists. This version differs from version v1 in that there is the additional require field \"dbOwner\", which should contain name of database owner. It can be for exammple microserviceName value.", "tags": [ "Controller Database administration" ], "parameters": [ { "description": "Namespace where database will be placed", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } }, { "description": "Determines if database should be created asynchronously", "name": "async", "in": "query", "schema": { "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseCreateRequestV3" } } }, "required": true }, "responses": { "403": { "description": "You cannot access databases in this namespace", "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "description": "There is no appropriate adapter for the specified database type", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Requested role is not allowed", "content": { "application/json": { "schema": { "type": "string" } } } }, "201": { "description": "Database created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Database" } } } }, "200": { "description": "Already having such database", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Database" } } } }, "202": { "description": "Database is in process of creation" }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/databases/get-by-classifier/{type}": { "post": { "summary": "V3. Get database by classifier", "description": "Returns connection to an already created database using classifier to search", "tags": [ "Controller Database administration" ], "parameters": [ { "name": "namespace", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "The type of base in which the database was created. For example PostgreSQL or MongoDB", "required": true, "name": "type", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClassifierWithRolesRequest" } } }, "required": true }, "responses": { "404": { "description": "Cannot find database with such classifier", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Requested role is not allowed", "content": { "application/json": { "schema": { "type": "string" } } } }, "200": { "description": "Successfully found database", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Database" } } } } }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT", "DISCR_TOOL_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/databases/list": { "get": { "summary": "V3. List of all databases", "description": "Returns the list of all databases.", "tags": [ "Controller Database administration" ], "parameters": [ { "description": "Project namespace in which the databases is used", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } }, { "description": "Parameter for adding database resources to response", "required": true, "name": "withResources", "in": "query", "schema": { "type": "boolean", "default": "false" } } ], "responses": { "500": { "description": "Internal error" }, "200": { "description": "List of databases in namespace", "content": { "application/json": { "schema": { "type": "array" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT", "DISCR_TOOL_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/databases/registration/externally_manageable": { "put": { "summary": "V3. External database registration", "description": "This API supports registration in DBaaS for any external logical database.", "tags": [ "Controller Database administration" ], "parameters": [ { "description": "Namespace with which new database will be connected", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalDatabaseRequestV3" } } }, "required": true }, "responses": { "200": { "description": "Successfully found database", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Database" } } } }, "201": { "description": "The database was added or updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Database" } } } }, "400": { "description": "The request was invalid or cannot be served", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "401": { "description": "Authentication is required and has failed or has not been provided" }, "403": { "description": "The request was valid, but the server is refusing action" }, "409": { "description": "Logical database with such classifier and type already exist in namespace and it is internal logical database", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } }, "500": { "description": "Internal error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TmfErrorResponse" } } } } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/databases/statuses": { "get": { "summary": "V3. Deprecated. Get list of ghosts and lost databases", "description": "Databases may get lost if they were marked to delete but were not actually deleted. An existing database stays as a ghost if it was not registered in DBaaS.", "deprecated": true, "tags": [ "Controller Database administration" ], "parameters": [ { "description": "Namespace for which to get the database statuses", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "responses": { "500": { "description": "Internal error" }, "200": { "description": "List of ghosts and lost databases", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabasesInfo" } } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/databases/{type}": { "delete": { "summary": " V3.Delete database by classifier", "description": "Deletes database by id in the specific namespace. If the optional \u0027force\u0027 parameter is set to true, errors from the physical adapter during drop are ignored and the database is removed from DBaaS regardless. Warning: using force\u003dtrue may result in the logical database leaking in the physical database.", "tags": [ "Controller Database administration" ], "parameters": [ { "description": "Project namespace in which the base is used", "name": "namespace", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "The physical type of logical database. For example mongodb or postgresql", "required": true, "name": "type", "in": "path", "schema": { "type": "string" } }, { "description": "If true, errors from the physical adapter during drop are ignored", "name": "force", "in": "query", "schema": { "type": "boolean", "default": "false" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClassifierWithRolesRequest" } } }, "required": true }, "responses": { "200": { "description": "Successfully deleted database.", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Requested role is not allowed", "content": { "application/json": { "schema": { "type": "string" } } } }, "404": { "description": "Cannot find database with such classifier", "content": { "application/json": { "schema": { "type": "string" } } } }, "403": { "description": "You cannot access databases in this namespace", "content": { "application/json": { "schema": { "type": "string" } } } }, "406": { "description": "Dbaas is working in PROD mode. Deleting logical databases is prohibited", "content": { "application/json": { "schema": { "type": "string" } } } } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/physical_databases/balancing/rules/{ruleName}": { "delete": { "summary": "V3. Delete on namespace physDb balancing rule", "description": "Deletes a namespace balancing rule by name. The rule is deleted only if it belongs to the requested namespace.", "tags": [ "Balancing Rules Administration V3" ], "parameters": [ { "description": "Namespace where the rule is placed", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } }, { "description": "Name of the rule used as an identifier", "required": true, "name": "ruleName", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Rule deleted" }, "404": { "description": "Rule not found in the requested namespace" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] }, "put": { "summary": "V3. On namespace physDb balancing rule", "description": "There are no changes in comparison with version 1. Auto balancing rules allows configure behavior of DBaaS when a physical database of some specific type is choosen for new logical database. This rule currently works for new databases only, no migration of logical databases between physical databases is supported yet.", "tags": [ "Balancing Rules Administration V3" ], "parameters": [ { "description": "Namespace where the rule will be placed, each rule must have a namespace. Rules works only on logical databases created in the same namespace where they have been created.", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } }, { "description": "Name of the rule used as an identifier", "required": true, "name": "ruleName", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RuleRegistrationRequest" } } }, "required": true }, "responses": { "409": { "description": "Cannot create two different rules for same type with same order" }, "201": { "description": "New rule created" }, "200": { "description": "Existing rule changed", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/physical_databases/rules/debug": { "post": { "summary": "Debug for microservices\u0027 balancing rules.", "description": "This API receives JSON-configs with rules and list of microservices to check and returns in response a mapping what physical database is going to be assigned to each microservice from the request based on the balancing rules from the request and the existing rules in DBaaS. Response will also contain a list of labels for the assigned physical database to help analyze which rule was applied.", "tags": [ "Balancing Rules Administration V3" ], "parameters": [ { "description": "Namespace where the rule is expected to be placed, each rule must have a namespace. Rules works only on logical databases created in the same namespace where they have been created.", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DebugRulesRequest" } } }, "required": true }, "responses": { "200": { "description": "Return result of rules evaluation", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Error happened when processing rules" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" }, "400": { "description": "Bad Request" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/physical_databases/rules/onMicroservices": { "get": { "summary": "V3. Get on microservice physical database balancing rules.", "description": "Allows getting physical database balancing rules for microservices.", "tags": [ "Balancing Rules Administration V3" ], "parameters": [ { "description": "Namespace where the rule is placed, each rule has a namespace.\nRules works only on logical databases created in the same namespace where they have been created.", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Gotten on microservice physical database balancing rules", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Unknown error which may be related with internal work of DBaaS." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] }, "put": { "summary": "V3. On microservice physDb balancing rule.", "description": "Allows adding balancing rules for microservices. Balancing rules are intended to define in which physical database new logical database should be created. This API allows adding such rules for each microservice, or for group of microservices separately. \n *WARNING! Rules can be overridden. Rule\u0027s integrity and validity is the responsibility of project(applies) side.* \n It means that rule doesn\u0027t merge and there can be only one version of rule. If you change configuration of previous rule and send it, then logical databases will be created by the new changed rule. Therefore, be careful before deleting or modifying the rule.", "tags": [ "Balancing Rules Administration V3" ], "parameters": [ { "description": "Namespace where the rule will be placed, each rule must have a namespace. Rules works only on logical databases created in the same namespace where they have been created.", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OnMicroserviceRuleRequest" } } } }, "required": true }, "responses": { "201": { "description": "New rule created" }, "400": { "description": "Received request with wrong body" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{namespace}/physical_databases/rules/onMicroservices/validation": { "put": { "summary": "Validation for microservices\u0027 balancing rules.", "description": "This API receives JSON-configs with rules for microservices and returns in response mapping label to physical db (whether all mentioned lables exist), indicates errors if any. Response also contains information about default physical databases for each db type.", "tags": [ "Balancing Rules Administration V3" ], "parameters": [ { "description": "Namespace where the rule is expected to be placed, each rule must have a namespace. Rules works only on logical databases created in the same namespace where they have been created.", "required": true, "name": "namespace", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OnMicroserviceRuleRequest" } } } }, "required": true }, "responses": { "200": { "description": "Schema is valid", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Schema is not valid" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{type}/physical_databases": { "get": { "summary": "V3. List registered physical databases", "description": "Returns the list of registered physical databases by database type", "tags": [ "Physical databases registration controller" ], "parameters": [ { "description": "Type of database, for example: MongoDB, PostgreSQL, elasticsearch, etc. or all - to list all registered physical databases", "required": true, "name": "type", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Registered physical databases by specific type were found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisteredPhysicalDatabasesDTO" } } } }, "404": { "description": "Registered physical databases by specific type were not found." }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{type}/physical_databases/{phydbid}": { "put": { "summary": "V3. Register new physical database", "description": "Creates new physical database and returns path to it with physical database identifier.", "tags": [ "Physical databases registration controller" ], "parameters": [ { "description": "Physical database identifier. The value belongs to the specific database cluster", "required": true, "name": "phydbid", "in": "path", "schema": { "type": "string" } }, { "description": "Type of database. Example: MongoDB, PostgreSQL, elasticsearch, etc.", "required": true, "name": "type", "in": "path", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhysicalDatabaseRegistryRequestV3" } } }, "required": true }, "responses": { "201": { "description": "Database created", "content": { "application/json": { "schema": { "type": "string" } } } }, "200": { "description": "Updated existing database", "content": { "application/json": { "schema": { "type": "string" } } } }, "202": { "description": "Adapter should continue to create roles for new portions", "content": { "application/json": { "schema": { "type": "string" } } } }, "409": { "description": "Database could not be registered as physical database already exists with another adapter id or the same adapter already exists and it is used with other physical database" }, "502": { "description": "Adapter is not available during handshake process" }, "400": { "description": "Adapter already running or request validation failed" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] }, "delete": { "summary": "V3. Delete physical database", "description": "Deletes physical database by database type and physical database id", "tags": [ "Physical databases registration controller" ], "parameters": [ { "description": "Physical database identifier. The value belongs to the specific database cluster", "required": true, "name": "phydbid", "in": "path", "schema": { "type": "string" } }, { "description": "Type of database, for example: MongoDB, PostgreSQL, elasticsearch, etc.", "required": true, "name": "type", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully deleted physical databases.", "content": { "application/json": { "schema": {} } } }, "406": { "description": "Database is marked as default or there are connected logical databases." }, "404": { "description": "Physical database with specific type and id was not found." }, "400": { "description": "The request was invalid or cannot be served" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } }, "/api/v3/dbaas/{type}/physical_databases/{phydbid}/global": { "put": { "summary": "V3. Change default physical database", "description": "Moves the \u0027global\u0027 flag to the specified existing physical database", "tags": [ "Physical databases registration controller" ], "parameters": [ { "description": "Physical database identifier. The value belongs to the specific database cluster", "required": true, "name": "phydbid", "in": "path", "schema": { "type": "string" } }, { "description": "Type of database. Example: MongoDB, PostgreSQL, elasticsearch, etc.", "required": true, "name": "type", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Updated existing physical database", "content": { "application/json": { "schema": {} } } }, "404": { "description": "Specified physical database does not registered" }, "401": { "description": "Not Authorized" }, "403": { "description": "Not Allowed" } }, "security": [ { "SecurityScheme": [ "DB_CLIENT" ] } ] } } }, "info": { "title": "DBaaS Aggregator API", "version": "6.13.2", "description": "This documentation presents the REST API for the \"Database as a Service\" (DBaaS) component. DBaaS acts as an aggregator for all adapters. It is designed to collect requests for managed databases and route them to the appropriate adapter. DBaaS stores information about all databases used in a cloud project. These databases are isolated by namespace. DBaaS uses a Classifier to identify databases within a cloud namespace. The Classifier includes service-related information such as scope, microservice name, tenant ID, and namespace." } }