Skip to documentation
DMRealm / DevelopersHelp CenterOpen DMRealm ↗

API reference

resolve_entity

Discover accessible selection metadata by name, slug or contextual substring.

Internal only

External access unavailable. Examples are internal contracts or explicitly planned local simulations.

Input

FieldRule
realm_slugRequired string, 1–80 characters
queryRequired string, 1–200 characters; trimmed, blank rejected
entity_typeOptional RealmEntityType
limitInteger 1–100; default 20
offsetInteger 0–100000; default 0
Other fieldsRejected; actor never comes from arguments

Output

EntityResolution contains status, match, candidates and next_offset. Each candidate contains entity_id, realm_id, name, entity_type, slug, summary, revision and canonical_api_path. No hidden counts, arbitrary metadata or section bodies are returned.

An application resource path identifies the existing app resource. It is not an externally available integration endpoint. Ambiguity is decided before pagination; live-list changes can move pages.

Example and result shapes

Fixture responses demonstrate exact singleton, exact collision, single substring suggestion and no accessible match. Candidate selection rechecks the stable ID rather than rerunning a name search.

resolve_entity inputInternal only · synthetic fixture
{
  "realm_slug": "ashvale",
  "query": "Captain Mira",
  "entity_type": "npc",
  "limit": 20,
  "offset": 0
}

resolve_entity responseInternal only · synthetic fixture
{
  "status": "resolved",
  "match": "exact",
  "candidates": [
    {
      "entity_id": "9b4e2c17-5d3a-4f80-a6c1-0e7d2b8f3a52",
      "realm_id": "419a0878-ece8-4eea-9bc1-dd015843a3cf",
      "name": "Captain Mira",
      "entity_type": "npc",
      "slug": "captain-mira",
      "summary": "Harbor captain; Backstory has only author and inherent owner/admin readers.",
      "revision": 7,
      "canonical_api_path": "/v1/realms/ashvale/entities/9b4e2c17-5d3a-4f80-a6c1-0e7d2b8f3a52"
    }
  ],
  "next_offset": null
}

Current internal contract · Local simulation — no service is called
Resolver scenario

query: “Captain Mira” · status: ambiguous · match: exact

Explicit candidate selection

No candidate selected. A suggestion is never automatic authority.

Inspect synthetic resolution
Resolution fixtureInternal only · synthetic fixture
{
  "status": "ambiguous",
  "match": "exact",
  "candidates": [
    {
      "entity_id": "6de8a31b-a5d0-4aa2-a728-f4e53b30a045",
      "realm_id": "419a0878-ece8-4eea-9bc1-dd015843a3cf",
      "name": "Captain Mira",
      "entity_type": "npc",
      "slug": "captain-mira-north",
      "summary": "Northern captain; Backstory has additional player readers.",
      "revision": 7,
      "canonical_api_path": "/v1/realms/ashvale/entities/6de8a31b-a5d0-4aa2-a728-f4e53b30a045"
    },
    {
      "entity_id": "9b4e2c17-5d3a-4f80-a6c1-0e7d2b8f3a52",
      "realm_id": "419a0878-ece8-4eea-9bc1-dd015843a3cf",
      "name": "Captain Mira",
      "entity_type": "npc",
      "slug": "captain-mira",
      "summary": "Harbor captain; Backstory has only author and inherent owner/admin readers.",
      "revision": 7,
      "canonical_api_path": "/v1/realms/ashvale/entities/9b4e2c17-5d3a-4f80-a6c1-0e7d2b8f3a52"
    }
  ],
  "next_offset": null
}

Internal errors

AgentError has status:error and code unsupported_operation, invalid_input or no_accessible_match. No_accessible_match deliberately does not disclose whether inaccessible content exists. Infrastructure failures propagate to trusted callers and never become permission to create.

Permissions, approval, limits

Fresh active membership and ordinary visibility projection constrain each read, including selection. Approval does not apply to reads. Internal input bounds are not external rate limits, transport limits or public-scale performance promises.

Contract evidence and limitations

Inspected 2026-10-27: dmrealm-services/packages/common/dmrealm_common/agent_entities.py. Model: models/realms.py:RealmEntity. Synthetic fixtures; no real records.

Source SHA-256: f69d56787ed00673716e8de38020c1de687419cd97dc2d69dff08eac6e891df5

Accepted decisions: agent-entity-integration.md, Q1–Q11. Planned occurrence selectors and batches are conceptual. Local simulation tests cannot establish backend security or transaction guarantees.