Library
The Library API allows you to get information about the currently open Eagle library.
Endpoints Overview
GET
/api/v2/library/info
Get library metadata
GET
/api/v2/library/history
Get library history list
POST
/api/v2/library/switch
Switch to a library
GET
/api/v2/library/icon
Get library icon
GET /api/v2/library/info
Returns metadata about the currently open Eagle library, including its name, path, and configuration.
Response
{
"status": "success",
"data": {
"name": "My Design Library",
"path": "D:\\Eagle Libraries\\My Design Library.library",
"modificationTime": 1700000000000,
"applicationVersion": "4.0",
"folders": [],
"smartFolders": [],
"quickAccess": [],
"tagGroups": []
}
}Example
GET /api/v2/library/history
Get the list of recently opened libraries. Returns paginated results.
Query Parameters
offsetinteger (optional) — Pagination offset, default0limitinteger (optional) — Pagination limit, default50, max1000
Response
Examples
POST /api/v2/library/switch
Switch to a specified library.
Request Body
libraryPathstring (required) — Path to the library to switch to
Response
Example
GET /api/v2/library/icon
Get the icon for a library.
Query Parameters
libraryPathstring (required) — Path to the library
Response
Returns the icon image data.
Example
Library Properties
The library object contains the following properties:
name
string
Library display name
path
string
Full path to the .library directory
modificationTime
integer
Last modification timestamp
applicationVersion
string
Eagle version that created this library
folders
Object[]
Top-level folder structure
smartFolders
Object[]
Smart folder configurations
quickAccess
Object[]
Quick access items
tagGroups
Object[]
Tag group definitions
Last updated