Starholder API
Operation Reference

World · Settings

1 operation tagged world.settings.

setting_get

GET /api/v1/world/{worldId}/settings/{ref}

Get a world setting's compiled profile. Resolves a world-scoped setting (place) reference (URL-encoded) to its legacy id and returns the compiled media cross-reference profile: xref identity, media summary, narrative context, and linked entities and settings. A ref the xref registry places in the route world resolves whatever its namespace, including the world-name refs entity_list and textroot_get return (for example ent:tide_archive:…). References that resolve outside the route world, or do not resolve, return 404. Read-only.

Credentials. Any one of: X-Api-Key: <apiKey>; Authorization: Bearer <apiKey>; browser session. Accepts an API key (X-Api-Key, or Authorization: Bearer; when both are sent, Authorization is used) or a signed-in session. A room-link token is not accepted: sent in Authorization it is checked as an API key and answers 401 ERR_AUTH_INVALID, even with X-Api-Key beside it.

Authorization (ROUTE_AUTH_POLICIES; GET /api/v1/account lists the operations your credential passes):

  • setting_get: callers human, external_agent; scopes world:read; capability canRead; mutation class none.

Parameters

NameInRequiredTypeDescription
worldIdpathyesstring
refpathyesstring
x-correlation-idheadernostringEchoed in meta.correlationId / X-Correlation-Id.

Responses

  • 200: Success envelope.

    application/json

    {
      "type": "object",
      "required": [
        "ok",
        "data",
        "meta"
      ],
      "properties": {
        "ok": {
          "const": true
        },
        "meta": {
          "type": "object",
          "properties": {
            "correlationId": {
              "type": "string"
            }
          }
        },
        "data": {
          "$ref": "#/components/schemas/MediaXRefProfile"
        }
      }
    }
  • 400: ERR_VALIDATION_FAILED (bad percent-encoding or empty ref).

    application/json

    {
      "type": "object",
      "required": [
        "ok",
        "error"
      ],
      "properties": {
        "ok": {
          "const": false
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "retryable",
            "correlationId"
          ],
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            },
            "correlationId": {
              "type": "string"
            }
          }
        }
      }
    }
  • 401: No credential and no signed-in session: middleware answers { "error": "unauthorized" } before the route runs. A credential that fails validation: ERR_AUTH_INVALID in the error envelope.

    application/json

    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/AesErrorEnvelope"
        },
        {
          "type": "object",
          "required": [
            "error"
          ],
          "properties": {
            "error": {
              "const": "unauthorized"
            }
          }
        }
      ]
    }
  • 403: Credential is valid but the policy denies this request. ERR_PERMISSION_INTERSECTION_DENIED: a missing scope or capability, world role, risk tier, or ownership. ERR_AUTH_FORBIDDEN: the actor kind is not allowed on this operation. A human session also receives world-policy and world-membership denials here; an external agent receives them as 404. error.details.reason names the denial.

    application/json

    {
      "$ref": "#/components/schemas/AesErrorEnvelope"
    }
  • 404: ERR_NOT_FOUND (message 'Setting not found').

    application/json

    {
      "type": "object",
      "required": [
        "ok",
        "error"
      ],
      "properties": {
        "ok": {
          "const": false
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "retryable",
            "correlationId"
          ],
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            },
            "correlationId": {
              "type": "string"
            }
          }
        }
      }
    }
  • 429: Per-key or per-actor quota exceeded (ERR_QUOTA_EXCEEDED). Honor Retry-After.

    application/json

    {
      "$ref": "#/components/schemas/AesErrorEnvelope"
    }
  • 500: ERR_INTERNAL (reported with retryable: false).

    application/json

    {
      "type": "object",
      "required": [
        "ok",
        "error"
      ],
      "properties": {
        "ok": {
          "const": false
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "retryable",
            "correlationId"
          ],
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            },
            "correlationId": {
              "type": "string"
            }
          }
        }
      }
    }

Schemas used: #/components/responses/Forbidden, #/components/responses/RateLimited, #/components/responses/Unauthenticated, MediaXRefProfile

Contract authored from app/api/v1/world/[worldId]/settings/[ref]/route.ts (confidence: medium).

On this page