-
Notifications
You must be signed in to change notification settings - Fork 13
/
pms-spec.yaml
336 lines (290 loc) · 12.1 KB
/
pms-spec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
openapi: 3.1.0
info:
version: 0.0.3
title: Plex-API
summary: An Open API Spec for interacting with Plex.tv and Plex Media Server
description: |
# Plex Media Server OpenAPI Specification
An Open Source OpenAPI Specification for Plex Media Server
Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/)
## Documentation
[API Documentation](https://plexapi.dev)
## SDKs
The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec).
| Language | Repository | Releases | Other |
| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - |
| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - |
| Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) |
| Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - |
| Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - |
| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - |
| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - |
| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | -
contact:
name: Luke Hagar
url: "https://www.LukeHagar.com"
email: Lukeslakemail@gmail.com
license:
url: "https://opensource.org/license/mit"
name: MIT
servers:
- url: "{protocol}://{ip}:{port}"
description: The full address of your Plex Server
variables:
protocol:
default: "https"
description: The protocol to use for the server connection
enum:
- "http"
- "https"
ip:
default: "10.10.10.47"
description: The IP address or hostname of your Plex Server
port:
default: "32400"
description: The port of your Plex Server
x-speakeasy-globals:
parameters:
- $ref: "./parameters/plex/x-plex-identifier.yaml"
- $ref: "./parameters/plex/x-plex-product.yaml"
- $ref: "./parameters/plex/x-plex-version.yaml"
- $ref: "./parameters/plex/x-plex-platform.yaml"
- $ref: "./parameters/plex/x-plex-device.yaml"
security:
- accessToken: []
components:
securitySchemes:
accessToken:
description: Plex Authentication Token
type: apiKey
in: header
name: X-Plex-Token
paths:
# Plex Media Server endpoints
# Colon Endpoints
# Folder: pms/paths/colon
/:
$ref: "./paths/colon/colon.yaml"
/:/prefs:
$ref: "./paths/colon/prefs.yaml"
/:/scrobble:
$ref: "./paths/colon/scrobble.yaml"
/:/unscrobble:
$ref: "./paths/colon/unscrobble.yaml"
/:/progress:
$ref: "./paths/colon/progress.yaml"
/:/timeline:
$ref: "./paths/colon/timeline.yaml"
# Activities
# Folder: pms/paths/activities
/activities:
$ref: "./paths/activities/activities.yaml"
/activities/{activityUUID}:
$ref: "./paths/activities/cancel.yaml"
# Butler
# Folder: pms/paths/butler
/butler:
$ref: "./paths/butler/butler.yaml"
/butler/{taskName}:
$ref: "./paths/butler/task.yaml"
/clients:
$ref: "./paths/clients.yaml"
/devices:
$ref: "./paths/devices.yaml"
# Companions
# Folder pms/paths/companions
/companions:
$ref: "paths/companions/companions.yaml"
# Friends
# Folder pms/paths/friends
/friends:
$ref: "paths/friends/friends.yaml"
# GeoIP
# Folder pms/paths/geoip
/geoip:
$ref: "paths/geoip/geoip.yaml"
# Plex Home
# Folder: pms/paths/home
/home:
$ref: "./paths/home.yaml"
# Hubs
# Folder: pms/paths/hubs
/hubs:
$ref: "./paths/hubs/hubs.yaml"
/hubs/home/recentlyAdded:
$ref: "./paths/hubs/home/get-recently-added.yaml"
/hubs/search:
$ref: "./paths/hubs/search.yaml"
/hubs/search/voice:
$ref: "./paths/hubs/search-voice.yaml"
/hubs/sections/{sectionId}:
$ref: "./paths/hubs/section.yaml"
/identity:
$ref: "./paths/identity/identity.yaml"
# Library
# Folder: pms/paths/library
/library/hashes:
$ref: "./paths/library/hashes.yaml"
/library/recentlyAdded:
$ref: "./paths/library/get-recently-added.yaml"
/library/sections:
$ref: "./paths/library/get-all-libraries.yaml"
/library/sections/{sectionKey}:
$ref: "./paths/library/[sectionKey]/library-section.yaml"
# Watchlist
/library/sections/watchlist/{filter}:
$ref: "./paths/library/sections/watchlist/get-watch-list.yaml"
/library/sections/{sectionKey}/{tag}:
$ref: "./paths/library/[sectionKey]/get-library-items.yaml"
/library/sections/{sectionKey}/refresh:
$ref: "./paths/library/[sectionKey]/refresh/get-refresh-library-metadata.yaml"
/library/sections/{sectionKey}/search:
$ref: "./paths/library/[sectionKey]/get-search-library.yaml"
/library/search:
$ref: "./paths/library/get-search-all-libraries.yaml"
/library/metadata/{ratingKey}:
$ref: "./paths/library/metadata/[ratingKey]/get-meta-data-by-rating-key.yaml"
/library/metadata/{ratingKey}/banner:
$ref: "./paths/library/metadata/[ratingKey]/banner/get-banner-image.yaml"
/library/metadata/{ratingKey}/thumb:
$ref: "./paths/library/metadata/[ratingKey]/thumb/get-thumb-image.yaml"
/library/metadata/{ratingKey}/children:
$ref: "./paths/library/metadata-children.yaml"
/library/all/top:
$ref: "./paths/library/content-top.yaml"
/library/onDeck:
$ref: "./paths/library/ondeck.yaml"
# Resources
# Folder: pms/resources
/resources:
$ref: "./paths/resources/get-server-resources.yaml"
# Logs
# Folder: pms/paths/logs
/log:
$ref: "./paths/logs/log.yaml"
/log/networked:
$ref: "./paths/logs/networked.yaml"
/myplex/account:
$ref: "./paths/myplex-account.yaml"
/photo/:/transcode:
$ref: "./paths/photo-transcode.yaml"
# Pins
# Folder: pms/paths/pins
/pins:
$ref: "./paths/pins/pins.yaml"
/pins/{pinID}:
$ref: "./paths/pins/pins-id.yaml"
# Playlists
# Folder: pms/paths/playlists
/playlists:
$ref: "./paths/playlists/playlists.yaml"
/playlists/{playlistID}:
$ref: "./paths/playlists/id.yaml"
/playlists/{playlistID}/items:
$ref: "./paths/playlists/contents.yaml"
/playlists/upload:
$ref: "./paths/playlists/upload.yaml"
# Media
/media/providers:
$ref: "./paths/media/providers/get-media-providers.yaml"
/search:
$ref: "./paths/search.yaml"
# Authentication
# Folder: pms/paths/authentication
/security/token:
$ref: "./paths/authentication/token.yaml"
/security/resources:
$ref: "./paths/authentication/resources.yaml"
/servers:
$ref: "./paths/servers.yaml"
/statistics/media:
$ref: "./paths/statistics/media.yaml"
/statistics/resources:
$ref: "./paths/statistics/resources.yaml"
/statistics/bandwidth:
$ref: "./paths/statistics/bandwidth.yaml"
# Status
/status/sessions:
$ref: "./paths/status/sessions.yaml"
/status/sessions/history/all:
$ref: "./paths/status/session-history.yaml"
/transcode/sessions:
$ref: "./paths/transcode-sessions.yaml"
/transcode/sessions/{sessionKey}:
$ref: "./paths/transcode-sessions-key.yaml"
/updater/status:
$ref: "./paths/updater/status.yaml"
/updater/check:
$ref: "./paths/updater/check.yaml"
/updater/apply:
$ref: "./paths/updater/apply.yaml"
/video/:/transcode/universal/start.mpd:
$ref: "./paths/video-transcode-universal-start.yaml"
# User
/user:
$ref: "./paths/user/get-user-data-by-token.yaml"
/users/signin:
$ref: "./paths/users/post-sign-in.yaml"
tags:
- name: Activities
description: |
Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details:
- They can contain a `progress` (from 0 to 100) marking the percent completion of the activity.
- They must contain an `type` which is used by clients to distinguish the specific activity.
- They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
- The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
- name: Authentication
description: |
API Calls regarding authentication for Plex Media Server
- name: Butler
description: |
Butler is the task manager of the Plex Media Server Ecosystem.
- name: Server
description: |
Operations against the Plex Media Server System.
- name: Updater
description: |
This describes the API for searching and applying updates to the Plex Media Server.
Updates to the status can be observed via the Event API.
- name: Log
description: |
Submit logs to the Log Handler for Plex Media Server
- name: Library
description: |
API Calls interacting with Plex Media Server Libraries
- name: Media
description: |
API Calls interacting with Plex Media Server Media
- name: Hubs
description: |
Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
- name: Playlists
description: |
Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
They can be organized in (optionally nesting) folders.
Retrieving a playlist, or its items, will trigger a refresh of its metadata.
This may cause the duration and number of items to change.
- name: Search
description: |
API Calls that perform search operations with Plex Media Server
- name: Sessions
description: |
API Calls that perform search operations with Plex Media Server Sessions
- name: User
description: |
API Calls that perform operations with Plex Media Server Users
- name: Video
description: |
API Calls that perform operations with Plex Media Server Videos
- name: Plex
description: |
API Calls that perform operations directly against https://Plex.tv
- name: Statistics
description: |
API Calls that perform operations with Plex Media Server Statistics
- name: Watchlist
description: |
API Calls that perform operations with Plex Media Server Watchlists