Skip to main content
POST
/
api
/
v1
/
config
/
notifiers
cURL
curl --request POST \
  --url https://{tenant}.chronosphere.io/api/v1/config/notifiers \
  --header 'API-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://{tenant}.chronosphere.io/api/v1/config/notifiers"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("API-Token", "<api-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{tenant}.chronosphere.io/api/v1/config/notifiers")
  .header("API-Token", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
const options = {
  method: 'POST',
  headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({})
};

fetch('https://{tenant}.chronosphere.io/api/v1/config/notifiers', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://{tenant}.chronosphere.io/api/v1/config/notifiers"

payload = {}
headers = {
    "API-Token": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "notifier": {
    "name": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "discard": true,
    "email": {
      "html": "<string>",
      "text": "<string>",
      "to": "<string>"
    },
    "ops_genie": {
      "api_key": "<string>",
      "api_url": "https://api.opsgenie.com/",
      "description": "<string>",
      "details": {},
      "http_config": {
        "basic_auth": {
          "password": "<string>",
          "username": "<string>"
        },
        "bearer_token": "<string>",
        "proxy_url": "<string>",
        "tls_config": {
          "insecure_skip_verify": true
        }
      },
      "message": "<string>",
      "note": "<string>",
      "priority": "<string>",
      "responders": [
        {
          "id": "<string>",
          "name": "<string>",
          "username": "<string>"
        }
      ],
      "source": "<string>",
      "tags": "<string>"
    },
    "pagerduty": {
      "class": "<string>",
      "client": "<string>",
      "client_url": "<string>",
      "component": "<string>",
      "description": "<string>",
      "details": {},
      "group": "<string>",
      "http_config": {
        "basic_auth": {
          "password": "<string>",
          "username": "<string>"
        },
        "bearer_token": "<string>",
        "proxy_url": "<string>",
        "tls_config": {
          "insecure_skip_verify": true
        }
      },
      "images": [
        {
          "alt": "<string>",
          "href": "<string>",
          "src": "<string>"
        }
      ],
      "links": [
        {
          "href": "<string>",
          "text": "<string>"
        }
      ],
      "routing_key": "<string>",
      "service_key": "<string>",
      "severity": "<string>",
      "url": "<string>"
    },
    "skip_resolved": true,
    "slack": {
      "actions": [
        {
          "confirm_field": {
            "dismiss_text": "<string>",
            "ok_text": "<string>",
            "text": "<string>",
            "title": "<string>"
          },
          "name": "<string>",
          "style": "<string>",
          "text": "<string>",
          "type": "<string>",
          "url": "<string>",
          "value": "<string>"
        }
      ],
      "api_url": "<string>",
      "callback_id": "<string>",
      "channel": "<string>",
      "color": "<string>",
      "fallback": "<string>",
      "fields": [
        {
          "short": true,
          "title": "<string>",
          "value": "<string>"
        }
      ],
      "footer": "<string>",
      "http_config": {
        "basic_auth": {
          "password": "<string>",
          "username": "<string>"
        },
        "bearer_token": "<string>",
        "proxy_url": "<string>",
        "tls_config": {
          "insecure_skip_verify": true
        }
      },
      "icon_emoji": "<string>",
      "icon_url": "<string>",
      "image_url": "<string>",
      "link_names": true,
      "mrkdwn_in": [
        "<string>"
      ],
      "pretext": "<string>",
      "short_fields": true,
      "text": "<string>",
      "thumb_url": "<string>",
      "title": "<string>",
      "title_link": "<string>",
      "username": "<string>"
    },
    "slug": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "victor_ops": {
      "api_key": "<string>",
      "api_url": "<string>",
      "custom_fields": {},
      "entity_display_name": "<string>",
      "http_config": {
        "basic_auth": {
          "password": "<string>",
          "username": "<string>"
        },
        "bearer_token": "<string>",
        "proxy_url": "<string>",
        "tls_config": {
          "insecure_skip_verify": true
        }
      },
      "message_type": "<string>",
      "monitoring_tool": "<string>",
      "routing_key": "<string>",
      "state_message": "<string>"
    },
    "webhook": {
      "http_config": {
        "basic_auth": {
          "password": "<string>",
          "username": "<string>"
        },
        "bearer_token": "<string>",
        "proxy_url": "<string>",
        "tls_config": {
          "insecure_skip_verify": true
        }
      },
      "url": "<string>"
    }
  }
}
{
  "message": "<string>"
}
{
  "message": "<string>"
}
{
  "message": "<string>"
}
{}

Authorizations

API-Token
string
header
required

Chronosphere API token

Body

application/json
dry_run
boolean

If true, validates the specified configuration without creating the Notifier. If the specified configuration is valid, the endpoint returns a partial response without the Notifier. If the specified configuration is invalid, the endpoint returns an error.

notifier
object

The Notifier to create.

Response

A successful response containing the created Notifier.

notifier
object