POST
/
v1
/
projects
/
{project}
/
plans:search
{
  "plans": [
    {
      "name": "<string>",
      "state": "STATE_UNSPECIFIED",
      "issue": "<string>",
      "rollout": "<string>",
      "title": "<string>",
      "description": "<string>",
      "specs": [
        {
          "id": "<string>",
          "createDatabaseConfig": {
            "target": "<string>",
            "database": "<string>",
            "table": "<string>",
            "characterSet": "<string>",
            "collation": "<string>",
            "cluster": "<string>",
            "owner": "<string>",
            "environment": "<string>"
          },
          "changeDatabaseConfig": {
            "targets": [
              "<string>"
            ],
            "sheet": "<string>",
            "release": "<string>",
            "type": "TYPE_UNSPECIFIED",
            "ghostFlags": {},
            "enablePriorBackup": true
          },
          "exportDataConfig": {
            "targets": [
              "<string>"
            ],
            "sheet": "<string>",
            "format": "FORMAT_UNSPECIFIED",
            "password": "<string>"
          }
        }
      ],
      "creator": "<string>",
      "createTime": "2023-11-07T05:31:56Z",
      "updateTime": "2023-11-07T05:31:56Z",
      "planCheckRunStatusCount": {},
      "deployment": {
        "environments": [
          "<string>"
        ],
        "databaseGroupMappings": [
          {
            "databaseGroup": "<string>",
            "databases": [
              "<string>"
            ]
          }
        ]
      }
    }
  ],
  "nextPageToken": "<string>"
}

Path Parameters

project
string
required

The project id.

Body

application/json
parent
string
required

The parent, which owns this collection of plans. Format: projects/{project} Use "projects/-" to list all plans from all projects.

pageSize
integer

The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans 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 SearchPlans call. Provide this to retrieve the subsequent page.

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

filter
string

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

Supported filters:

  • creator: the plan creator full name in "users/{email or id}" format, support "==" operator.
  • create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
  • has_pipeline: the plan has pipeline or not, support "==" operator, the value should be "true" or "false".
  • has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false".
  • title: the plan title, support "==" operator for exact match and ".matches()" operator for case-insensitive substring match.
  • spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config".
  • state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".

For example: creator == "users/ed@bytebase.com" && create_time >= "2025-01-02T15:04:05Z07:00" has_pipeline == false && has_issue == true title == "My Plan" title.matches("database migration") spec_type == "change_database_config" state == "ACTIVE"

Response

OK

plans
object[]

The plans from the specified request.

nextPageToken
string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.