Delete a Movie
This API command will delete a movie from the Plex server.
URL
DELETE http://{ip_address}:32400/library/metadata/{id}?X-Plex-Token={plex_token}
Parameters
Name | Description |
---|---|
ip_address | The IP address of the Plex Media server. |
plex_token | The Plex token. |
id | The ID associated with the movie to be deleted. This key can be found by calling the Get All Movies API command and using the value from the ratingKey associated with the movie. |
Return Status
HTTP Code | Description |
---|---|
200 | Success - The request was successful. |
401 | Unauthorized - The Plex token provided was not valid. |
404 | Not Found - The movie associated with the ID does not exist. |
Response
There is no response returned by the server. Check the return status code to determine success.
Remarks
This API command will also delete the files and folders associated with the movie from storage.
Examples
curl -X DELETE http://{ip_address}:32400/library/metadata/{id}?X-Plex-Token={plex_token}
import requests plex_url = http://{ip_address}:32400/library/metadata/{id}?X-Plex-Token={plex_token} response = requests.delete(plex_url) print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/library/metadata/{id}?X-Plex-Token={plex_token}' -Method 'DELETE' Write-Output $response