Skip to main content

structure

GET /structure

Get the structure of the Foundry world Retrieves the folder and compendium structure for the specified Foundry world.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
includeEntityDatabooleanqueryWhether to include full entity data or just UUIDs and names
pathstringqueryPath to read structure from (null = root)
recursivebooleanqueryWhether to read down the folder tree
recursiveDepthnumberqueryDepth to recurse into folders (default 5)
typesstringqueryTypes to return (Scene/Actor/Item/JournalEntry/RollTable/Cards/Macro/Playlist), can be comma-separated or JSON array

Returns

object - The folder and compendium structure

Example Request

GET /structure


GET /contents/:path

This route is deprecated - use /structure with the path query parameter instead

Returns

object - Error message directing to use /structure endpoint

Example Request

GET /contents/:path


GET /get-folder

Get a specific folder by name

Parameters

NameTypeRequiredSourceDescription
clientIdstringbody, queryClient ID for the Foundry world
namestringbody, queryName of the folder to retrieve

Returns

object - The folder information and its contents

Example Request

GET /get-folder


POST /create-folder

Create a new folder

Parameters

NameTypeRequiredSourceDescription
clientIdstringbody, queryClient ID for the Foundry world
namestringbody, queryName of the new folder
folderTypestringbody, queryType of folder (Scene, Actor, Item, JournalEntry, RollTable, Cards, Macro, Playlist)
parentFolderIdstringbody, queryID of the parent folder (optional for root level)

Returns

object - The created folder information

Example Request

POST /create-folder
Content-Type: application/json

{
"clientId": "example-value",
"name": "example-value",
"folderType": "example-value",
"parentFolderId": "example-value"
}

DELETE /delete-folder

Delete a folder

Parameters

NameTypeRequiredSourceDescription
clientIdstringbody, queryClient ID for the Foundry world
folderIdstringbody, queryID of the folder to delete
deleteAllbooleanbody, queryWhether to delete all entities in the folder

Returns

object - Confirmation of deletion

Example Request

DELETE /delete-folder
Content-Type: application/json

{
"clientId": "example-value",
"folderId": "example-value",
"deleteAll": true
}