molroo docs
WorldAPI ReferenceWorldsIdQuery

Query world state

POST
/worlds/{id}/query

Path Parameters

id*string

World ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.molroo.io/worlds/uuid/query" \  -H "Content-Type: application/json" \  -d '{}'
{
  "result": {
    "entities": [
      {
        "id": "string",
        "name": "string",
        "type": "user",
        "profile": {
          "displayName": "string",
          "role": "string",
          "description": "string",
          "personalityHints": "string"
        },
        "spaceId": "string"
      }
    ],
    "spaces": [
      {
        "id": "string",
        "name": "string",
        "type": "physical",
        "capacity": 0
      }
    ],
    "knowledge": {
      "facts": [
        {
          "id": "string",
          "content": "string",
          "visibility": "public",
          "knownBy": [
            "string"
          ]
        }
      ],
      "defaultVisibility": "public"
    },
    "progression": {
      "currentPhase": "string",
      "elapsedTime": 0,
      "eventCounts": {
        "property1": 0,
        "property2": 0
      },
      "phaseHistory": [
        {
          "phase": "string",
          "enteredAt": 0,
          "exitedAt": 0,
          "triggerId": "string"
        }
      ],
      "firedTriggerIds": [
        "string"
      ],
      "triggers": [
        {
          "id": "string",
          "condition": {
            "type": "event_count",
            "eventType": "string",
            "threshold": 0
          },
          "targetPhase": "string",
          "oneShot": true
        }
      ],
      "phases": {
        "property1": {
          "description": "string",
          "normMapOverride": {
            "property1": 0,
            "property2": 0
          }
        },
        "property2": {
          "description": "string",
          "normMapOverride": {
            "property1": 0,
            "property2": 0
          }
        }
      }
    },
    "relationships": {
      "property1": {
        "property1": {
          "type": "stranger",
          "strength": 0,
          "trust": 0
        },
        "property2": {
          "type": "stranger",
          "strength": 0,
          "trust": 0
        }
      },
      "property2": {
        "property1": {
          "type": "stranger",
          "strength": 0,
          "trust": 0
        },
        "property2": {
          "type": "stranger",
          "strength": 0,
          "trust": 0
        }
      }
    },
    "property1": null,
    "property2": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}