Skip to main content
GET
/
v1
/
projects
/
{project}
/
databaseGroups
/
{databaseGroup}
cURL
curl --request GET \
  --url https://api.example.com/v1/projects/{project}/databaseGroups/{databaseGroup}
{
  "title": "<string>",
  "name": "<string>",
  "databaseExpr": {
    "id": "<string>",
    "constExpr": {
      "nullValue": "NULL_VALUE",
      "boolValue": true,
      "int64Value": "<string>",
      "uint64Value": "<string>",
      "doubleValue": 123,
      "stringValue": "<string>",
      "bytesValue": "<string>",
      "durationValue": "<string>",
      "timestampValue": "2023-11-07T05:31:56Z"
    },
    "identExpr": {
      "name": "<string>"
    },
    "selectExpr": {
      "operand": "<unknown>",
      "field": "<string>",
      "testOnly": true
    },
    "callExpr": {
      "target": "<unknown>",
      "function": "<string>",
      "args": "<array>"
    },
    "listExpr": {
      "elements": "<array>",
      "optionalIndices": [
        123
      ]
    },
    "structExpr": {
      "messageName": "<string>",
      "entries": [
        {
          "id": "<string>",
          "fieldKey": "<string>",
          "mapKey": "<unknown>",
          "value": "<unknown>",
          "optionalEntry": true
        }
      ]
    },
    "comprehensionExpr": {
      "iterVar": "<string>",
      "iterVar2": "<string>",
      "iterRange": "<unknown>",
      "accuVar": "<string>",
      "accuInit": "<unknown>",
      "loopCondition": "<unknown>",
      "loopStep": "<unknown>",
      "result": "<unknown>"
    }
  },
  "matchedDatabases": [
    {
      "name": "<string>"
    }
  ]
}

Path Parameters

project
string
required

The project id.

databaseGroup
string
required

The databaseGroup id.

Query Parameters

view
enum<string>

The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.

Available options:
DATABASE_GROUP_VIEW_UNSPECIFIED,
DATABASE_GROUP_VIEW_BASIC,
DATABASE_GROUP_VIEW_FULL

Response

OK

A group of databases matched by expressions.

title
string
required

The short name used in actual databases specified by users.

name
string

The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup}

databaseExpr
object

The condition that is associated with this database group. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec

Support variables: resource.environment_id: the environment resource id. Support "==", "!=", "in [XX]", "!(in [xx])" operations. resource.instance_id: the instance resource id. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations. resource.database_name: the database name. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations. resource.database_labels: the database labels. Support map access operations. All variables should join with "&&" condition.

For example: resource.environment_id == "test" && resource.database_name.startsWith("sample_") resource.database_labels["tenant"] == "tenant1"

matchedDatabases
object[]

The list of databases that match the database group condition.