1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-21 23:33:00 +00:00
9 Webhook
bakerboy448 edited this page 2022-02-28 06:44:45 -06:00

Note: this is the Legacy v2 Wiki. The new V3 Wiki can be found at the Servarr Wiki. Sonarr v2 is end of life and not supported.

If you're looking to notify a web service to indicate when Sonarr has done things, you can find more details here:

Overview

Sonarr can notify a web service using POST or PUT when new episodes are imported, renamed, or grabbed.

Parameters are passed to the web service as a JSON body.

Representative payloads for each event type are below. There is also a JSON schema available.

Example Payload

On Grab
{
    "eventType": "Grab",
    "series": {
        "id": 2,
        "title": "Gravity Falls",
        "path": "C:\\Temp\\sonarr\\Gravity Falls",
        "tvdbId": 259972
    },
    "episodes": [
        {
            "id": 67,
            "episodeNumber": 14,
            "seasonNumber": 2,
            "title": "The Stanchurian Candidate",
            "airDate": "2015-08-24",
            "airDateUtc": "2015-08-25T01:30:00Z",
            "quality": "HDTV-720p",
            "qualityVersion": 1
        }
    ],
    "release": {
        "quality": "HDTV-720p",
        "qualityVersion": 1,
        "size": 0
    }
}
On Download/On Upgrade
{
    "eventType": "Download",
    "series": {
        "id": 2,
        "title": "Gravity Falls",
        "path": "C:\\Temp\\sonarr\\Gravity Falls",
        "tvdbId": 259972
    },
    "episodes": [
        {
            "id": 67,
            "episodeNumber": 14,
            "seasonNumber": 2,
            "title": "The Stanchurian Candidate",
            "airDate": "2015-08-24",
            "airDateUtc": "2015-08-25T01:30:00Z",
            "quality": "HDTV-720p",
            "qualityVersion": 1
        }
    ],
    "episodeFile": {
        "id": 1181,
        "relativePath": "Season 02\\Gravity Falls - s02e14.mkv",
        "path": "C:\\path\\to\\file\\GravityFalls - s02e14.mkv",
        "quality": "HDTV-720p",
        "qualityVersion": 1
    },
    "isUpgrade": false
}
On Rename
{
    "eventType": "Rename",
    "series": {
        "id": 2,
        "title": "Gravity Falls",
        "path": "C:\\Temp\\sonarr\\Gravity Falls",
        "tvdbId": 259972
    }
}
On Test
{
    "eventType": "Test",
    "series": {
        "id": 1,
        "title": "Test Title",
        "path": "C:\\testpath",
        "tvdbId": 1234
    },
    "episodes": [
        {
            "id": 123,
            "episodeNumber": 1,
            "seasonNumber": 1,
            "title": "Test title",
            "qualityVersion": 0
        }
    ]
}
Sample/Example Apps/Usage

Hubot Integration