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 }
}
recipientis 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.itemsis 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.countsis derived fromitems, so the two always agree.access_expappears only when a separate access window was declared. When it is absent there is none — it is not “expired”.purposemust be sent and must be one of the declared purposes. A token minted for a different purpose is refused.
outcome values¶
Value |
Meaning |
|---|---|
|
not yet materialized |
|
materialized into your repository by this artifact |
|
was already in your repository; nothing was created |
|
will not be materialized — |
|
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.
createdmeans ownership was established;already_presentmeans your account already owned it.rejectedis final and itsdetailsays why, for examplealready_owned: a Thing that has an owner changes hands only through a transfer that owner authorizes.retryablemeans 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 |
|
malformed body, missing |
401 |
— |
no valid credential on the request |
403 |
— |
your account is not permitted to use this endpoint |
404 |
|
every refusal of the token itself |
503 |
|
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.