Using curl and the api key

I am trying to use the api key with curl to get some data about my shows and possibly to some things in bulk that the UI doesn’t provide.

Right now I can successfully get the entire json blog of a series with a command like the following:

curl -H "X-Api-Key: MYKEY" -X GET -H "get/422" https://MYURL/api/series/   

What I would like to do is get specific information on a series (or on all series). For example, I would like to get the ID and name for every series that has “fooBAR” in the path so that I could then mark this series to be deleted from Sonarr’s database. Is this possible vi the API or do I have to get the entire blog for all the series and then parse the JSON results?

(I have a lot of really old TV shows and once I got them all arranged and such in Sonarr I want to remove them so that things like the Mythbuster tvDB apocalypse do not happen. Since the series will never have new episodes, I don’t need them cluttering my list in the UI).

(I am accessing sonar from a freeBSD machine without a GUI, so I am ⌘-line only for this. If I have to parse the JSON, are there good CLI tools to do this?

Just use the mass editor? You can sort by path, mark them, delete…
Using/learning the api probably takes longer :slight_smile:

Aaaand missed the part about command-line only. Why not access sonarr’s gui from another machine?

I can take a laptop in at some point, but until then I don’t have any way of accessing the GUI remotely.

Even so, manually clicking a hundred or more boxes… ugh.

edit: Is there even an option to delete them in the mass editor?

Edit2: No, it looks like this has been. feature request at least as far back as 2013 or so but has never been added, the only ways to delete are to click gear, click, delete, click delete, wait. Repeat for every show. Or use the API.

in v3, there is…

Has that been released? I was under the impression ist was a beta?

It’s a beta in the sense that the -develop branch of v2 is a beta, in my opinion it’s working like a charm…

All right, I’ll talke a look. Thanks

Edit: are run running it in a docker? I see lsiodev/sonarr-preview but it is marked deprecated and linuxserver/sonarr-preview returns no results.

Docker Search

I’m using this one: https://hub.docker.com/r/linuxserver/sonarr
There’s another docker for v3 mentioned on the sonarr website, but I have no experience with it: https://sonarr.tv/#downloads-v3-docker

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