API bug? DownloadedEpisodesScan not accepting path

Hi!

I have a NAS where my drone factory is \\10.9.0.5\Storage\TV\Drone.
Files import beautifully from there.
If I try with a mapped network drive it doesn’t work - but I’ve read about that, and it is a separate issue.

On my NAS (called 10.9.0.5) I send a request to the Sonarr-server on my network as below.

Command:

curl -o ~/sonarr.log -u mescon:password -X POST -H "X-Api-Key: MyAPIKeyHere" -H "Content-Type: application/json" -d '{"name": "downloadedepisodesscan", "path": "\\\\10.9.0.5\\Storage\\Staging\\complete\\sonarr\\"}' http://10.9.0.11:8989/api/command

Response:

{
"name": "DownloadedEpisodesScan",
"startedOn": "0001-01-01T00:00:00Z",
"stateChangeTime": "2015-03-26T17:49:44.7047649Z",
"sendUpdatesToClient": false,
"state": "pending",
"manual": true,
"id": 31707
}

Because this is JSON, I must escape any backslash with another backslash, so \\10.9.0.5\ becomes \\\\10.9.0.5\
The Sonarr user can read the directory without problem. If I specify that path as “Watch Folder” when configuring “Download Client”, the episodes import just fine, but I want to manually trigger the scan in this directory.
When I supply the path from a script to initiate scan manually, nothing ever happens, despite the above output.

The logs indicate no errors at all. If I try with a network mapped drive, it says the path does not exist (another issue, I know).

Whenever I have tried a path that does not exist, I get instant errors (as expected) in the logs.

Am I doing something wrong here, or is there a bug somewhere preventing me from actually setting the path to be scanned?

Any support would be much appreciated!
Thank you!

Enable Trace log in Sonarr to see it happen. might see some interesting stuff logged at Debug/Trace level telling you what happened.

Please note the DownloadedEpisodesScan is asynchronous, use the id (31707 in the above example) to get the current status: /api/command/31707

Thanks, didn’t think of that.
It seems that the path passed correctly into Sonarr… and just now, it moved a testfile I put in that directory… it might have been that the file I had before didn’t translate into a releasename that Sonarr could identify.

I’ll report back again if I see a pattern.

Thanks again for your help!

You could close this issue - turns out I had spelled the function name wrong. So sorry about that!

tnx for letting me know that it’s resolved.