GET
/
v1
/
workspaces
/
{workspace}
/
databases
{
  "databases": [
    {
      "name": "<string>",
      "state": "STATE_UNSPECIFIED",
      "successfulSyncTime": "2023-11-07T05:31:56Z",
      "project": "<string>",
      "schemaVersion": "<string>",
      "environment": "<string>",
      "effectiveEnvironment": "<string>",
      "labels": {},
      "instanceResource": {
        "title": "<string>",
        "engine": "ENGINE_UNSPECIFIED",
        "engineVersion": "<string>",
        "dataSources": [
          {
            "id": "<string>",
            "type": "DATA_SOURCE_UNSPECIFIED",
            "username": "<string>",
            "password": "<string>",
            "obfuscatedPassword": "<string>",
            "useSsl": true,
            "sslCa": "<string>",
            "obfuscatedSslCa": "<string>",
            "sslCert": "<string>",
            "obfuscatedSslCert": "<string>",
            "sslKey": "<string>",
            "obfuscatedSslKey": "<string>",
            "host": "<string>",
            "port": "<string>",
            "database": "<string>",
            "srv": true,
            "authenticationDatabase": "<string>",
            "replicaSet": "<string>",
            "sid": "<string>",
            "serviceName": "<string>",
            "sshHost": "<string>",
            "sshPort": "<string>",
            "sshUser": "<string>",
            "sshPassword": "<string>",
            "obfuscatedSshPassword": "<string>",
            "sshPrivateKey": "<string>",
            "obfuscatedSshPrivateKey": "<string>",
            "authenticationPrivateKey": "<string>",
            "obfuscatedAuthenticationPrivateKey": "<string>",
            "externalSecret": {
              "secretType": "SAECRET_TYPE_UNSPECIFIED",
              "url": "<string>",
              "authType": "AUTH_TYPE_UNSPECIFIED",
              "appRole": {
                "type": "SECRET_TYPE_UNSPECIFIED",
                "mountPath": "<string>"
              },
              "token": "<string>",
              "engineName": "<string>",
              "secretName": "<string>",
              "passwordKeyName": "<string>"
            },
            "authenticationType": "AUTHENTICATION_UNSPECIFIED",
            "clientSecretCredential": {
              "tenantId": "<string>",
              "clientId": "<string>",
              "clientSecret": "<string>"
            },
            "saslConfig": {
              "krbConfig": {
                "primary": "<string>",
                "instance": "<string>",
                "realm": "<string>",
                "keytab": "<string>",
                "kdcHost": "<string>",
                "kdcPort": "<string>",
                "kdcTransportProtocol": "<string>"
              }
            },
            "additionalAddresses": [
              {
                "host": "<string>",
                "port": "<string>"
              }
            ],
            "directConnection": true,
            "region": "<string>",
            "warehouseId": "<string>",
            "masterName": "<string>",
            "masterUsername": "<string>",
            "masterPassword": "<string>",
            "obfuscatedMasterPassword": "<string>",
            "redisType": "REDIS_TYPE_UNSPECIFIED",
            "cluster": "<string>",
            "extraConnectionParameters": {}
          }
        ],
        "activation": true,
        "name": "<string>",
        "environment": "<string>"
      },
      "backupAvailable": true,
      "drifted": true
    }
  ],
  "nextPageToken": "<string>"
}

Path Parameters

workspace
string
required

The workspace id.

Query Parameters

pageSize
integer

The maximum number of databases to return. The service may return fewer than this value. If unspecified, at most 10 databases will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken
string

A page token, received from a previous ListDatabases call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListDatabases must match the call that provided the page token.

filter
string

Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec

Supported filter:

  • environment: the environment full name in "environments/{id}" format, support "==" operator.
  • name: the database name, support ".matches()" operator.
  • project: the project full name in "projects/{id}" format, support "==" operator.
  • instance: the instance full name in "instances/{id}" format, support "==" operator.
  • engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
  • label: the database label in "{key}:{value1},{value2}" format. Support "==" operator.
  • exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
  • drifted: should be "true" or "false", show drifted databases if it's true, support "==" operator.

For example: environment == "environments/{environment resource id}" project == "projects/{project resource id}" instance == "instances/{instance resource id}" name.matches("database name") engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) label == "region:asia" label == "tenant:asia,europe" label == "region:asia" && label == "tenant:bytebase" exclude_unassigned == true drifted == true You can combine filter conditions like: environment == "environments/prod" && name.matches("employee")

showDeleted
boolean

Show deleted database if specified.

Response

200
application/json

OK

The response is of type object.