mirror of
https://github.com/LukeHagar/plex-docs.git
synced 2025-12-06 04:20:40 +00:00
Updating OpenAPI Spec
This commit is contained in:
@@ -571,13 +571,69 @@ paths:
|
||||
description: The details of the library
|
||||
'401':
|
||||
description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
'/library/sections/{sectionId}':
|
||||
get:
|
||||
tags:
|
||||
- Library
|
||||
summary: Get Library Details
|
||||
description: |
|
||||
Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are:
|
||||
|
||||
- A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here:
|
||||
- Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.
|
||||
- Secondary: These are marked with `secondary="1"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.
|
||||
- Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `search="1"` which used to be used to allow clients to build search dialogs on the fly.
|
||||
- A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won't render any filtering controls. The `Type` object contains:
|
||||
- `key`: This provides the root endpoint returning the actual media list for the type.
|
||||
- `type`: This is the metadata type for the type (if a standard Plex type).
|
||||
- `title`: The title for for the content of this type (e.g. "Movies").
|
||||
- Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API.
|
||||
- `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with.
|
||||
- `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter.
|
||||
- `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element.
|
||||
- `title`: The title for the filter.
|
||||
- Each `Sort` object contains a description of the sort field.
|
||||
- `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending).
|
||||
- `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort.
|
||||
- `title`: The title of the field.
|
||||
operationId: getLibraryDetails
|
||||
parameters:
|
||||
- name: sectionId
|
||||
description: the Id of the library to query
|
||||
in: path
|
||||
schema:
|
||||
type: string
|
||||
example: 1000
|
||||
required: true
|
||||
- name: includeDetails
|
||||
description: |
|
||||
Whether or not to include details for a section (types, filters, and sorts).
|
||||
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
|
||||
in: query
|
||||
schema:
|
||||
type: number
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
default: 0
|
||||
required: fallse
|
||||
responses:
|
||||
'200':
|
||||
description: The details of the library
|
||||
'401':
|
||||
description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
/library/sections:
|
||||
get:
|
||||
tags:
|
||||
- Library
|
||||
summary: Get All Libraries
|
||||
description: |
|
||||
This endpoint will return a list of 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).
|
||||
operationId: getLibraries
|
||||
responses:
|
||||
'200':
|
||||
|
||||
Reference in New Issue
Block a user