From 544780d7bc5a1f574b5c6acfda91aba01ca6e17f Mon Sep 17 00:00:00 2001 From: Luke Hagar Date: Tue, 18 Apr 2023 21:28:09 -0500 Subject: [PATCH] Added new endpoints --- referenced/paths/pms/identity.yaml | 30 +++++++ referenced/paths/pms/servers.yaml | 45 ++++++++++ .../paths/pms/transcode-sessions-key.yaml | 19 ++++ referenced/paths/pms/transcode-sessions.yaml | 90 +++++++++++++++++++ referenced/paths/pms/updater-status.yaml | 2 +- referenced/plex-api-spec.yaml | 8 ++ 6 files changed, 193 insertions(+), 1 deletion(-) create mode 100644 referenced/paths/pms/identity.yaml create mode 100644 referenced/paths/pms/servers.yaml create mode 100644 referenced/paths/pms/transcode-sessions-key.yaml create mode 100644 referenced/paths/pms/transcode-sessions.yaml diff --git a/referenced/paths/pms/identity.yaml b/referenced/paths/pms/identity.yaml new file mode 100644 index 00000000..a54f6c83 --- /dev/null +++ b/referenced/paths/pms/identity.yaml @@ -0,0 +1,30 @@ +get: + tags: + - Server + summary: Get Server Identity + description: Get Server Identity + operationId: getServerIdentity + responses: + "200": + description: The Transcode Sessions + content: + application/json: + schema: + type: object + properties: + MediaContainer: + type: object + properties: + size: + type: number + example: 0 + claimed: + type: boolean + machineIdentifier: + type: string + example: 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 + version: + type: string + example: 1.31.3.6868-28fc46b27 + "401": + $ref: "../../responses/401.yaml" diff --git a/referenced/paths/pms/servers.yaml b/referenced/paths/pms/servers.yaml new file mode 100644 index 00000000..59e4aca4 --- /dev/null +++ b/referenced/paths/pms/servers.yaml @@ -0,0 +1,45 @@ +get: + tags: + - Server + summary: Get Server List + description: Get Server List + operationId: getServerList + responses: + "200": + description: List of Servers + content: + application/json: + schema: + type: object + properties: + MediaContainer: + type: object + properties: + size: + type: number + example: 1 + Server: + type: array + items: + type: object + properties: + name: + type: string + example: Hera + host: + type: string + example: 10.10.10.47 + address: + type: string + example: 10.10.10.47 + port: + type: number + example: 32400 + machineIdentifier: + type: string + example: 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 + version: + type: string + example: 1.31.3.6868-28fc46b27 + "401": + $ref: "../../responses/401.yaml" diff --git a/referenced/paths/pms/transcode-sessions-key.yaml b/referenced/paths/pms/transcode-sessions-key.yaml new file mode 100644 index 00000000..49b3de54 --- /dev/null +++ b/referenced/paths/pms/transcode-sessions-key.yaml @@ -0,0 +1,19 @@ +delete: + tags: + - Sessions + summary: Stop a Transcode Session + description: Stop a Transcode Session + parameters: + - name: sessionKey + description: the Key of the transcode session to stop + in: path + schema: + type: string + example: zz7llzqlx8w9vnrsbnwhbmep + required: true + operationId: stopTranscodeSession + responses: + "200": + description: The Transcode Session ended + "401": + $ref: "../../responses/401.yaml" diff --git a/referenced/paths/pms/transcode-sessions.yaml b/referenced/paths/pms/transcode-sessions.yaml new file mode 100644 index 00000000..e01b0784 --- /dev/null +++ b/referenced/paths/pms/transcode-sessions.yaml @@ -0,0 +1,90 @@ +get: + tags: + - Sessions + summary: Get Transcode Sessions + description: Get Transcode Sessions + operationId: getTranscodeSessions + responses: + "200": + description: The Transcode Sessions + content: + application/json: + schema: + type: object + properties: + MediaContainer: + type: object + properties: + size: + type: number + example: 1 + TranscodeSession: + type: array + items: + type: object + properties: + key: + type: string + example: zz7llzqlx8w9vnrsbnwhbmep + throttled: + type: boolean + complete: + type: boolean + progress: + type: number + example: 0.4000000059604645 + size: + type: number + example: -22 + speed: + type: number + example: 22.399999618530273 + error: + type: boolean + duration: + type: number + example: 2561768 + context: + type: string + example: streaming + sourceVideoCodec: + type: string + example: h264 + sourceAudioCodec: + type: string + example: ac3 + videoDecision: + type: string + example: transcode + audioDecision: + type: string + example: transcode + protocol: + type: string + example: http + container: + type: string + example: mkv + videoCodec: + type: string + example: h264 + audioCodec: + type: string + example: opus + audioChannels: + type: number + example: 2 + transcodeHwRequested: + type: boolean + timeStamp: + type: number + example: 1681869535.7764285 + maxOffsetAvailable: + type: number + example: 861.778 + minOffsetAvailable: + type: number + example: 0 + + "401": + $ref: "../../responses/401.yaml" diff --git a/referenced/paths/pms/updater-status.yaml b/referenced/paths/pms/updater-status.yaml index 7035ce51..87eb5b18 100644 --- a/referenced/paths/pms/updater-status.yaml +++ b/referenced/paths/pms/updater-status.yaml @@ -3,7 +3,7 @@ get: - Updater summary: Querying status of updates description: Querying status of updates - operationId: queryUpdateStatus + operationId: getUpdateStatus responses: "200": description: The Server Updates diff --git a/referenced/plex-api-spec.yaml b/referenced/plex-api-spec.yaml index c1293523..e87c6f49 100644 --- a/referenced/plex-api-spec.yaml +++ b/referenced/plex-api-spec.yaml @@ -113,6 +113,8 @@ paths: $ref: "./paths/pms/butler.yaml" /butler/{taskName}: $ref: "./paths/pms/butler-task.yaml" + /identity: + $ref: "./paths/pms/identity.yaml" /log: $ref: "./paths/pms/log.yaml" /log/networked: @@ -159,6 +161,12 @@ paths: $ref: "./paths/pms/sessions.yaml" /status/sessions/history/all: $ref: "./paths/pms/session-history.yaml" + /servers: + $ref: "./paths/pms/servers.yaml" + /transcode/sessions: + $ref: "./paths/pms/transcode-sessions.yaml" + /transcode/sessions/{sessionKey}: + $ref: "./paths/pms/transcode-sessions-key.yaml" /:/prefs: $ref: "./paths/pms/server-preferences.yaml"