Capability artifacts

A capability artifact is a recipient-bound entitlement: a one-time-shown token that authorizes its recipient to materialize a specific set of Things into their own repository. The issuer names the exact Things and the recipient; the recipient presents the token to claim what it grants.

This page covers what a recipient can do with a token today. Issuance is an issuer-side flow and is documented separately.

Previewing what a token grants

A token is shown once, at issuance, and cannot be read back. Before you spend it, preview it — this is free, repeatable and changes nothing:

POST /access/v1/capability-artifacts/preview HTTP/1.1
Authorization: Bearer <token>
Content-Type: application/json

{
  "token": "<the token you were given>",
  "purpose": "access-acquisition"
}
{
  "artifact_id": "…",
  "batch_id": "…",
  "purpose": "access-acquisition",
  "partition": "aws",
  "region": "ap-northeast-1",
  "recipient": { "account_id": "…", "subject": "…" },
  "max_capabilities": ["access"],
  "exp": 1791922800,
  "items": [
    { "thing_id": "th-…", "outcome": "pending" }
  ],
  "counts": { "total": 1, "pending": 1, "created": 0, "already_present": 0, "rejected": 0, "retryable": 0 }
}
  • recipient is who the token is bound to. Only that account may preview it — or redeem it. Any other account is answered exactly as a nonexistent artifact is, so the endpoint never tells a stranger that a token exists.

  • items is the exact membership, with each Thing’s current state. The token does not carry the list; the record does, which is why the list can be shown here without the token being spendable.

  • counts is derived from items, so the two always agree.

  • access_exp appears only when a separate access window was declared. When it is absent there is none — it is not “expired”.

  • purpose must be sent and must be one of the declared purposes. A token minted for a different purpose is refused.

outcome values

Value

Meaning

pending

not yet materialized

created

materialized into your repository by this artifact

already_present

was already in your repository; nothing was created

rejected

will not be materialized — detail says why

retryable

a transient failure; a later redemption retries it

Claiming ownership of a Thing

An ownership-claim artifact is bound to one account. Redeeming it makes that account the Thing’s owner, if the Thing has no owner yet. Send the carrier you received, as the bound account:

POST /access/v1/thing-ownership-claims HTTP/1.1
Authorization: Bearer <token>
Content-Type: application/json

{"format": "fgai-thing-ownership-claim", "version": 1, "token": "<artifact token>"}

The response carries artifact_id, job_state and one items[] entry per Thing. Calling again with the same carrier resumes unfinished Things or reports where they are, and large batches finish in the background.

  • created means ownership was established; already_present means your account already owned it.

  • rejected is final and its detail says why, for example already_owned: a Thing that has an owner changes hands only through a transfer that owner authorizes.

  • retryable means nothing was lost. Call again.

Any account other than the bound one gets 403, whatever token it holds.

The CLI verb is fgai access thing-ownership-claims-create.

Errors

Status

Class

Meaning

400

bad-request

malformed body, missing token, or an unknown/absent purpose

401

—

no valid credential on the request

403

—

your account is not permitted to use this endpoint

404

capability-artifact-not-found

every refusal of the token itself

503

capability-preview-unavailable

the capability service could not answer — retry

The 404 is deliberately undivided. A forged signature, an expired token, a revoked artifact, a token issued for another partition or region, an artifact with no live record, and a token whose recipient is not you all produce the same 404 with the same detail. Distinguishing them would let anyone holding a guessed token learn whether it exists.

The 503 is the opposite kind of answer: it says nothing about your token and is worth retrying.

Preview does not spend

Previewing a token does not redeem it, does not claim its work, and does not change any member’s state. You can preview as many times as you like; the second answer is identical to the first.

Redemption is a separate, explicit act. A token that previews successfully is re-verified when it is spent — previewing is not a substitute for holding a valid token, and tampering with a token after previewing it makes it fail at redemption.