From f1a422c51b046c79a064a114056590259911c290 Mon Sep 17 00:00:00 2001 From: Gavin Mogan Date: Tue, 25 Aug 2015 22:21:16 -0700 Subject: [PATCH] Created Webhook (markdown) --- Webhook.md | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Webhook.md diff --git a/Webhook.md b/Webhook.md new file mode 100644 index 0000000..ada5aab --- /dev/null +++ b/Webhook.md @@ -0,0 +1,75 @@ +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 webservice using POST or PUT when new episodes are imported, a series is renamed, or new files are grabbed. + +Parameters are passed to the webservice using a JSON body + +### Example Outputs ### + +##### On Download/On Upgrade ##### + +` +{ + "EventType": "Download", + "Series": { + "Id": 2, + "Title": "Gravity Falls", + "Path": "C:\\Temp\\sonarr\\Gravity Falls", + "TvdbId": 259972 + }, + "EpisodeFile": { + "Id": 1, + "FullPath": "C:\\Temp\\sonarr\\Gravity Falls\\Season 2\\Gravity Falls - S02E14 - The Stanchurian Candidate.mkv", + "RelativePath": "Season 2\\Gravity Falls - S02E14 - The Stanchurian Candidate.mkv", + "SeasonNumber": 2, + "Episodes": [ + { + "AirDate": null, + "AirDateUtc": null, + "EpisodeNumber": 0 + } + ], + "Quality": "HDTV-720p", + "QualityVersion": "1", + "ReleaseGroup": "", + "SceneName": "" + }, + "Episode": null +} +` + +##### On Grab ##### +` +{ + "EventType": "Grab", + "Series": { + "Id": 2, + "Title": "Gravity Falls", + "Path": "C:\\Temp\\sonarr\\Gravity Falls", + "TvdbId": 259972 + }, + "EpisodeFile": null, + "Episode": { + "AirDate": "2015-08-24", + "AirDateUtc": "2015-08-25T01:30:00Z", + "EpisodeNumber": 14 + } +} +` + +##### On Rename ##### +` +{ + "EventType": "Rename", + "Series": { + "Id": 2, + "Title": "Gravity Falls", + "Path": "C:\\Temp\\sonarr\\Gravity Falls", + "TvdbId": 259972 + }, + "EpisodeFile": null, + "Episode": null +} +` \ No newline at end of file