Stop Optimize Database Task

There are a number of tasks that can be scheduled to run on a Plex server. This API command will stop the optimize database task.

URL

DELETE http://{ip_address}:32400/butler/OptimizeDatabase?X-Plex-Token={plex_token}

Parameters

NameDescription
ip_addressThe IP address of the Plex Media server.
plex_tokenThe Plex token.

Return Status

HTTP CodeDescription
200Success - The task has stopped successfully.
401Unauthorized - The Plex token provided was not valid.
404Not Found - The task is not currently running.

Response

No response is returned by the command. The status code will indicate whether the optimize database task was stopped successfully.

Examples

curl -X DELETE http://{ip_address}:32400/butler/OptimizeDatabase?X-Plex-Token={plex_token}
import requests
plex_url = http://{ip_address}:32400/butler/OptimizeDatabase?X-Plex-Token={plex_token}
response = requests.delete(plex_url)
print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/butler/OptimizeDatabase?X-Plex-Token={plex_token}' -Method 'DELETE'
Write-Output $response
Subscribe
Display