Folder
The Folder API allows you to list, create, and manage folders in the Eagle library.
Last updated
{
"status": "success",
"data": {
"data": [
{
"id": "LRK3AQGN7VCB1",
"name": "Design References",
"description": "UI/UX design references",
"children": [],
"modificationTime": 1700000000000,
"tags": [],
"iconColor": "blue",
"imageCount": 42
}
],
"total": 25,
"offset": 0,
"limit": 50
}
}// List all folders (first 50)
await fetch("http://localhost:41595/api/v2/folder/get").then(r => r.json());
// Get a single folder by ID
await fetch("http://localhost:41595/api/v2/folder/get?id=LRK3AQGN7VCB1").then(r => r.json());
// Get recently used folders
await fetch("http://localhost:41595/api/v2/folder/get?isRecent=true").then(r => r.json());// Get folders by multiple IDs
await fetch("http://localhost:41595/api/v2/folder/get", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
ids: ["FOLDER_ID_1", "FOLDER_ID_2"]
})
}).then(r => r.json());{
"status": "success",
"data": {
"id": "NEW_FOLDER_ID",
"name": "My New Folder",
"description": "",
"children": [],
"modificationTime": 1700000000000,
"tags": []
}
}// Create a root-level folder
await fetch("http://localhost:41595/api/v2/folder/create", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name: "My New Folder" })
}).then(r => r.json());
// Create a subfolder
await fetch("http://localhost:41595/api/v2/folder/create", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
name: "Subfolder",
description: "A subfolder for organizing",
parent: "PARENT_FOLDER_ID"
})
}).then(r => r.json());// Rename a folder and set icon color
await fetch("http://localhost:41595/api/v2/folder/update", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
id: "LRK3AQGN7VCB1",
name: "Renamed Folder",
iconColor: "green"
})
}).then(r => r.json());
// Move folder to a different parent
await fetch("http://localhost:41595/api/v2/folder/update", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
id: "LRK3AQGN7VCB1",
parent: "NEW_PARENT_ID"
})
}).then(r => r.json());
// Move folder to root level
await fetch("http://localhost:41595/api/v2/folder/update", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
id: "LRK3AQGN7VCB1",
parent: null
})
}).then(r => r.json());