Tearleads

POST/containers/{containerId}/revoke

Revoke a container grant

Operation containers.revoke

Description

Removes a grant from a container through a signed container.revoke event and rotates the container KEK so the removed principal cannot read later content. The request carries the new KEK epoch, its predecessor bridge, and the re-sealed container KEK keyring. Requires admin access; stale cited heads return 409.

Authentication

Requires a signed-in session: the client sends its session token as a bearer token in the Authorization header.

Parameters

NameInTypeDetails
containerIdpathstringrequired

Request body

application/jsonContainerRotationRequest

A rekey, revoke, or move, which rotates the container KEK, plus the descendant rekeys that must commit with it.

17 fields
  • bodyany JSON valuerequired
  • containerManifestHistoryRefslist of ContainerManifestRefoptional
    • at most 4,096 items
  • destinationParentContainerPathRefslist of ContainerManifestRefoptional
    • at most 100 items
  • eventobject with any fieldsrequired
  • expectedManifestHashstringrequired
    • not empty
  • keyEpochobject with any fieldsrequired
  • keyringContainerKekKeyringWireRecordrequirednullable
  • manifestobject with any fieldsrequired
  • parentContainerPathRefslist of ContainerManifestRefoptional
    • at most 100 items
  • parentKekRefobjectoptionalnullable
    3 fields
    • containerIdstringrequired
      • not empty
    • containerKeyEpochIdstringrequired
      • not empty
    • keyEpochHashstringrequired
      • exactly 64 characters
      • lowercase hexadecimal

    Other fields are allowed.

  • predecessorBridgeobject with any fieldsrequirednullable
  • previousContainerPathRefslist of ContainerManifestRefoptional
    • at most 100 items
  • previousManifestRefContainerManifestRefoptionalnullable
  • principalPolicyRefsPrincipalPolicyRefListrequired
  • userRecipientKeyslist of object with any fieldsoptional
  • wrapslist of object with any fieldsrequired
  • containerRekeyslist of ContainerMutationRequestoptional
    • at most 64 items

    Descendant rekeys, parent first; they commit with the rotation or not at all.

Other fields are allowed.

Responses

200 OK

application/jsonContainerRotationResponse

Acknowledges a rotation, plus one acknowledgement per carried descendant rekey in request order.

10 fields
  • containerIdstringrequired
  • createdAtstringrequired
  • eventHashstringrequired
    • not empty
  • manifestHeadobjectrequired
    2 fields
    • epochnumberrequired
    • manifestHashstringrequired

    Other fields are allowed.

  • organizationIdstringrequired
  • parentIdstringrequirednullable
  • systemSlotstringoptionalnullable
    • pattern ^sys_v1_[A-Za-z0-9_-]{43}$
  • updatedAtstringrequired
  • containerKekobjectrequired
    6 fields
    • containerKeyEpochintegerrequired
      • greater than 0
    • containerKeyEpochIdstringrequired
      • not empty
    • keyEpochHashstringrequired
      • not empty
    • keyringHashstringrequirednullable
      • not empty
    • keyTargetHashstringrequired
      • not empty
    • parentContainerKeyEpochIdstringrequirednullable

    Other fields are allowed.

  • containerRekeyslist of ContainerMutationResponseoptional

Other fields are allowed.

Other responses

StatusMeaningBody
400Bad Request

application/jsonErrorResponse

401Unauthorized

application/jsonSessionFailureResponse

402Payment Required

application/jsonPaymentRequiredErrorResponse

403Forbidden

application/jsonErrorResponse

404Not Found

application/jsonErrorResponse

409Conflict

application/jsonContainerMutationFailureResponse

500Internal Server Error

application/jsonErrorResponse

503Service Unavailable

application/jsonErrorResponse

Additional rules

The server also enforces these rules, which the schema above cannot express.

  • A container response keyring is null exactly for container key epoch 1.