Added Log endpoint details

This commit is contained in:
luke-hagar-sp
2023-03-27 14:08:39 -05:00
parent e325023fd7
commit b5f85f5172
3 changed files with 123 additions and 6 deletions

View File

@@ -1,8 +1,9 @@
openapi: 3.0.1 openapi: 3.1.1
info: info:
title: Plex-API title: Plex-API
summary: A Plex Media Server API Map
description: An Open API Spec for interacting with Plex.tv and Plex Servers description: An Open API Spec for interacting with Plex.tv and Plex Servers
version: 0.0.1 version: 0.0.2
contact: contact:
name: Luke Hagar name: Luke Hagar
email: Lukeslakemail@gmail.com email: Lukeslakemail@gmail.com
@@ -22,7 +23,6 @@ servers:
Port: Port:
default: '32400' default: '32400'
description: The port to access your plex server description: The port to access your plex server
- url: https://plex.tv/api/v2
security: security:
- PlexToken: [] - PlexToken: []
components: components:
@@ -418,6 +418,60 @@ paths:
description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query. description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
'404': '404':
description: The task was not running description: The task was not running
/log:
get:
tags:
- Log
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.
operationId: logaLine
parameters:
- name: level
description: |
An integer log level to write to the PMS log with.
(0: Error, 1: Warning, 2: Info, 3: Debug, 4: Verbose)
in: query
schema:
type: number
enum:
- 0
- 1
- 2
- 3
- 4
required: true
- name: message
description: The text of the message to write to the log.
in: query
schema:
type: string
example: ''
required: true
- name: source
description: a string indicating the source of the message.
in: query
schema:
type: string
example: ''
required: true
responses:
'200':
description: Log Line submitted successfully
'401':
description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
post:
tags:
- Log
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 GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
operationId: logMultipleLines
responses:
'200':
description: Multi-Line Log Message Posted successfully
'401':
description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
tags: tags:
- name: Activities - name: Activities
description: | description: |
@@ -430,7 +484,7 @@ tags:
- The may contain a `Response` object which attributes which represent the result of the asynchronous operation. - The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
- name: Butler - name: Butler
description: | description: |
Butler is the task manager of the plex ecosystem. Butler is the task manager of the Plex Media Server Ecosystem.
- name: Server - name: Server
description: | description: |
Operations against the Plex Media Server System. Operations against the Plex Media Server System.
@@ -438,3 +492,6 @@ tags:
description: | description: |
This describes the API for searching and applying updates to the Plex Media Server. 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. Updates to the status can be observed via the Event API.
- name: Log
description: |
Submit logs to the Log Handler for Plex Media Server

54
referenced/paths/log.yaml Normal file
View File

@@ -0,0 +1,54 @@
get:
tags:
- Log
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.
operationId: logaLine
parameters:
- name: level
description: |
An integer log level to write to the PMS log with.
(0: Error, 1: Warning, 2: Info, 3: Debug, 4: Verbose)
in: query
schema:
type: number
enum:
- 0
- 1
- 2
- 3
- 4
required: true
- name: message
description: The text of the message to write to the log.
in: query
schema:
type: string
example: ""
required: true
- name: source
description: a string indicating the source of the message.
in: query
schema:
type: string
example: ""
required: true
responses:
"200":
description: Log Line submitted successfully
"401":
$ref: "../responses/401.yaml"
post:
tags:
- Log
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 GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
operationId: logMultipleLines
responses:
"200":
description: Multi-Line Log Message Posted successfully
"401":
$ref: "../responses/401.yaml"

View File

@@ -1,9 +1,10 @@
openapi: 3.0.1 openapi: 3.1.1
info: info:
title: Plex-API title: Plex-API
summary: A Plex Media Server API Map
description: An Open API Spec for interacting with Plex.tv and Plex Servers description: An Open API Spec for interacting with Plex.tv and Plex Servers
version: "0.0.1" version: "0.0.2"
contact: contact:
name: Luke Hagar name: Luke Hagar
email: Lukeslakemail@gmail.com email: Lukeslakemail@gmail.com
@@ -52,6 +53,8 @@ paths:
$ref: "./paths/butler.yaml" $ref: "./paths/butler.yaml"
/butler/{taskName}: /butler/{taskName}:
$ref: "./paths/butler-task.yaml" $ref: "./paths/butler-task.yaml"
/log:
$ref: "./paths/log.yaml"
tags: tags:
- name: Activities - name: Activities
@@ -73,3 +76,6 @@ tags:
description: | description: |
This describes the API for searching and applying updates to the Plex Media Server. 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. Updates to the status can be observed via the Event API.
- name: Log
description: |
Submit logs to the Log Handler for Plex Media Server