Terminate a Transcode Session
This API command can be used to terminate any active transcode session on a Plex server. The playback will stop on the client device with no message.
URL
DELETE http://{ip_address}:32400{key}?X-Plex-Token={plex_token}
Parameters
Name | Description |
---|---|
ip_address | The IP address of the Plex Media server. |
plex_token | The Plex token. |
key | The key associated with a session. This key can be found by calling the Active Sessions API command and looking for the key attribute in the TranscodeSession element. |
Return Status
HTTP Code | Description |
---|---|
200 | Success - The request was successful. |
400 | Bad Request - A parameter was not specified, or was specified incorrectly. |
401 | Unauthorized - The Plex token provided was not valid. |
404 | Not Found - The transcode session does not exist. |
Response
No response is returned when a session is terminated. Check for a return status code of 200 to determine if the API call was successful.
Remarks
The key
attribute in the Active Sessions API command will be in the format /transcode/session/{id}
. This entire key will need to be used in the API request.
Examples
curl -X DELETE http://{ip_address}:32400{key}?X-Plex-Token={plex_token}
import requests plex_url = http://{ip_address}:32400{key}?X-Plex-Token={plex_token} response = requests.delete(plex_url) print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400{key}?X-Plex-Token={plex_token}' -Method 'DELETE' Write-Output $response
Script examples
Below are a list of post and articles that provide an example that use this API endpoint: