Map
get/api/v2/map/{id}

Request

  • Base URL
    https://www.onlyworlds.com
  • Auth
    • API key in header API-Key
    • or API key in header API-Key and API key in header API-Pin
    • or HTTP bearer
    • or none

Path parameters

id, string uuid required

The map's id (a malformed id is a 422).

Query parameters

expand, string[]

Comma-separated link fields whose ids are replaced by ElementStub objects (one level deep). A field that is not a link is a 422.

fields, string[]

Comma-separated sparse fieldset: only these keys are returned, so type and id only when named. Accepts: type, id, name, description, supertype, subtype, image_url, background_color, hierarchy, width, height, depth, parent_map, location, created_at, updated_at, change_seq, created_by, changed_by, changed_via, changed_client, doors, or any extension field name. Anything else is one 422 for the whole list: its message names every unknown name, and its error carries unknown_fields (those names), types_with_field (for each one another type has, those types) and allowed_fields (this type's field names). With expand, a link is expanded only if it is also named here.

as, string

View as (the owner's keys only: a key with no member): read as another reader would. A membership id of this world (a person, an AI seat or a player seat) reads as that member's own key, its own creations included; a Character id reads as a guest of that Character with no membership (what it knows, the roster, nothing counted as its own); public reads everything that is not hidden. A hidden element is the plain 404, never a 410. An unknown value is a 422 (param as); a member key sending it is a 403 view_as_owner_only. Writes, /changes, /members, /me, the world and the files routes do not take it (422).

world, string uuid

The id of a world to read without the key that owns it, by one of two readers: keyless, the id of a world its owner opened to the public (only while the public reader is on); or with an account token, the id of a world the account holds. Keyless (the public reader), the read answers what anyone may read there: every element not hidden, with links to hidden elements stripped and its pictures as fields; no files, no roster, no tombstones (a deleted id is the plain 404), and Cache-Control: no-store. A world that is not open, and an id that names no world, are the same 404. A keyless request counts against the per-address budget. With a key, world may name the key's own world by its id (ignored); any other value, the key's own slug and its id without hyphens included, is a 422 (param world). While the public reader is off, world beside a key is no parameter: a list route refuses it as an unknown filter (422, param world) and a get route ignores it. With an account token instead of a key (Authorization: Bearer ow_a_...), world names the world it reads: the owner reads it whole, a member as its own member key reads, and an account with no access there as the public reads (the same 404 for a world that is not open).

Response

The element. With ?fields= the body holds only the named keys (not this schema's required set); with ?expand= each named link holds ElementStub objects instead of ids.

Map required

A map as the API returns it. Single links are an id or null, multi links an array of ids; extension fields appear inline. ?fields= returns only the named keys, and ?expand= replaces the named links' ids with ElementStub objects.

type, 'map' required
id, string uuid required
name, string required

Name of the element.

description, string required

Any kind of details about the element.

supertype, string required

The top level classification of the element within its type.

subtype, string required

The sub level classification through which the element is further sorted within its type.

image_url, string required

URL to an image representing the element.

background_color, string required

Color of the space around the map when zoomed out.

hierarchy, integer nullable required

Orders the maps that stand side by side (floors, decks, layers): the maps with the same parent_map; without one, the maps of the same location; without either, the maps of the world itself. Lower is deeper or earlier. Nesting is said by parent_map and location, not by this number.

width, integer nullable required

In pixels.

height, integer nullable required

In pixels.

depth, integer nullable required

In pixels.

parent_map, string uuid nullable required

Map within which this map is contained. A Map's id.

location, string uuid nullable required

Location element that this map represents. A Location's id.

created_at, string date-time required
updated_at, string date-time required
change_seq, integer required

The world change sequence at this element's last write.

created_by, string uuid nullable

The world membership that created this element, or null when the world's owner did. Members only: absent for the public, as doors is.

changed_by, string uuid nullable

The world membership that last changed this element, or null when the world's owner (or the server) did, or no write has touched it since doors were recorded: null with a non-null changed_via other than server is the world owner's write (the owner is the account, not a membership); null with server is the server's own write; null in both is a row from before writers were recorded. An id whose row on GET /members has status: removed is a former member's write: the id outlives the membership (removed, left, or its account deleted), and is never the owner's. Members only: absent for the public, as doors is.

changed_via, 'seat' | 'mcp' | 'declared' | 'api' | 'v1' | 'sync' | 'server' | 'site' | 'null' nullable

The door of the last change: seat (an AI seat), mcp (the MCP server), declared (the request sent an X-OW-Agent header), api, v1, sync (the mobile app's sync), site (the owner on onlyworlds.com) or server (the server, on its own behalf). The first three are the doors the platform marks as an AI's. Null: no write since doors were recorded. Members only: absent for the public, as doors is.

changed_client, string nullable

The name the client gave itself on the last change, in its X-OW-Client header (atlas, lantern, sdk): the client's claim, never proof, and it changes nothing about the door the change came through (that is changed_via). Null: no name sent, a value outside the rule, a server write, or a change from before names were recorded. Members only: absent for the public, as doors is.

doors, object nullable

Where this element has been: one key per tool that wrote it, each with the time of that tool's last write (the same string as updated_at after that write, so the newest key's time is this body's updated_at). The key is the name the client gave in its X-OW-Client header (atlas, lantern) when it sent one, else the door the write came through (api, seat, mcp, server and the other changed_via words), never both for one write. At most 16 keys: a new one past that drops the key with the oldest time. Members only: served to the world's owner and every member (co-builders, contributors, guests and AI seats); absent for the public, absent on a known-of stub, and never in the change feed or a world file. Null: no write since the history was recorded. A write carrying it is accepted and the key ignored.

known_of, true

Present, and true, only on an element this reader knows of but does not see whole: a guest or player reaches it only because its own Character's sheet links to it (one step out). Such a row keeps id, type, name, description, supertype, subtype, image_url, created_at, updated_at and change_seq, and its type's public fields (none for a map); every other field reads as unset (text "", numbers and single links null, multi links [], created_by, changed_by and changed_via null, no doors, no extension fields), its files are 404, and search matches only what it keeps. Absent: the element is whole. Any other grant (it names the reader's Character, the reader knows it, it is on the roster, the reader made it) makes it whole; a hidden element is never even a stub, whatever its public fields. Read-only: a write carrying known_of is refused (known_of_not_writable).

hidden, true

Present, and true, only when the world's owner or a co-builder hid this element and this reader still sees it: the owner, a co-builder, a key the owner minted, or the member who made it (to every other reader it does not exist). Absent otherwise, never false. A world file (the site's download) never carries it. Sent back in an update, it is ignored: hide and unhide an existing element through PUT and DELETE /{type}/{id}/hidden. Sent on a create, hidden: true creates the element hidden (the write body's hidden).

Changes

    • info

      added the optional property allOf[subschema #1: Error]/error/limit to the response with the status

    • info

      added the optional property error/limit to the response with the status

    • info

      added the optional property error/limit to the response with the status

    5 more changes in this revision