alertsChangeGet
Edit or insert new alert
/alerts_change
Usage and SDK Samples
curl -X GET\
-H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://api.discoversnoop.com/alerts_change?id=&alertname=&activated=&type=&channel=&recipient=¶m1=¶m2=¶m3=¶m4=¶m5=¶m6="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AlertsApi;
import java.io.File;
import java.util.*;
public class AlertsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
AlertsApi apiInstance = new AlertsApi();
String id = id_example; // String | ID of the alert to edit ; if adding a new one leave blank
String alertname = alertname_example; // String | Name of the alert
Boolean activated = true; // Boolean | Should the alert be activated or not
Integer type = 56; // Integer | Alert type (1= New content for website, 2=New performing contents), 3=New contents in category
Integer channel = 56; // Integer | 1 for email, 2 for Slack, 3 for Google Chat, 4 for JSON
String recipient = recipient_example; // String | Email address of recipient or webhook for Slack/Gchat or JSON endpoint
String param1 = param1_example; // String | Parameter 1 (meaning changes with alert type)
String param2 = param2_example; // String | Parameter 2 (meaning changes with alert type)
String param3 = param3_example; // String | Parameter 3 (meaning changes with alert type)
String param4 = param4_example; // String | Parameter 4 (meaning changes with alert type)
String param5 = param5_example; // String | Parameter 5 (meaning changes with alert type)
String param6 = param6_example; // String | Parameter 6 (meaning changes with alert type)
try {
array[Domains] result = apiInstance.alertsChangeGet(id, alertname, activated, type, channel, recipient, param1, param2, param3, param4, param5, param6);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlertsApi#alertsChangeGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AlertsApi;
public class AlertsApiExample {
public static void main(String[] args) {
AlertsApi apiInstance = new AlertsApi();
String id = id_example; // String | ID of the alert to edit ; if adding a new one leave blank
String alertname = alertname_example; // String | Name of the alert
Boolean activated = true; // Boolean | Should the alert be activated or not
Integer type = 56; // Integer | Alert type (1= New content for website, 2=New performing contents), 3=New contents in category
Integer channel = 56; // Integer | 1 for email, 2 for Slack, 3 for Google Chat, 4 for JSON
String recipient = recipient_example; // String | Email address of recipient or webhook for Slack/Gchat or JSON endpoint
String param1 = param1_example; // String | Parameter 1 (meaning changes with alert type)
String param2 = param2_example; // String | Parameter 2 (meaning changes with alert type)
String param3 = param3_example; // String | Parameter 3 (meaning changes with alert type)
String param4 = param4_example; // String | Parameter 4 (meaning changes with alert type)
String param5 = param5_example; // String | Parameter 5 (meaning changes with alert type)
String param6 = param6_example; // String | Parameter 6 (meaning changes with alert type)
try {
array[Domains] result = apiInstance.alertsChangeGet(id, alertname, activated, type, channel, recipient, param1, param2, param3, param4, param5, param6);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlertsApi#alertsChangeGet");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
String *id = id_example; // ID of the alert to edit ; if adding a new one leave blank
String *alertname = alertname_example; // Name of the alert
Boolean *activated = true; // Should the alert be activated or not
Integer *type = 56; // Alert type (1= New content for website, 2=New performing contents), 3=New contents in category
Integer *channel = 56; // 1 for email, 2 for Slack, 3 for Google Chat, 4 for JSON
String *recipient = recipient_example; // Email address of recipient or webhook for Slack/Gchat or JSON endpoint
String *param1 = param1_example; // Parameter 1 (meaning changes with alert type) (optional)
String *param2 = param2_example; // Parameter 2 (meaning changes with alert type) (optional)
String *param3 = param3_example; // Parameter 3 (meaning changes with alert type) (optional)
String *param4 = param4_example; // Parameter 4 (meaning changes with alert type) (optional)
String *param5 = param5_example; // Parameter 5 (meaning changes with alert type) (optional)
String *param6 = param6_example; // Parameter 6 (meaning changes with alert type) (optional)
AlertsApi *apiInstance = [[AlertsApi alloc] init];
// Edit or insert new alert
[apiInstance alertsChangeGetWith:id
alertname:alertname
activated:activated
type:type
channel:channel
recipient:recipient
param1:param1
param2:param2
param3:param3
param4:param4
param5:param5
param6:param6
completionHandler: ^(array[Domains] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var DiscoverSnoop = require('discover_snoop');
var defaultClient = DiscoverSnoop.ApiClient.instance;
var api = new DiscoverSnoop.AlertsApi()
var id = id_example; // {{String}} ID of the alert to edit ; if adding a new one leave blank
var alertname = alertname_example; // {{String}} Name of the alert
var activated = true; // {{Boolean}} Should the alert be activated or not
var type = 56; // {{Integer}} Alert type (1= New content for website, 2=New performing contents), 3=New contents in category
var channel = 56; // {{Integer}} 1 for email, 2 for Slack, 3 for Google Chat, 4 for JSON
var recipient = recipient_example; // {{String}} Email address of recipient or webhook for Slack/Gchat or JSON endpoint
var opts = {
'param1': param1_example, // {{String}} Parameter 1 (meaning changes with alert type)
'param2': param2_example, // {{String}} Parameter 2 (meaning changes with alert type)
'param3': param3_example, // {{String}} Parameter 3 (meaning changes with alert type)
'param4': param4_example, // {{String}} Parameter 4 (meaning changes with alert type)
'param5': param5_example, // {{String}} Parameter 5 (meaning changes with alert type)
'param6': param6_example // {{String}} Parameter 6 (meaning changes with alert type)
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.alertsChangeGet(id, alertname, activated, type, channel, recipient, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class alertsChangeGetExample
{
public void main()
{
var apiInstance = new AlertsApi();
var id = id_example; // String | ID of the alert to edit ; if adding a new one leave blank
var alertname = alertname_example; // String | Name of the alert
var activated = true; // Boolean | Should the alert be activated or not
var type = 56; // Integer | Alert type (1= New content for website, 2=New performing contents), 3=New contents in category
var channel = 56; // Integer | 1 for email, 2 for Slack, 3 for Google Chat, 4 for JSON
var recipient = recipient_example; // String | Email address of recipient or webhook for Slack/Gchat or JSON endpoint
var param1 = param1_example; // String | Parameter 1 (meaning changes with alert type) (optional)
var param2 = param2_example; // String | Parameter 2 (meaning changes with alert type) (optional)
var param3 = param3_example; // String | Parameter 3 (meaning changes with alert type) (optional)
var param4 = param4_example; // String | Parameter 4 (meaning changes with alert type) (optional)
var param5 = param5_example; // String | Parameter 5 (meaning changes with alert type) (optional)
var param6 = param6_example; // String | Parameter 6 (meaning changes with alert type) (optional)
try
{
// Edit or insert new alert
array[Domains] result = apiInstance.alertsChangeGet(id, alertname, activated, type, channel, recipient, param1, param2, param3, param4, param5, param6);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AlertsApi.alertsChangeGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAlertsApi();
$id = id_example; // String | ID of the alert to edit ; if adding a new one leave blank
$alertname = alertname_example; // String | Name of the alert
$activated = true; // Boolean | Should the alert be activated or not
$type = 56; // Integer | Alert type (1= New content for website, 2=New performing contents), 3=New contents in category
$channel = 56; // Integer | 1 for email, 2 for Slack, 3 for Google Chat, 4 for JSON
$recipient = recipient_example; // String | Email address of recipient or webhook for Slack/Gchat or JSON endpoint
$param1 = param1_example; // String | Parameter 1 (meaning changes with alert type)
$param2 = param2_example; // String | Parameter 2 (meaning changes with alert type)
$param3 = param3_example; // String | Parameter 3 (meaning changes with alert type)
$param4 = param4_example; // String | Parameter 4 (meaning changes with alert type)
$param5 = param5_example; // String | Parameter 5 (meaning changes with alert type)
$param6 = param6_example; // String | Parameter 6 (meaning changes with alert type)
try {
$result = $api_instance->alertsChangeGet($id, $alertname, $activated, $type, $channel, $recipient, $param1, $param2, $param3, $param4, $param5, $param6);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AlertsApi->alertsChangeGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AlertsApi;
my $api_instance = WWW::SwaggerClient::AlertsApi->new();
my $id = id_example; # String | ID of the alert to edit ; if adding a new one leave blank
my $alertname = alertname_example; # String | Name of the alert
my $activated = true; # Boolean | Should the alert be activated or not
my $type = 56; # Integer | Alert type (1= New content for website, 2=New performing contents), 3=New contents in category
my $channel = 56; # Integer | 1 for email, 2 for Slack, 3 for Google Chat, 4 for JSON
my $recipient = recipient_example; # String | Email address of recipient or webhook for Slack/Gchat or JSON endpoint
my $param1 = param1_example; # String | Parameter 1 (meaning changes with alert type)
my $param2 = param2_example; # String | Parameter 2 (meaning changes with alert type)
my $param3 = param3_example; # String | Parameter 3 (meaning changes with alert type)
my $param4 = param4_example; # String | Parameter 4 (meaning changes with alert type)
my $param5 = param5_example; # String | Parameter 5 (meaning changes with alert type)
my $param6 = param6_example; # String | Parameter 6 (meaning changes with alert type)
eval {
my $result = $api_instance->alertsChangeGet(id => $id, alertname => $alertname, activated => $activated, type => $type, channel => $channel, recipient => $recipient, param1 => $param1, param2 => $param2, param3 => $param3, param4 => $param4, param5 => $param5, param6 => $param6);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AlertsApi->alertsChangeGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AlertsApi()
id = id_example # String | ID of the alert to edit ; if adding a new one leave blank
alertname = alertname_example # String | Name of the alert
activated = true # Boolean | Should the alert be activated or not
type = 56 # Integer | Alert type (1= New content for website, 2=New performing contents), 3=New contents in category
channel = 56 # Integer | 1 for email, 2 for Slack, 3 for Google Chat, 4 for JSON
recipient = recipient_example # String | Email address of recipient or webhook for Slack/Gchat or JSON endpoint
param1 = param1_example # String | Parameter 1 (meaning changes with alert type) (optional)
param2 = param2_example # String | Parameter 2 (meaning changes with alert type) (optional)
param3 = param3_example # String | Parameter 3 (meaning changes with alert type) (optional)
param4 = param4_example # String | Parameter 4 (meaning changes with alert type) (optional)
param5 = param5_example # String | Parameter 5 (meaning changes with alert type) (optional)
param6 = param6_example # String | Parameter 6 (meaning changes with alert type) (optional)
try:
# Edit or insert new alert
api_response = api_instance.alerts_change_get(id, alertname, activated, type, channel, recipient, param1=param1, param2=param2, param3=param3, param4=param4, param5=param5, param6=param6)
pprint(api_response)
except ApiException as e:
print("Exception when calling AlertsApi->alertsChangeGet: %s\n" % e)
Parameters
Name | Description |
---|---|
id* |
String
ID of the alert to edit ; if adding a new one leave blank
Required
|
alertname* |
String
Name of the alert
Required
|
activated* |
Boolean
Should the alert be activated or not
Required
|
type* |
Integer
Alert type (1= New content for website, 2=New performing contents), 3=New contents in category
Required
|
channel* |
Integer
1 for email, 2 for Slack, 3 for Google Chat, 4 for JSON
Required
|
recipient* |
String
Email address of recipient or webhook for Slack/Gchat or JSON endpoint
Required
|
param1 |
String
Parameter 1 (meaning changes with alert type)
|
param2 |
String
Parameter 2 (meaning changes with alert type)
|
param3 |
String
Parameter 3 (meaning changes with alert type)
|
param4 |
String
Parameter 4 (meaning changes with alert type)
|
param5 |
String
Parameter 5 (meaning changes with alert type)
|
param6 |
String
Parameter 6 (meaning changes with alert type)
|