Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Plex Media Server Log API
version: '1.2.2
'
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
description: '# API Info
## Content Types
The API supports responses in both XML and JSON, and clients can request one or the other using the standard `Accept` HTTP header.'
servers:
- url: https://{IP-description}.{identifier}.plex.direct:{port}
variables:
IP-description:
default: 1-2-3-4
description: A `-` separated string of the IPv4 or IPv6 address components
identifier:
default: 0123456789abcdef0123456789abcdef
description: The unique identifier of this particular PMS
port:
default: '32400'
security:
- user_token:
- shared user
- admin
tags:
- name: Log
description: Logging mechanism to allow clients to log to the server
paths:
/log:
put:
tags:
- Log
security:
- user_token:
- admin
summary: Logging a single-line message to the Plex Media Server log
description: 'This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred'
operationId: logPutSlash
parameters:
- in: query
name: level
schema:
type: integer
enum:
- 0
- 1
- 2
- 3
- 4
description: "An integer log level to write to the PMS log with.\n - 0: Error\n - 1: Warning\n - 2: Info\n - 3: Debug\n - 4: Verbose\n"
- in: query
name: message
schema:
type: string
description: The text of the message to write to the log.
- in: query
name: source
schema:
type: string
description: A string indicating the source of the message.
responses:
'200':
$ref: '#/components/responses/200'
post:
tags:
- Log
security:
- user_token:
- admin
summary: Logging a multi-line message to the Plex Media Server log
description: This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
operationId: logPostSlash
requestBody:
description: Line separated list of log items
content:
text/plain:
examples:
twoLogs:
value: 'level=3&source=diskless%20client&Things%20are%20OK%20right%20now
level=0&source=diskless%20client&We%20have%20a%20problem
'
responses:
'200':
$ref: '#/components/responses/200'
'400':
$ref: '#/components/responses/400'
/log/networked:
post:
tags:
- Log
security:
- user_token:
- admin
summary: Enabling Papertrail
description: 'This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time
Note: This endpoint responds to all HTTP verbs but POST is preferred'
operationId: logPostPapertrail
parameters:
- in: query
name: minutes
schema:
type: integer
description: The number of minutes logging should be sent to Papertrail
responses:
'200':
$ref: '#/components/responses/200'
'403':
description: User doesn't have permission
content:
text/html:
examples:
forbidden:
summary: Forbidden
value: <html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>
components:
responses:
'200':
description: OK
content:
text/html:
examples:
ok:
summary: OK
value: ''
'400':
description: Bad Request
content:
text/html:
examples:
badRequest:
summary: A parameter has a bad value or required parameter is missing
value: <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
securitySchemes:
user_token:
type: apiKey
in: header
name: X-Plex-Token
description: The token which identifies the user accessing the PMS. This is typically provided to the client by plex.tv. This can be either a traditional access token or a JWT token obtained through the JWT authentication flow.
x-tagGroups:
- name: General
tags:
- General
- Library
- Library Playlists
- Library Collections
- Status
- Activities
- Updater
- Butler
- Events
- Log
- Preferences
- Download Queue
- UltraBlur
- Transcoder
- name: Media Provider
tags:
- Provider
- Metadata Agents
- Content
- Hubs
- Search
- Rate
- Playlist
- Play Queue
- Timeline
- name: DVR
tags:
- DVRs
- Devices
- EPG
- Subscriptions
- Live TV