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
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - The folder and compendium structure

Try It Out


GET /get-folder

Get a specific folder by name

Parameters

NameTypeRequiredSourceDescription
namestringbody, queryName of the folder to retrieve
clientIdstringqueryClient ID for the Foundry world
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - The folder information and its contents

Try It Out


POST /create-folder

Create a new folder

Parameters

NameTypeRequiredSourceDescription
namestringbody, queryName of the new folder
folderTypestringbody, queryType of folder (Scene, Actor, Item, JournalEntry, RollTable, Cards, Macro, Playlist)
clientIdstringqueryClient ID for the Foundry world
parentFolderIdstringbody, queryID of the parent folder (optional for root level)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - The created folder information

Try It Out


DELETE /delete-folder

Delete a folder

Parameters

NameTypeRequiredSourceDescription
folderIdstringbody, queryID of the folder to delete
clientIdstringqueryClient ID for the Foundry world
deleteAllbooleanbody, queryWhether to delete all entities in the folder
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Confirmation of deletion

Try It Out


GET /contents/:path

This route is deprecated

Use /structure with the path query parameter instead.

Returns

object - Error message directing to use /structure endpoint

Try It Out