Download OpenAPI specification:
APIs for Vega Backend resource-discovery tasks.
A DiscoverTask is an execution audit record created through one of three paths:
POST /catalogs/{id}/discover, documented at the end of this specification.DiscoverSchedule; see
discover-schedule.yaml.POST /resources/{id}/discover; see resource.yaml.Single-resource count_only supports table, index, and logical_view categories.
Dataset counts are computed during reads; unsupported single-resource categories
return 400 before task creation. Catalog-level count tasks skip Dataset resources
and include them in skipped_count.
queue_priority is a read-only integer computed by the server; larger values have
higher priority. The default priorities are 10 for scheduled catalog discovery,
20 for manual catalog discovery, and 30 for resource refresh. Workers dequeue tasks
strictly by priority and execute tasks for the same catalog serially.
The worker advances the state machine (pending → running → completed/failed/cancelled)
in one direction. Users cannot cancel, retry, or restart a task. The public API exposes
only list, get, and cleanup operations.
Bulk deletion follows the endpoint rules in [vega-backend/CLAUDE.md]: IDs are passed
as a comma-separated path parameter to DELETE /discover-tasks/{ids}. Parent-resource
filters use query parameters such as catalog_id, schedule_id, and resource_id;
nested list endpoints are not provided.
Returns paginated discovery tasks and supports filtering by catalog_id, resource_id, schedule_id, status, strategy, and trigger_type.
| catalog_id | string Filter by owning catalog |
| resource_id | string Filters by the Resource being refreshed. A non-empty value matches only resource-refresh tasks; catalog-discovery tasks leave this field empty. |
| schedule_id | string Filters by the owning DiscoverSchedule. Tasks with |
| status | Array of strings Items Enum: "pending" "running" "completed" "failed" "cancelled" Filters by status. Repeat this parameter for multiple values, which are combined with OR. |
| strategy | string Enum: "full_sync" "create_only" "cleanup_only" "count_only" Filters by discovery strategy. |
| trigger_type | string Enum: "manual" "scheduled" Filters by trigger type. |
| offset | integer <int64> >= 0 Default: 0 Pagination offset. Must be at least 0 and defaults to 0 |
| limit | integer <int64> [ -1 .. 1000 ] Default: 20 Page size from 1 to 1000. Use -1 to disable pagination. Defaults to 20. |
| sort | string Default: "create_time" Enum: "create_time" "start_time" "finish_time" "last_progress_time" Sort field. Results default to descending creation time. A zero timestamp is sorted as a normal database value, first in ascending order and last in descending order. |
| direction | string Default: "desc" Enum: "asc" "desc" Sort direction |
{- "entries": [
- {
- "id": "string",
- "catalog_id": "string",
- "resource_id": "string",
- "resource_name": "string",
- "catalog_name": "string",
- "schedule_id": "string",
- "strategy": "full_sync",
- "trigger_type": "manual",
- "queue_priority": 0,
- "status": "pending",
- "progress": 0,
- "start_time": 0,
- "finish_time": 0,
- "last_progress_time": 0,
- "result": {
- "catalog_id": "string",
- "new_count": 0,
- "stale_count": 0,
- "unchanged_count": 0,
- "updated_count": 0,
- "restored_count": 0,
- "failed_count": 0,
- "skipped_count": 0
}, - "creator": {
- "id": "string",
- "type": "string",
- "name": "string"
}, - "create_time": 0
}
], - "total_count": 0
}| id required | string DiscoverTask ID. DELETE accepts a comma-separated list of IDs. |
{- "id": "string",
- "catalog_id": "string",
- "resource_id": "string",
- "resource_name": "string",
- "catalog_name": "string",
- "schedule_id": "string",
- "strategy": "full_sync",
- "trigger_type": "manual",
- "queue_priority": 0,
- "status": "pending",
- "progress": 0,
- "message": "string",
- "start_time": 0,
- "finish_time": 0,
- "last_progress_time": 0,
- "result": {
- "catalog_id": "string",
- "new_count": 0,
- "stale_count": 0,
- "unchanged_count": 0,
- "updated_count": 0,
- "restored_count": 0,
- "skipped_count": 0,
- "failed_count": 0,
- "failures": [
- {
- "resource_id": "string",
- "resource_name": "string",
- "code": "source_memory_limit",
- "message": "string"
}
], - "message": "string"
}, - "creator": {
- "id": "string",
- "type": "string",
- "name": "string"
}, - "create_time": 0
}The operation is atomic: deletion starts only after every ID passes validation. If any validation fails, nothing is deleted.
Validation order:
pending or running, return 409
VegaBackend.DiscoverTask.HasRunningExecution with
{ running_ids: [...] } in error_details. This status check cannot be
bypassed because deleting a task while a worker writes it would leave orphaned
data. Wait until the task reaches completed, failed, or cancelled.ignore_missing is false, return 404
VegaBackend.DiscoverTask.NotFound with { missing_ids: [...] } in
error_details.| id required | string DiscoverTask ID. DELETE accepts a comma-separated list of IDs. |
| ignore_missing | boolean Default: false Relaxes the existence check: missing IDs are treated as already deleted and
silently skipped, while other IDs are deleted normally. This does not
bypass the |
{- "error_code": "string",
- "description": "string",
- "error_details": null,
- "metadata": { }
}Triggers resource discovery for the specified catalog. Asynchronous: the
server creates a DiscoverTask with trigger_type=manual, immediately returns its
task ID, and lets a worker perform discovery asynchronously. Poll
GET /discover-tasks/{id} with the returned ID to observe progress.
The optional body is {"strategy":"full_sync|create_only|cleanup_only|count_only"} and
defaults to full_sync. This RPC-style nested endpoint represents an action on a
catalog rather than creation of a top-level task.
Metadata discovery requires type=physical. Logical catalogs accept only count_only,
which counts their logic views with the registered view service and skips unsupported categories.
| id required | string Catalog ID |
| strategy | string Enum: "full_sync" "create_only" "cleanup_only" "count_only" |
{- "strategy": "full_sync"
}{- "id": "string"
}