Server
Media
Butler
Plex
Library
- GETGet Hash Value
- GETGet Recently Added
- GETGet All Libraries
- GETGet library details
- DELDelete library section
- GETGet library items
- GETGet all media of library
- GETRefresh Metadata Of The Library
- GETSearch library
- GETGet Genres of library media
- GETGet Countries of library media
- GETGet Actors of library media
- GETSearch All Libraries
- GETGet Media Metadata
- GETGet Items Children
- GETGet Top Watched Content
- GETGet On Deck
Watchlist
Playlists
Authentication
Sessions
Get All Libraries
A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat.
Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Library.GetAllLibrariesAsync();
// handle response
{
"MediaContainer": {
"size": 5,
"allowSync": false,
"title1": "Plex Library",
"Directory": [
{
"allowSync": true,
"art": "/:/resources/movie-fanart.jpg",
"composite": "/library/sections/1/composite/1705615584",
"filters": true,
"refreshing": false,
"thumb": "/:/resources/movie.png",
"key": "1",
"type": "movie",
"title": "Movies",
"agent": "tv.plex.agents.movie",
"scanner": "Plex Movie",
"language": "en-US",
"uuid": "322a231a-b7f7-49f5-920f-14c61199cd30",
"updatedAt": 1556281940,
"createdAt": 1556281940,
"scannedAt": 1556281940,
"content": true,
"directory": true,
"contentChangedAt": 1556281940,
"hidden": 0,
"Location": [
{
"id": 1,
"path": "/movies"
}
]
}
]
}
}
Authorizations
Plex Authentication Token
Response
5
false
"Plex Library"
true
"/:/resources/movie-fanart.jpg"
"/library/sections/1/composite/1705615584"
true
false
"/:/resources/movie.png"
"1"
"movie"
"Movies"
"tv.plex.agents.movie"
"Plex Movie"
"en-US"
"322a231a-b7f7-49f5-920f-14c61199cd30"
Unix epoch datetime in seconds
1556281940
Unix epoch datetime in seconds
1556281940
Unix epoch datetime in seconds
1556281940
true
true
Unix epoch datetime in seconds
1556281940
0
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Library.GetAllLibrariesAsync();
// handle response
{
"MediaContainer": {
"size": 5,
"allowSync": false,
"title1": "Plex Library",
"Directory": [
{
"allowSync": true,
"art": "/:/resources/movie-fanart.jpg",
"composite": "/library/sections/1/composite/1705615584",
"filters": true,
"refreshing": false,
"thumb": "/:/resources/movie.png",
"key": "1",
"type": "movie",
"title": "Movies",
"agent": "tv.plex.agents.movie",
"scanner": "Plex Movie",
"language": "en-US",
"uuid": "322a231a-b7f7-49f5-920f-14c61199cd30",
"updatedAt": 1556281940,
"createdAt": 1556281940,
"scannedAt": 1556281940,
"content": true,
"directory": true,
"contentChangedAt": 1556281940,
"hidden": 0,
"Location": [
{
"id": 1,
"path": "/movies"
}
]
}
]
}
}