Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

List saved Video tasks across workspace keys

Generated from the checked-in source. Do not edit this reference by hand.

GET /api/v1/workspaces/{workspace}/tasks

Current dashboard workspace Read authorizes saved history even when its inference key is revoked, expired, or its model grants changed. No active key secret is needed. Actor-private session/intent tasks belonging to another actor are excluded. API-created tasks without a private association are workspace-readable. No prompt, upstream URL, asset URI, credential or procurement field is returned. This GET never dispatches, refreshes, retries or settles inference. Task pages use immutable created_at/id DESC; artifacts use immutable output created_at/task_id/kind DESC. A cursor resolves in current authorized workspace independently of mutable state filters; malformed, missing or out-of-scope cursor is 400. Changing filters starts a new live view. No partial successful empty result: storage errors return 503. Artifact reference availability is retention evidence, not a guarantee the upstream bytes still exist. Content delivery performs only bounded result retrieval, rechecking dashboard access and retention after download. Content remains explicitly refused with 409 if its original Provider account/model binding is no longer current; historical read access never restores routing or credential authority. Existing key-scoped APIs and explicit refresh authorization remain unchanged. Chat stays in typed saved sessions; only Video execution inventory is supported. The server resolves the organization from the authorized workspace. Foreign or missing workspaces return 404. The compatibility route remains supported with identical payload, owner, revision and replay semantics.

Operation: generationsInventoryTasksByWorkspace.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"bearerAuth": []
}
]

Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.

Shell
curl --fail-with-body -X GET "$NIU_ORIGIN/api/v1/workspaces/{workspace}/tasks" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN"

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: query. Optional.

JSON
{
"enum": [
"video"
]
}

Location: query. Optional.

JSON
{
"enum": [
"queued",
"running",
"succeeded",
"failed",
"unknown",
"submission_unknown",
"reconciliation_required"
]
}

Location: query. Optional.

JSON
{
"type": "string",
"format": "uuid"
}

Location: query. Optional.

JSON
{
"type": "string"
}

Location: query. Optional.

JSON
{
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25
}

No request body is declared.

Saved projection; complete true means this supported Video inventory read completed, not all task kinds.

Content type: application/json.

JSON
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"kind": {
"const": "video"
},
"model": {
"type": "string"
},
"model_display_name": {
"type": [
"string",
"null"
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"state": {
"enum": [
"queued",
"running",
"succeeded",
"failed",
"unknown",
"submission_unknown",
"reconciliation_required"
]
},
"source": {
"enum": [
"api",
"generations",
"unknown"
]
},
"session_id": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"turn_id": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"artifacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"enum": [
"video",
"last_frame"
]
},
"availability": {
"enum": [
"available",
"deleted",
"expired",
"unavailable"
]
},
"capture": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"id",
"task_id",
"kind",
"status",
"asset_id",
"availability",
"failure_code",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"task_id": {
"type": "string",
"format": "uuid"
},
"kind": {
"enum": [
"video",
"last_frame"
]
},
"status": {
"enum": [
"preparing",
"stored",
"failed"
]
},
"asset_id": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"availability": {
"enum": [
"retained",
"deleted",
"not_stored"
]
},
"failure_code": {
"enum": [
null,
"delivery_failed",
"authorization_changed",
"invalid_media",
"capacity_exceeded",
"storage_unavailable",
"encryption_unavailable"
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"availability",
"capture"
]
}
},
"execution_context": {
"type": "object",
"additionalProperties": false,
"required": [
"submitted_model",
"dispatched_model",
"provider",
"channel",
"dispatched_at",
"source",
"parameters_source",
"references_state",
"parameters"
],
"properties": {
"submitted_model": {
"type": "string"
},
"dispatched_model": {
"type": [
"string",
"null"
]
},
"provider": {
"type": [
"string",
"null"
],
"description": "Adapter recorded at dispatch; not a Provider account name."
},
"channel": {
"type": [
"string",
"null"
]
},
"dispatched_at": {
"type": "string",
"format": "date-time"
},
"source": {
"const": "saved_execution"
},
"parameters_source": {
"enum": [
"saved_validated_snapshot",
"unknown"
]
},
"references_state": {
"const": "not_in_execution_snapshot"
},
"parameters": {
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"duration": {
"type": "number"
},
"seed": {
"type": "number"
},
"frames_per_second": {
"type": "number"
},
"watermark": {
"type": "boolean"
},
"camera_fixed": {
"type": "boolean"
},
"return_last_frame": {
"type": "boolean"
},
"resolution": {
"type": "string"
},
"ratio": {
"type": "string"
},
"omni_reference_task_type": {
"type": "string"
}
}
}
}
},
"model_display_name_source": {
"enum": [
"current_catalog",
"unknown"
]
},
"reference": {
"type": "string",
"pattern": "^run-[1-9][0-9]{0,18}$",
"description": "Permanent public run reference, independent of the internal identifier."
}
},
"required": [
"id",
"kind",
"model",
"model_display_name",
"created_at",
"updated_at",
"state",
"source",
"session_id",
"turn_id",
"artifacts",
"execution_context",
"model_display_name_source"
]
}
},
"has_more": {
"type": "boolean"
},
"next_cursor": {
"type": [
"string",
"null"
]
},
"supported_kinds": {
"type": "array",
"items": {
"const": "video"
}
},
"complete": {
"const": true
}
},
"required": [
"data",
"has_more",
"next_cursor",
"supported_kinds",
"complete"
]
}

Invalid query, unsupported kind or inaccessible cursor

Session invalid or expired

Current workspace permission denied

Record missing or actor-inaccessible

Original Provider delivery binding is no longer current; metadata history remains readable.

Saved read unavailable; never presented as empty inventory

Current dashboard workspace Read authorizes saved history even when its inference key is revoked, expired, or its model grants changed. No active key secret is needed. Actor-private session/intent tasks belonging to another actor are excluded. API-created tasks without a private association are workspace-readable. No prompt, upstream URL, asset URI, credential or procurement field is returned. This GET never dispatches, refreshes, retries or settles inference. Task pages use immutable created_at/id DESC; artifacts use immutable output created_at/task_id/kind DESC. A cursor resolves in current authorized workspace independently of mutable state filters; malformed, missing or out-of-scope cursor is 400. Changing filters starts a new live view. No partial successful empty result: storage errors return 503. Artifact reference availability is retention evidence, not a guarantee the upstream bytes still exist. Content delivery performs only bounded result retrieval, rechecking dashboard access and retention after download. Content remains explicitly refused with 409 if its original Provider account/model binding is no longer current; historical read access never restores routing or credential authority. Existing key-scoped APIs and explicit refresh authorization remain unchanged. Chat stays in typed saved sessions; only Video execution inventory is supported. The server resolves the organization from the authorized workspace. Foreign or missing workspaces return 404. The compatibility route remains supported with identical payload, owner, revision and replay semantics.

Supported scope: implemented