A Plex server can have many different libraries setup for various media. You may find that you need to delete one of the libraries. This API command will delete a library from the Plex server.
DELETE http://[IP address]:32400/library/sections/[Library ID]/?async=[Async]X-Plex-Token=[PlexToken]
|IP address||The IP address of the Plex Media server.|
|PlexToken||The authentication Plex token.|
|Library ID||The ID associated with the library to be deleted. This value can be found by calling the Get Libraries API command and using the value from the |
|Async||A flag indicating if the API command will be run asynchronously. 1 for async, otherwise 0.|
|200||Success - The request was successful.|
|401||Unauthorized - The Plex token provided was not valid.|
No response is returned. You will be able to see the clean bundles API command run from the Plex console.
When the async parameter is set to 1, the status code will be returned immediately, but the command will still be running on the server. By setting the async parameter to 0, the status won't be returned until the command has completed running on the server.
Delete the library associated with ID 18 from the Plex Media Server located at the IP address of 192.168.1.4: