Refresh endpoint PUT/POST requests started throwing 404s in version 1.32.7.7484

Server Version#: 1.32.7.7484

I updated PMS to the latest Plex Pass Beta and noticed that I am now getting 404s when trying to send a request to PMS to scan a specific path using either PUT or POST requests, though GET still works. This broke on just this update, was working fine as is before. Is this an intentional change?

Sep 14, 2023 17:04:08.042 [139843122363192] INFO - Request: [172.20.0.9:37842 (Subnet)] PUT /library/sections/2/refresh?path=%2Fmnt%2Fmedia%2FMovies%2FTheater+Camp+%282023%29 (11 live) #1fb58 GZIP Signed-in Token (rg9400) (Stormlight)

Sep 14, 2023 17:04:08.043 [139843208653624] INFO - Completed: [172.20.0.9:37842] 404 PUT /library/sections/2/refresh?path=%2Fmnt%2Fmedia%2FMovies%2FTheater+Camp+%282023%29 (11 live) #1fb58 GZIP 1ms 379 bytes (pipelined: 2)

It’s still working for me with a GET request. PUT is used for refreshing metadata for an item, but I’ve always used GET for scanning.

So yes, GET requests still work. But PUT requests used to work, and I am not sure if this was intentionally broken in this version, but the same path no longer works with that type of request. Regardless, 404 is the wrong error to throw if the method is no longer supported.

Yeah, I would expect Plex to return a 405 + Allow header, but it always returns 404 for invalid methods (on all endpoints as far as I can tell).

Happening here too.

I use curl -X PUT with URLEncoded path. Been doing that for a long time with no problems but now I get:

<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>

This is on Windows 11

Edit: Seems like curl -X GET is working.

PUT is still working with emptyTrash.

There has been a large ongoing refactor to our request handling code, this specific endpoint was never meant to use PUT requests but due to how our legacy code handled things it would be allowed.

Nowhere in our documentation (https://support.plex.tv/articles/201638786-plex-media-server-url-commands/) do we mention using PUTs for these requests nor do any of our official clients use PUTs here so it may have just been the wrong information being passed on through forums that lead to people using it like this.

GET is the correct method to use for the /refresh endpoint.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.