When performing a search via the Foundry VTT WebSocket API, the server returns a JSON response containing the client ID, the original query, a unique request ID, and an array of results. Each result object provides detailed metadata about the matched entity, including its document type, unique ID, UUID, and whether it is a WorldEntity or a CompendiumEntity.
{
"clientId": "qsl-integration-test",
"query": "test",
"requestId": "test_1782956933625_v13y2n",
"results": [
{
"documentType": "Scene",
"folder": null,
"formattedMatch": "<strong>test</strong>",
"icon": "",
"id": "UTjLwXV2Zl26XPRl",
"journalLink": "@UUID[Scene.UTjLwXV2Zl26XPRl]{test}",
"name": "test",
"package": null,
"packageName": null,
"resultType": "WorldEntity",
"subType": "",
"tagline": "Scenes Directory",
"uuid": "Scene.UTjLwXV2Zl26XPRl"
},
{
"documentType": "Actor",
"folder": null,
"formattedMatch": "Updated <strong>Test</strong> Actor",
"icon": "systems/dnd5e/tokens/heroes/MonkStaff.webp",
"id": "V5OF1QXHjaIy6iO8",
"journalLink": "@UUID[Actor.V5OF1QXHjaIy6iO8]{Updated Test Actor}",
"name": "Updated Test Actor",
"package": null,
"packageName": null,
"resultType": "WorldEntity",
"subType": "character",
"tagline": "Actors Directory",
"uuid": "Actor.V5OF1QXHjaIy6iO8"
},
{
"documentType": "Item",
"folder": null,
"formattedMatch": "Adamantine Breastplate",
"icon": "icons/equipment/chest/breastplate-collared-steel-grey.webp",
"id": "DevmObXWP9MfwE2c",
"journalLink": "@UUID[Compendium.dnd5e.items.Item.DevmObXWP9MfwE2c]{Adamantine Breastplate}",
"name": "Adamantine Breastplate",
"package": "dnd5e.items",
"packageName": "Items (SRD)",
"resultType": "CompendiumEntity",
"subType": "equipment",
"tagline": "Items (SRD)",
"uuid": "Compendium.dnd5e.items.Item.DevmObXWP9MfwE2c"
}
]
}