Skip to content

Commit ceb37ba

Browse files
os-zhuangclaude
andauthored
docs(api): caveat PUT /meta/:type/:name's create-refusal shapes (#9289)
The endpoint's "Create or update a metadata item" line said nothing about either refusal a caller can hit: allowRuntimeCreate declining a brand-new name under a recognised type (job/field today, not enumerated here since that would go stale the next time one is retired -- pointed at the MetadataTypeRegistryEntry reference and the metadata-lifecycle overlay whitelist instead), and unrecognisedMetaTypeRefusal (#8421/PR #8770, confirmed merged to main) refusing a :type segment that names no metadata type at all, scoped to this verb only. Fixes #8498 Claude-Session: https://claude.ai/code/session_17d48cbe-d3e0-562b-95a3-e2653a9bd9fb Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4cd104f commit ceb37ba

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎content/docs/api/metadata-api.mdx‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,26 @@ Get a specific metadata item with optional ETag caching.
5555

5656
Create or update a metadata item.
5757

58+
Creates are gated per type: `MetadataTypeRegistryEntry.allowRuntimeCreate` decides
59+
whether a **brand-new** name may be minted under that type at all, separately from
60+
whether an item that already exists may be overlaid (`allowOrgOverride`). A type that
61+
declines the create half still accepts updates to names that already exist, and its
62+
refusal — `403 NOT_CREATABLE` — names the route that does work. The flags are
63+
documented on
64+
[`MetadataTypeRegistryEntry`](/docs/references/kernel/metadata-plugin#metadatatyperegistryentry);
65+
which types currently decline which half is tracked in the
66+
[overlay whitelist](/docs/concepts/metadata-lifecycle#overlay-whitelist-shared-db-tenancy-invariant)
67+
rather than enumerated on this page, so this caveat doesn't go stale the next time a
68+
type is retired.
69+
70+
This verb also refuses a `:type` segment that is not a metadata type the platform
71+
declares at all — not a recognised spelling, and not a misspelling of one either —
72+
with `400 INVALID_REQUEST`, before any namespace is minted for it. The refusal is
73+
scoped to this verb: `GET` and `DELETE` on an item that already exists are
74+
unaffected. See [unrecognised type spelling](/docs/api/error-catalog#invalid_request--unrecognised-type-spelling)
75+
in the error catalog for the envelope — the same code and status cover both this
76+
refusal and the misspelling one above; the message text tells them apart.
77+
5878
**Body**: `{ type: "object", name: "account", item: { ... } }`
5979
**Response**: `{ success: true }`
6080

0 commit comments

Comments
 (0)