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

Consent to ingestion of one inspected image into one ordinary asset group

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

PUT /v1/media/image-ingestions/{id}

Requires the original source API key and current workspace policy. Repeating identical unexpired consent is idempotent; consent cannot be renewed or retargeted. The dispatch_available flag requires retained unexpired source bytes, unrevoked unclaimed consent, configured source origin and encryption; it is not an admission guarantee. Erasing the source disables dispatch without rewriting consent or accepted history. This endpoint neither claims nor dispatches an upload. Dispatch requires a configured public HTTPS source origin and separate admission checks.

Operation: prepareImageIngestionConsent.

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

JSON
[
{
"bearerAuth": []
},
{
"niuApiKeyAuth": []
}
]

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.

Authentication alternative: bearerAuth.

Shell
curl --fail-with-body -X PUT "$NIU_ORIGIN/v1/media/image-ingestions/{id}" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN" \
-H 'Content-Type: application/json' \
--data @request.json

Authentication alternative: niuApiKeyAuth.

Shell
curl --fail-with-body -X PUT "$NIU_ORIGIN/v1/media/image-ingestions/{id}" \
-H "X-Niu-API-Key: $NIU_API_KEY" \
-H 'Content-Type: application/json' \
--data @request.json

Location: path. Required.

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

Required.

JSON
{
"type": "object",
"additionalProperties": false,
"required": [
"source_id",
"group_intent_id",
"authorization_id",
"valid_for_seconds",
"confirm_ingestion"
],
"properties": {
"source_id": {
"type": "string",
"format": "uuid"
},
"group_intent_id": {
"type": "string",
"format": "uuid"
},
"authorization_id": {
"type": "string",
"format": "uuid"
},
"valid_for_seconds": {
"type": "integer",
"minimum": 1,
"maximum": 900
},
"confirm_ingestion": {
"type": "boolean",
"const": true
}
}
}

Identical active consent already exists

Consent saved; returns data with consent_id, expires_at, status, consent_revoked and dispatch_available

Invalid or unconfirmed consent

Active API key required

Current workspace policy required

Source, destination or reviewed authorization unavailable; consent conflict

Requires the original source API key and current workspace policy. Repeating identical unexpired consent is idempotent; consent cannot be renewed or retargeted. The dispatch_available flag requires retained unexpired source bytes, unrevoked unclaimed consent, configured source origin and encryption; it is not an admission guarantee. Erasing the source disables dispatch without rewriting consent or accepted history. This endpoint neither claims nor dispatches an upload. Dispatch requires a configured public HTTPS source origin and separate admission checks.