API reference

Confirmations

Every path is under https://impartire.com/api/v1. Generated from the API’s own contract, openapi.json (OpenAPI 3.1), which you can load into any OpenAPI tool. Errors are Problems — see Conventions.

GET/api/v1/confirmations/{id}

Read a guarded action's confirmation

A guarded action asked for with an OAuth token does not run: it answers 202 with a Confirmation and a Location here, and its person confirms or declines it in impartire at confirm_url within 15 minutes. Poll this until status is executed (then result is the action's answer, or problem why it failed) or declined. Any scope; readable only by the OAuth client and person that asked for it — another token's confirmation, a malformed id, and every API key (a key acts at once, so it never has one) are 404.

Scopes: any valid credential

Parameters
  • idpath · string (uuid)required

    The confirmation's id, from the 202 that created it (also its Location).

Response 200Confirmation

A guarded action an OAuth token asked for, waiting for its person to confirm it in impartire (ADR 0081). A guarded endpoint answers 202 with this and a Location; poll it until status is executed, declined or expired.

  • idstring (uuid)required
  • status"pending" | "confirmed" | "declined" | "expired" | "executed"required

    pending: waiting for the person to confirm or decline it in impartire (at confirm_url). confirmed: they confirmed and the action is running — poll again. executed: it ran; result holds its answer, or problem why it failed. declined: they said no; it will never run. expired: nobody decided within 15 minutes; it will never run (GET /api/v1/confirmations/{id} answers 410 confirmation-expired instead of this body; the person still sees it in impartire).

  • actionstringrequired

    The guarded action, e.g. run.signal.

  • resourceobjectrequired
    • typestringrequired

      The kind of resource the action is on, e.g. run.

    • idstring (uuid) or nullrequired
    • namestringrequired

      The resource as the person was shown it when the action was asked for.

  • summarystringrequired

    The action in words, as the person reads it on the confirmation page.

  • client_idstringrequired

    The OAuth client that asked.

  • confirm_urlstringrequired

    Where the person confirms or declines it. Show it to them; the API cannot confirm.

  • created_atstring (date-time)required
  • expires_atstring (date-time)required

    15 minutes after it was asked for. A pending confirmation past it is expired.

  • decided_atstring (date-time) or nullrequired

    When the person confirmed or declined it, or when it expired; null while pending.

  • resultanyrequired

    When executed and the action succeeded: the action's answer (what the endpoint would have returned with a key). Null otherwise.

  • problemProblem or nullrequired

    When executed and the action failed: the Problem it failed with. Null otherwise.

    • typestringrequired

      A stable URL naming the problem: https://impartire.com/problems/<code>. Branch on this.

    • titlestringrequired
    • statusintegerrequired
    • detailstringrequired

      What went wrong and what to do about it, written for the caller.

    • instancestringrequired

      The request path.

    • request_idstringrequired

      Also sent as the Request-Id header. Quote it when reporting a problem.

    • errorsarray of object

      On 422 validation: one entry per invalid field.

      • pathstringrequired

        The field or parameter, as a dotted path.

      • messagestringrequired
    • edit_seqinteger

      On 412 precondition-failed: the resource's current edit_seq.

    • etagstring

      On 412 precondition-failed for a project, a collection, a playlist or a schedule slot: its current ETag.

    • item_idstring

      On 409 already-member: the existing item's id (in the collection or playlist).

    • schema_versioninteger

      On 409 type-changed: the asset type's current schema_version.

    • confirmation_idstring

      On 409 confirmation-pending: the confirmation already waiting for its person (GET /api/v1/confirmations/{id}).

    • confirm_urlstring

      On 409 confirmation-pending: where the person confirms or declines it, in impartire.

Other responses
  • 401 unauthenticated — no key, or an unknown, revoked or expired one.
  • 403 insufficient-scope — the key lacks a required scope.
  • 404 not-found.
  • 410 confirmation-expired — nobody decided within 15 minutes; the action did not run and never will.
  • 429 rate-limited — the key's request budget is spent; wait Retry-After seconds.
  • 500 internal.