Run Refresh Libraries Task

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

URL

POST http://[IP address]:32400/butler/RefreshLibraries?X-Plex-Token=[PlexToken]

Parameters

NameDescription
IP addressThe IP address of the Plex Media server.
PlexTokenThe authentication Plex token.

Return Status

HTTP CodeDescription
200Success - The task has started successfully.
202Accepted - The task is currently running.
401Unauthorized - The Plex token provided was not valid.

Response

No response is returned by the command. The status code will indicate whether the refresh libraries task was started successfully.

Remarks

The scheduled tasks are defined in the Plex settings, and will run during a specified time window. This API command will run manually start the task.

When starting a task, Plex will use the following criteria:

  • If a task is not scheduled to run on the current day, it will be skipped.
  • The task will start immediately if it is to run at a random time during a configured window, and this command is not run within that window.
  • The task will be scheduled to run if it is to run at a random time during a configured window, and this command is run within that window.
  • The task will run immediately if it is outside the configured window.

Examples

Example 1

Runs the refresh libraries scheduled task on the Plex Media Server located at the IP address of 192.168.1.4:

POST http://192.168.1.4:32400/butler/RefreshLibraries?X-Plex-Token=L6vkd7JtLHjsH5987vYY
Subscribe

If you would like to keep up to date on the articles, API commands, or blog posts that are published, feel free to subscribe.