Create NotificationDestination
curl --request POST \
--url https://api.ravion.com/notification-destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"config": {
"channel_id": "<string>",
"channel_name": "<string>",
"kind": "SLACK_CHANNEL",
"slack_connection_id": "<string>"
},
"enabled": true,
"label": "<string>",
"connectionId": "<string>"
}
}
'import requests
url = "https://api.ravion.com/notification-destinations"
payload = { "data": {
"config": {
"channel_id": "<string>",
"channel_name": "<string>",
"kind": "SLACK_CHANNEL",
"slack_connection_id": "<string>"
},
"enabled": True,
"label": "<string>",
"connectionId": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
config: {
channel_id: '<string>',
channel_name: '<string>',
kind: 'SLACK_CHANNEL',
slack_connection_id: '<string>'
},
enabled: true,
label: '<string>',
connectionId: '<string>'
}
})
};
fetch('https://api.ravion.com/notification-destinations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ravion.com/notification-destinations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'config' => [
'channel_id' => '<string>',
'channel_name' => '<string>',
'kind' => 'SLACK_CHANNEL',
'slack_connection_id' => '<string>'
],
'enabled' => true,
'label' => '<string>',
'connectionId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ravion.com/notification-destinations"
payload := strings.NewReader("{\n \"data\": {\n \"config\": {\n \"channel_id\": \"<string>\",\n \"channel_name\": \"<string>\",\n \"kind\": \"SLACK_CHANNEL\",\n \"slack_connection_id\": \"<string>\"\n },\n \"enabled\": true,\n \"label\": \"<string>\",\n \"connectionId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.ravion.com/notification-destinations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"config\": {\n \"channel_id\": \"<string>\",\n \"channel_name\": \"<string>\",\n \"kind\": \"SLACK_CHANNEL\",\n \"slack_connection_id\": \"<string>\"\n },\n \"enabled\": true,\n \"label\": \"<string>\",\n \"connectionId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/notification-destinations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"config\": {\n \"channel_id\": \"<string>\",\n \"channel_name\": \"<string>\",\n \"kind\": \"SLACK_CHANNEL\",\n \"slack_connection_id\": \"<string>\"\n },\n \"enabled\": true,\n \"label\": \"<string>\",\n \"connectionId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"config": {
"channel_id": "<string>",
"channel_name": "<string>",
"kind": "SLACK_CHANNEL",
"slack_connection_id": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"createdById": "<string>",
"enabled": true,
"id": "<string>",
"kind": "SLACK_CHANNEL",
"label": "<string>",
"organizationId": "<string>",
"status": "ACTIVE",
"updatedAt": "2023-11-07T05:31:56Z",
"connectionId": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}NotificationDestinations
Create NotificationDestination
Create a notification destination. POST /notification-destinations in the Ravion API reference.
POST
/
notification-destinations
Create NotificationDestination
curl --request POST \
--url https://api.ravion.com/notification-destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"config": {
"channel_id": "<string>",
"channel_name": "<string>",
"kind": "SLACK_CHANNEL",
"slack_connection_id": "<string>"
},
"enabled": true,
"label": "<string>",
"connectionId": "<string>"
}
}
'import requests
url = "https://api.ravion.com/notification-destinations"
payload = { "data": {
"config": {
"channel_id": "<string>",
"channel_name": "<string>",
"kind": "SLACK_CHANNEL",
"slack_connection_id": "<string>"
},
"enabled": True,
"label": "<string>",
"connectionId": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
config: {
channel_id: '<string>',
channel_name: '<string>',
kind: 'SLACK_CHANNEL',
slack_connection_id: '<string>'
},
enabled: true,
label: '<string>',
connectionId: '<string>'
}
})
};
fetch('https://api.ravion.com/notification-destinations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ravion.com/notification-destinations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'config' => [
'channel_id' => '<string>',
'channel_name' => '<string>',
'kind' => 'SLACK_CHANNEL',
'slack_connection_id' => '<string>'
],
'enabled' => true,
'label' => '<string>',
'connectionId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ravion.com/notification-destinations"
payload := strings.NewReader("{\n \"data\": {\n \"config\": {\n \"channel_id\": \"<string>\",\n \"channel_name\": \"<string>\",\n \"kind\": \"SLACK_CHANNEL\",\n \"slack_connection_id\": \"<string>\"\n },\n \"enabled\": true,\n \"label\": \"<string>\",\n \"connectionId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.ravion.com/notification-destinations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"config\": {\n \"channel_id\": \"<string>\",\n \"channel_name\": \"<string>\",\n \"kind\": \"SLACK_CHANNEL\",\n \"slack_connection_id\": \"<string>\"\n },\n \"enabled\": true,\n \"label\": \"<string>\",\n \"connectionId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/notification-destinations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"config\": {\n \"channel_id\": \"<string>\",\n \"channel_name\": \"<string>\",\n \"kind\": \"SLACK_CHANNEL\",\n \"slack_connection_id\": \"<string>\"\n },\n \"enabled\": true,\n \"label\": \"<string>\",\n \"connectionId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"config": {
"channel_id": "<string>",
"channel_name": "<string>",
"kind": "SLACK_CHANNEL",
"slack_connection_id": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"createdById": "<string>",
"enabled": true,
"id": "<string>",
"kind": "SLACK_CHANNEL",
"label": "<string>",
"organizationId": "<string>",
"status": "ACTIVE",
"updatedAt": "2023-11-07T05:31:56Z",
"connectionId": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}Body
application/json
Request body for creating resources, excluding read-only properties
Filters a model to only include properties visible during Create lifecycle.
Show child attributes
Show child attributes
Response
The request has succeeded and a new resource has been created as a result.
Show child attributes
Show child attributes
Was this page helpful?