Skip to content

Webhooks

Bartosz Radliński edited this page May 14, 2018 · 20 revisions

Actions

NoImprovementAction

Parameter Values Description
type NO_IMPROVEMENT Action type
period DAILY The period that is taken into account when checking for improvement (DAILY - check only last 24h)
severity blockers, crticals, majors, minors, infos The severity that is taken into account when checking for improvement

Response keys:

  • no_improvement - there was no improvement in given period
  • improvement - there was an improvement in given period
  • clean - no issues at all

example:

{
    "type": "NO_IMPROVEMENT",
    "period": "DAILY",
    "severity": [
        "blockers",
        "criticals",
        "majors"
    ]
}

Triggers

CronTrigger

Parameter Values Description
type CRON Trigger type
definition cron rule trigger action in given period (0 0 12 * * * - triggers action at 12:00)

RestTrigger

Parameter Values Description
type REST Trigger type
method POST, GET defines which REST method should be used
endpoint endpoint address defines trigger endpoint

Callbacks

JSONCallback

Parameter Values Description
type JSON Callback type
body response map response body (JSON format)

PostCallback

Parameter Values Description
type POST Callback type
body responses map request body
url url address call POST on given url

Every callback body should define response for every possible action result. example:

{
...
"body": {
    "no_improvement": "{ 'text': 'http://gph.is/1RFg2r3 E, sonar sam sie nie zrobi'}",
    "improvement": "{ 'text': 'http://gph.is/1a7RlDR Kutos dle tego co poprawił sonarki'}",
    "clean": "{ 'text': 'https://gph.is/1IH3RW6 Kutos dla zespołu za wyczyszczenie sonarków'}"
}
...
}