Eagle API Document
  • Overview
  • Application
    • /api/application/info
  • Folder
    • /api/folder/create
    • /api/folder/rename
    • /api/folder/update
    • /api/folder/list
    • /api/folder/listRecent
  • Item
    • /api/item/addFromURL
    • /api/item/addFromURLs
    • /api/item/addFromPath
    • /api/item/addFromPaths
    • /api/item/addBookmark
    • /api/item/info
    • /api/item/thumbnail
    • /api/item/list
    • /api/item/moveToTrash
    • /api/item/refreshPalette
    • /api/item/refreshThumbnail
    • /api/item/update
  • Library
    • /api/library/info
    • /api/library/history
    • /api/library/switch
    • /api/library/icon
  • Examples
    • Using Eagle API with Tampermonkey
  • Changelog
Powered by GitBook
On this page

Was this helpful?

  1. Folder

/api/folder/create

POST Create a folder. The created folder will be put at the bottom of the folder list of the current library.

Parameter

Description

folderName

The name of the Folder

parent

ID of the parent folder

Sample Code:

var data = {
    "folderName": "The Folder Name"
};

var requestOptions = {
  method: 'POST',
  body: JSON.stringify(data),
  redirect: 'follow'
};

fetch("http://localhost:41595/api/folder/create", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Results returned:

{
    "status": "success",
    "data": {
        "id": "KBJJSMMVF9WYL",
        "name": "The Folder Name",
        "images": [],
        "folders": [],
        "modificationTime": 1592409993367,
        "imagesMappings": {},
        "tags": [],
        "children": [],
        "isExpand": true
    }
}
Previous/api/application/infoNext/api/folder/rename

Last updated 3 years ago

Was this helpful?