adding and adjusting headers

This commit is contained in:
Luke Hagar
2024-10-01 14:43:15 +00:00
parent db27086715
commit 915751fec7
16 changed files with 95 additions and 30 deletions

View File

@@ -69,6 +69,28 @@ The file should contain data in the following order:
5XX: 5XX:
``` ```
### Headers
Plex Media Server accept a variety of custom headers that follow the pattern `X-Plex-{name}`.
The full set of headers isn't enumerated here since some may only apply to certain endpoints, but common headers that can be included on all requests include:
| Header | Description | Sample |
| --- | --- | --- |
| X-Plex-Client-Identifier | An opaque identifier unique to the client | abc123 |
| X-Plex-Token | An authentication token, obtained from plex.tv | XXXXXXXXXXXX |
| X-Plex-Product | The name of the client product | Plex for Roku |
| X-Plex-Version | The version of the client application | 2.4.1 |
| X-Plex-Platform | The platform of the client | Roku |
| X-Plex-Platform-Version | The version of the platform | 4.3 build 1057 |
| X-Plex-Device | A relatively friendly name for the client device | Roku 3 |
| X-Plex-Model | A potentially less friendly identifier for the device model | 4200X |
| X-Plex-Device-Vendor | The device vendor | Roku |
| X-Plex-Device-Name | A friendly name for the client | Living Room TV |
| X-Plex-Marketplace | The marketplace on which the client application is distributed | googlePlay |
X-Plex-Client-Identifier is typically required, as is X-Plex-Token for authentication.
### Rules ### Rules
- A property in the response is only marked as required if it is always returned, regardless of the parameters sent with the request. - A property in the response is only marked as required if it is always returned, regardless of the parameters sent with the request.

View File

@@ -1,6 +1,7 @@
name: X-Plex-Device-Name name: X-Plex-Device-Name
x-speakeasy-name-override: DeviceName
description: The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) description: The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.)
in: query in: header
required: false required: false
schema: schema:
type: string type: string

View File

@@ -1,6 +1,7 @@
name: X-Plex-Device-Screen-Resolution name: X-Plex-Device-Screen-Resolution
x-speakeasy-name-override: DeviceScreenResolution
description: The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) description: The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)
in: query in: header
required: false required: false
schema: schema:
type: string type: string

View File

@@ -0,0 +1,9 @@
name: X-Plex-Device-Vendor
x-speakeasy-name-override: DeviceVendor
description: The device vendor
in: header
required: false
schema:
type: string
examples:
- Roku

View File

@@ -1,8 +1,9 @@
name: X-Plex-Device name: X-Plex-Device
x-speakeasy-name-override: DeviceName x-speakeasy-name-override: DeviceNickname
description: The name of the device the client application is running on. This is used to track the client application and its usage. (Linux, iOS, Android, etc.) description: A relatively friendly name for the client device
in: query in: header
required: false required: false
schema: schema:
type: string type: string
example: "Linux" examples:
- Roku 3

View File

@@ -1,6 +1,7 @@
name: X-Plex-Features name: X-Plex-Features
x-speakeasy-name-override: ClientFeatures
description: The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) description: The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)
in: query in: header
required: false required: false
schema: schema:
type: string type: string

View File

@@ -1,8 +1,12 @@
name: X-Plex-Client-Identifier name: X-Plex-Client-Identifier
x-speakeasy-name-override: ClientID x-speakeasy-name-override: ClientID
description: The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) description: An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
in: query required: true
in: header
schema: schema:
type: string type: string
example: gcgzw5rz2xovp84b4vha3a40 examples:
required: true - 3381b62b-9ab7-4e37-827b-203e9809eb58
- SMPH00123
- 4CE0460D0G

View File

@@ -1,6 +1,6 @@
name: X-Plex-Language name: X-Plex-Language
description: The language of the client application. This is used to track the client application and its usage. (en, ja, etc.) description: The language of the client application.
in: query in: header
required: false required: false
schema: schema:
type: string type: string

View File

@@ -0,0 +1,9 @@
name: X-Plex-Marketplace
x-speakeasy-name-override: Marketplace
description: The marketplace on which the client application is distributed
in: header
required: false
schema:
type: string
examples:
- googlePlay

View File

@@ -1,7 +1,9 @@
name: X-Plex-Model name: X-Plex-Model
description: The model of the device the client application is running on. This is used to track the client application and its usage. (bundled, desktop, etc.) x-speakeasy-name-override: Model
in: query description: A potentially less friendly identifier for the device model
in: header
required: false required: false
schema: schema:
type: string type: string
example: "bundled" examples:
- 4200X

View File

@@ -0,0 +1,9 @@
name: X-Plex-Platform-Version
x-speakeasy-name-override: PlatformVersion
description: The version of the platform
in: header
required: false
schema:
type: string
examples:
- 4.3 build 1057

View File

@@ -1,8 +1,10 @@
name: X-Plex-Platform name: X-Plex-Platform
x-speakeasy-name-override: ClientPlatform x-speakeasy-name-override: Platform
description: The platform of the client application. This is used to track the client application and its usage. (Chrome, Safari, etc.) description: The platform of the client application.
in: query in: header
required: false required: false
schema: schema:
type: string type: string
example: "Chrome" examples:
- Chrome
- Roku

View File

@@ -1,8 +1,10 @@
name: X-Plex-Product name: X-Plex-Product
x-speakeasy-name-override: ClientName x-speakeasy-name-override: ClientName
description: The name of the client application. This is used to track the client application and its usage. (Plex Web, Plex Media Server, etc.) description: The name of the client application. (Plex Web, Plex Media Server, etc.)
in: query in: header
required: false required: false
schema: schema:
type: string type: string
example: "Plex Web" examples:
- Plex Web
- Plex for Roku

View File

@@ -1,6 +1,6 @@
name: X-Plex-Session-Id name: X-Plex-Session-Id
description: The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) description: The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca)
in: query in: header
required: false required: false
schema: schema:
type: string type: string

View File

@@ -1,7 +1,7 @@
name: X-Plex-Token name: X-Plex-Token
in: query in: header
description: Plex Authentication Token description: An authentication token, obtained from plex.tv
required: true
schema: schema:
type: string type: string
example: CV5xoxjTpFKUzBTShsaf example: CV5xoxjTpFKUzBTShsaf
required: true

View File

@@ -1,8 +1,10 @@
name: X-Plex-Version name: X-Plex-Version
x-speakeasy-name-override: ClientVersion x-speakeasy-name-override: ClientVersion
description: The version of the client application. This is used to track the client application and its usage. (4.133.0, 5.0.0, etc.) description: The version of the client application.
in: query in: header
required: false required: false
schema: schema:
type: string type: string
example: "4.133.0" examples:
- "2.4.1"
- "4.133.0"