createAlertReceiver
Create a new alert receiver
/api/v1/alert/receiver
Usage and SDK Samples
curl -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"http://localhost/api/v1/alert/receiver" \
-d '{
"webhook_url" : "webhook_url",
"is_at_all" : true,
"enable" : true,
"at_user_ids" : [ "at_user_ids", "at_user_ids" ],
"type" : "webhook"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AlertApi;
import java.io.File;
import java.util.*;
public class AlertApiExample {
public static void main(String[] args) {
// Create an instance of the API class
AlertApi apiInstance = new AlertApi();
CreateAlertReceiverRequest createAlertReceiverRequest = ; // CreateAlertReceiverRequest |
try {
'String' result = apiInstance.createAlertReceiver(createAlertReceiverRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlertApi#createAlertReceiver");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final CreateAlertReceiverRequest createAlertReceiverRequest = new CreateAlertReceiverRequest(); // CreateAlertReceiverRequest |
try {
final result = await api_instance.createAlertReceiver(createAlertReceiverRequest);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->createAlertReceiver: $e\n');
}
import org.openapitools.client.api.AlertApi;
public class AlertApiExample {
public static void main(String[] args) {
AlertApi apiInstance = new AlertApi();
CreateAlertReceiverRequest createAlertReceiverRequest = ; // CreateAlertReceiverRequest |
try {
'String' result = apiInstance.createAlertReceiver(createAlertReceiverRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlertApi#createAlertReceiver");
e.printStackTrace();
}
}
}
// Create an instance of the API class
AlertApi *apiInstance = [[AlertApi alloc] init];
CreateAlertReceiverRequest *createAlertReceiverRequest = ; //
[apiInstance createAlertReceiverWith:createAlertReceiverRequest
completionHandler: ^('String' output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var GraphScopeFlexHttpServiceApi = require('graph_scope_flex_http_service_api');
// Create an instance of the API class
var api = new GraphScopeFlexHttpServiceApi.AlertApi()
var createAlertReceiverRequest = ; // {CreateAlertReceiverRequest}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createAlertReceiver(createAlertReceiverRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class createAlertReceiverExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new AlertApi();
var createAlertReceiverRequest = new CreateAlertReceiverRequest(); // CreateAlertReceiverRequest |
try {
'String' result = apiInstance.createAlertReceiver(createAlertReceiverRequest);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling AlertApi.createAlertReceiver: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AlertApi();
$createAlertReceiverRequest = ; // CreateAlertReceiverRequest |
try {
$result = $api_instance->createAlertReceiver($createAlertReceiverRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AlertApi->createAlertReceiver: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AlertApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AlertApi->new();
my $createAlertReceiverRequest = WWW::OPenAPIClient::Object::CreateAlertReceiverRequest->new(); # CreateAlertReceiverRequest |
eval {
my $result = $api_instance->createAlertReceiver(createAlertReceiverRequest => $createAlertReceiverRequest);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AlertApi->createAlertReceiver: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.AlertApi()
createAlertReceiverRequest = # CreateAlertReceiverRequest |
try:
api_response = api_instance.create_alert_receiver(createAlertReceiverRequest)
pprint(api_response)
except ApiException as e:
print("Exception when calling AlertApi->createAlertReceiver: %s\n" % e)
extern crate AlertApi;
pub fn main() {
let createAlertReceiverRequest = ; // CreateAlertReceiverRequest
let mut context = AlertApi::Context::default();
let result = client.createAlertReceiver(createAlertReceiverRequest, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
createAlertReceiverRequest * |