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

Abandon an unclaimed native operation after key expiry

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

POST /api/v1/organizations/{organization}/projects/{project}/media/operations/{id}/cancel

Current member workspace Write permission required, independent of inference-key expiry or revocation. Native operation history is workspace-shared. Exact workspace, Niu operation and immutable group model binding are checked under group-first locks. Only prepared becomes not_sent; unknown is never resolved, resent or canceled. No Provider client, calls, route reenabling or inference authority restoration. Repeated not_sent cancellation is unchanged. Original key and private account binding remain immutable.

Operation: cancelPreparedWorkspaceProviderAssetOperation.

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 POST "$NIU_ORIGIN/api/v1/organizations/{organization}/projects/{project}/media/operations/{id}/cancel" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN" \
--url-query 'model=<MODEL>'

Location: path. Required.

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

Location: path. Required.

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

Location: path. Required.

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

Location: query. Required.

JSON
{
"type": "string"
}

No request body is declared.

Preparation abandoned before claim

Response headers:

JSON
{
"Cache-Control": {
"schema": {
"type": "string"
},
"description": "no-store"
}
}

Content type: application/json.

JSON
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"const": "not_sent"
}
}
}
}
}

Invalid path or query

Invalid member session

Current workspace Write denied

Unknown, acknowledged, foreign or mismatched model preparation

Storage unavailable

Current member workspace Write permission required, independent of inference-key expiry or revocation. Native operation history is workspace-shared. Exact workspace, Niu operation and immutable group model binding are checked under group-first locks. Only prepared becomes not_sent; unknown is never resolved, resent or canceled. No Provider client, calls, route reenabling or inference authority restoration. Repeated not_sent cancellation is unchanged. Original key and private account binding remain immutable.

Supported scope: implemented