CatalogHealthCheckSchedule (0.1.0)

Download OpenAPI specification:

Vega Backend Catalog 健康检查计划 API。

每个 physical Catalog 对应一条健康检查计划。计划是 Catalog 的独立子资源,Catalog 详情与 列表响应不会内嵌该对象。创建 physical Catalog 时可通过 health_check_schedule 组合创建; 创建后的查询和修改使用本文件定义的独立端点。

每个外部接口都有一一对应的内部版本,路径前缀为 /api/vega-backend/in/v1,请求体与 响应结构与外部完全一致;区别仅在于鉴权方式。本文档仅描述外部接口。

获取 Catalog 健康检查计划

仅 physical Catalog 支持;需要该 Catalog 的 view_detail 权限。

Authorizations:
OAuth2
path Parameters
id
required
string

physical Catalog ID

Responses

Response samples

Content type
application/json
{
  • "catalog_id": "string",
  • "mode": "inherit",
  • "cron_expr": "string",
  • "last_run": 0,
  • "next_run": 0,
  • "creator": {
    },
  • "create_time": 0,
  • "updater": {
    },
  • "update_time": 0
}

修改 Catalog 健康检查计划

仅 physical Catalog 支持,需要该 Catalog 的 modify 权限。不支持 DELETE 或单独的启停接口: 使用 mode=inheritenableddisabled 完成全量状态切换。

必须传入 expected_update_time 进行乐观并发控制。该值应取自最近一次查询响应的 update_time;若计划已被其他请求更新,返回 409 VegaBackend.CatalogHealthCheckSchedule.UpdateConflict

Authorizations:
OAuth2
path Parameters
id
required
string

physical Catalog ID

Request Body schema: application/json
required
expected_update_time
required
integer <int64> >= 1

仅独立 PUT 使用的必填乐观锁版本,取自最近一次查询响应的 update_time

mode
required
string
Enum: "inherit" "enabled" "disabled"

inherit 使用 ConfigMap 的平台默认 Cron 并清空自定义 Cron,enabled 使用本请求的 Cron,disabled 停用。PUT 设置为 disabled 时保留已有自定义 Cron。

cron_expr
string non-empty

仅当 mode=enabled 时必填的健康检查 Cron 表达式;相邻两次执行的间隔不得短于 1 小时。PUT 的 mode=disabled 忽略该字段并保留已有自定义 Cron

Responses

Request samples

Content type
application/json
{
  • "expected_update_time": 1,
  • "mode": "inherit",
  • "cron_expr": "string"
}

Response samples

Content type
application/json
{
  • "catalog_id": "string",
  • "mode": "inherit",
  • "cron_expr": "string",
  • "last_run": 0,
  • "next_run": 0,
  • "creator": {
    },
  • "create_time": 0,
  • "updater": {
    },
  • "update_time": 0
}