diff --git a/templates/front/docs_api.html b/templates/front/docs_api.html index 36a61799..35dd6636 100644 --- a/templates/front/docs_api.html +++ b/templates/front/docs_api.html @@ -203,11 +203,14 @@ To create a "cron" check, specify the "schedule" and "tz" parameters.
string, optional, default value: ""
+string, optional
By default, if a check is created through API, no notification channels are assigned to it. So, when the check goes up or down, - no notifications would be sent. Set this field to a special value "*" + no notifications will get sent.
+Set this field to a special value "*" to automatically assign all existing notification channels.
+To assign specific notification channels, use a comma-separated + list of channel identifiers.
Set this field to a special value "" (empty string) to automatically unassign all notification channels.
+Set this field to a comma-separated list of channel identifiers + to assign specific notification channels. +
+Example:
+{"channels": "4ec5a071-2d08-4baa-898a-eb4eb3cd6941,746a083e-f542-4554-be1a-707ce16d3acc"}
{
+ "channels": "",
"grace": 60,
"last_ping": null,
"n_pings": 0,
diff --git a/templates/front/snippets/create_check_response.txt b/templates/front/snippets/create_check_response.txt
index 4e9bafa4..26caca1f 100644
--- a/templates/front/snippets/create_check_response.txt
+++ b/templates/front/snippets/create_check_response.txt
@@ -1,4 +1,5 @@
{
+ "channels": "",
"grace": 60,
"last_ping": null,
"n_pings": 0,
diff --git a/templates/front/snippets/list_checks_response.html b/templates/front/snippets/list_checks_response.html
index 22093448..0ae95302 100644
--- a/templates/front/snippets/list_checks_response.html
+++ b/templates/front/snippets/list_checks_response.html
@@ -1,30 +1,32 @@
{
"checks": [
{
+ "channels": "4ec5a071-2d08-4baa-898a-eb4eb3cd6941,746a083e-f542-4554-be1a-707ce16d3acc"
+ "grace": 900,
"last_ping": "2017-01-04T13:24:39.903464+00:00",
- "ping_url": "{{ PING_ENDPOINT }}662ebe36-ecab-48db-afe3-e20029cb71e6",
- "next_ping": "2017-01-04T14:24:39.903464+00:00",
- "grace": 900,
- "name": "Api test 1",
"n_pings": 1,
- "tags": "foo",
+ "name": "Api test 1",
+ "next_ping": "2017-01-04T14:24:39.903464+00:00",
"pause_url": "{{ SITE_ROOT }}/api/v1/checks/662ebe36-ecab-48db-afe3-e20029cb71e6/pause",
- "timeout": 3600,
+ "ping_url": "{{ PING_ENDPOINT }}662ebe36-ecab-48db-afe3-e20029cb71e6",
"status": "up",
+ "tags": "foo",
+ "timeout": 3600,
"update_url": "{{ SITE_ROOT }}/api/v1/checks/662ebe36-ecab-48db-afe3-e20029cb71e6"
},
{
- "last_ping": null,
- "ping_url": "{{ PING_ENDPOINT }}9d17c61f-5c4f-4cab-b517-11e6b2679ced",
- "next_ping": null,
+ "channels": "",
"grace": 3600,
- "name": "Api test 2",
+ "last_ping": null,
"n_pings": 0,
- "tags": "bar baz",
+ "name": "Api test 2",
+ "next_ping": null,
"pause_url": "{{ SITE_ROOT }}/api/v1/checks/9d17c61f-5c4f-4cab-b517-11e6b2679ced/pause",
- "tz": "UTC",
+ "ping_url": "{{ PING_ENDPOINT }}9d17c61f-5c4f-4cab-b517-11e6b2679ced",
"schedule": "0/10 * * * *",
"status": "new",
+ "tags": "bar baz",
+ "tz": "UTC",
"update_url": "{{ SITE_ROOT }}/api/v1/checks/9d17c61f-5c4f-4cab-b517-11e6b2679ced"
}
]
diff --git a/templates/front/snippets/list_checks_response.txt b/templates/front/snippets/list_checks_response.txt
index 320cf213..b4f33a9f 100644
--- a/templates/front/snippets/list_checks_response.txt
+++ b/templates/front/snippets/list_checks_response.txt
@@ -1,30 +1,32 @@
{
"checks": [
{
- "last_ping": "2017-01-04T13:24:39.903464+00:00",
- "ping_url": "PING_ENDPOINT662ebe36-ecab-48db-afe3-e20029cb71e6",
- "next_ping": "2017-01-04T14:24:39.903464+00:00",
+ "channels": "4ec5a071-2d08-4baa-898a-eb4eb3cd6941,746a083e-f542-4554-be1a-707ce16d3acc"
"grace": 900,
- "name": "Api test 1",
+ "last_ping": "2017-01-04T13:24:39.903464+00:00",
"n_pings": 1,
- "tags": "foo",
+ "name": "Api test 1",
+ "next_ping": "2017-01-04T14:24:39.903464+00:00",
"pause_url": "SITE_ROOT/api/v1/checks/662ebe36-ecab-48db-afe3-e20029cb71e6/pause",
- "timeout": 3600,
+ "ping_url": "PING_ENDPOINT662ebe36-ecab-48db-afe3-e20029cb71e6",
"status": "up",
+ "tags": "foo",
+ "timeout": 3600,
"update_url": "SITE_ROOT/api/v1/checks/662ebe36-ecab-48db-afe3-e20029cb71e6"
},
{
- "last_ping": null,
- "ping_url": "PING_ENDPOINT9d17c61f-5c4f-4cab-b517-11e6b2679ced",
- "next_ping": null,
+ "channels": "",
"grace": 3600,
- "name": "Api test 2",
+ "last_ping": null,
"n_pings": 0,
- "tags": "bar baz",
+ "name": "Api test 2",
+ "next_ping": null,
"pause_url": "SITE_ROOT/api/v1/checks/9d17c61f-5c4f-4cab-b517-11e6b2679ced/pause",
- "tz": "UTC",
+ "ping_url": "PING_ENDPOINT9d17c61f-5c4f-4cab-b517-11e6b2679ced",
"schedule": "0/10 * * * *",
"status": "new",
+ "tags": "bar baz",
+ "tz": "UTC",
"update_url": "SITE_ROOT/api/v1/checks/9d17c61f-5c4f-4cab-b517-11e6b2679ced"
}
]