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.
Authentication
Section titled “Authentication”Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.
[ { "bearerAuth": [] }, { "niuApiKeyAuth": [] }]HTTP request
Section titled “HTTP request”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.
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.jsonAuthentication alternative: niuApiKeyAuth.
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.jsonParameters
Section titled “Parameters”Location: path. Required.
{ "type": "string", "format": "uuid"}Request body
Section titled “Request body”application/json
Section titled “application/json”Required.
{ "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 } }}Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”Identical active consent already exists
HTTP 201
Section titled “HTTP 201”Consent saved; returns data with consent_id, expires_at, status, consent_revoked and dispatch_available
HTTP 400
Section titled “HTTP 400”Invalid or unconfirmed consent
HTTP 401
Section titled “HTTP 401”Active API key required
HTTP 403
Section titled “HTTP 403”Current workspace policy required
HTTP 409
Section titled “HTTP 409”Source, destination or reviewed authorization unavailable; consent conflict
Behavior and supported scope
Section titled “Behavior and supported scope”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.