Handover World
Changed onBody {world: {name, pin?, source?, producer?}, items: [...]}. Makes the world, owned by this account, and writes every item in it, all or nothing: an item keeps the id it carries, and items link to each other by those ids. world takes what POST /account/worlds takes, without key_name: no key is made here; the world page makes keys. items is POST /bulk's array, 1 or more. When any item is refused nothing is written, not the world and not the account PIN: 409 when an id is held in another world, else 422, with each item's result in items beside the error. On success, 201 with the world, each item's result, and door, the world page.
An Idempotency-Key makes a retry safe, as /bulk's does: the same key and body answer the same 201 again (Idempotent-Replay: true), the one world; the same key with another body is 409 idempotency_error. The key is the account's, since no world exists before the call. Without one, a retry after a lost answer meets 409 on every id (they landed in the first world), which is under the account's worlds.
Request
- Base URLhttps://www.onlyworlds.com
- Auth
- HTTP bearer
- or API key in header X-Session-Token
Headers
Replays of the same key with the same body return the first successful response (with Idempotent-Replay: true) for 24h; the same key with a different body is a 409 idempotency_error. While the first request with a key is still running, the same key is a 409 idempotency_in_flight: retry after Retry-After.
The client's own name for itself (atlas, lantern, sdk): lower case letters, digits and hyphens, 1 to 32 characters, after a trim. It is stored on the element as changed_client (a delete's tombstone as deleted_client), beside the door; it changes no door and no permission. A value outside the rule is ignored (stored as null), never refused.
Send it (any non-empty value) when an AI makes this write: the change is recorded with changed_via declared (a delete's tombstone with deleted_via). An AI seat's key is recorded as seat and MCP as mcp without it. The value is never stored.
Request body
The new world: its name; the account PIN (required when the account has none yet; optional after, checked before anything is written); optionally source and producer.
1 to 1000 elements, each {type, element} as in POST /bulk. Give each element its own id to keep the ids the client made; items link to each other by those ids.
Response
Created: the world and every element, with the ids sent. No key is made.
The world's account row, as GET /account/worlds lists an owned world, with the World's extension keys (x_, atlas_, shadow_) as the hand-over wrote them beside these fields.
One result per request item, in the same order, as POST /bulk answers it.
The world page on onlyworlds.com, a path on this host: send the person there.
Changes
- info
added the optional property
allOf[subschema #1: Error]/error/limitto the response with the status - info
added the optional property
allOf[subschema #1: Error]/error/limitto the response with the status - info
added the optional property
allOf[subschema #2]/items/items/error/limitto the response with the status
6 more changes in this revision
- info