API - Obtaining series ID

I’m trying to run a curl command to toggle the monitored status of particular episodes. I’ve been able to get the required information from the environment variables but it seems you also need an ID that isn’t supplied.

For example, setting the monitored status for an episode of The Americans requires that “id”:2481 be present within the command. Is there way to get this number for each show using the data supplied by the script variables?

Thanks.

The ID is provided as an environment variable.

|Environment Variable |Details|
|sonarr_series_id |Internal ID of the series|

If you want a stand-alone query, you can just request the API to dump all the series. Below is an example for a specific show request, if you want to do a more specific query

Do you need to have ‘Completed Download Handling’ for the ‘On Download’ connect script to work? I tried echoing those variables as I do for my ‘On Grab’ script but nothing happened.

I would expect so, as sonarr doesn’t check the download status otherwise.

If you have your download client trigger the post processing imho it would be nearly impossible to map it to the series ID as the download client cannot provide correct information to map to one of the items the series api can provide.

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