Webhook

kaotik4266 edited this page Jul 9, 2017 · 8 revisions

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

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.