Skip to content

Idempotency Key In Progress

URI: https://docs.ankatech.co/errors/idempotency-key-in-progress
HTTP Status: 409 Conflict

When you see this

A request was retried with the same Idempotency-Key and the same body while the first request with that key is still running. The Admin API records the first request before it starts work, so a retry never starts a second run; it is refused until the first one finishes. Nothing was executed by this request and no audit row was written.

Today the header is required by one operation: POST /api/v3/admin/tenants/{tenantId}/compliance-remediation/{packId}/actions/{actionKey}/executions. A run there processes its keys one at a time, so a run over many keys can outlast a client's or a proxy's read timeout. The status follows the IETF Idempotency-Key HTTP header draft (draft 07, §2.7). See Compliance Remediation Plans — retrying safely.

Common Causes

  • A client timed out waiting for the first response and retried immediately.
  • The same confirmation was sent twice in parallel.

Response Example

{
  "type": "https://docs.ankatech.co/errors/idempotency-key-in-progress",
  "title": "Idempotency Key In Progress",
  "status": 409,
  "detail": "The execution with this Idempotency-Key is still running; retry the same request later to read its result.",
  "instance": "/api/v3/admin/tenants/6f1b2c4e-8a3d-4f7e-9c21-5b0d7e9a1f34/compliance-remediation/NSA_CNSA_2_0/actions/CNSA.ADMIT.GENERAL/executions",
  "extensions": {
    "requestId": "f2a7c5e9-1b8d-4c36-9e04-6a3b0d7f1e82"
  }
}

Content-Type: application/problem+json — the response follows RFC 9457 Problem Details.

How to Resolve

  1. Wait, then retry with the same key and body. Once the first run has finished, the retry answers 200 with its stored execution.
  2. A run that stopped before finishing (its deadline passed) is answered 200 with the outcomes it recorded and state: INTERRUPTED; the remaining keys are not run. Preview again to continue with a new Idempotency-Key.
  3. Do not generate a new key to get around this refusal: that starts a second run.

For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.