alertsAlertIdDelete
Delete an alert.
/alerts/{alert_id}
Usage and SDK Samples
curl -X DELETE "http://localhost/api/alerts/{alert_id}"
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) {
AlertsApi apiInstance = new AlertsApi();
Integer alertId = 56; // Integer | The alert id.
try {
apiInstance.alertsAlertIdDelete(alertId);
} catch (ApiException e) {
System.err.println("Exception when calling AlertsApi#alertsAlertIdDelete");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AlertsApi;
public class AlertsApiExample {
public static void main(String[] args) {
AlertsApi apiInstance = new AlertsApi();
Integer alertId = 56; // Integer | The alert id.
try {
apiInstance.alertsAlertIdDelete(alertId);
} catch (ApiException e) {
System.err.println("Exception when calling AlertsApi#alertsAlertIdDelete");
e.printStackTrace();
}
}
}
Integer *alertId = 56; // The alert id.
AlertsApi *apiInstance = [[AlertsApi alloc] init];
// Delete an alert.
[apiInstance alertsAlertIdDeleteWith:alertId
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SunlightDashboard = require('sunlight_dashboard');
var api = new SunlightDashboard.AlertsApi()
var alertId = 56; // {Integer} The alert id.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.alertsAlertIdDelete(alertId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class alertsAlertIdDeleteExample
{
public void main()
{
var apiInstance = new AlertsApi();
var alertId = 56; // Integer | The alert id.
try
{
// Delete an alert.
apiInstance.alertsAlertIdDelete(alertId);
}
catch (Exception e)
{
Debug.Print("Exception when calling AlertsApi.alertsAlertIdDelete: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\AlertsApi();
$alertId = 56; // Integer | The alert id.
try {
$api_instance->alertsAlertIdDelete($alertId);
} catch (Exception $e) {
echo 'Exception when calling AlertsApi->alertsAlertIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AlertsApi;
my $api_instance = WWW::SwaggerClient::AlertsApi->new();
my $alertId = 56; # Integer | The alert id.
eval {
$api_instance->alertsAlertIdDelete(alertId => $alertId);
};
if ($@) {
warn "Exception when calling AlertsApi->alertsAlertIdDelete: $@\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()
alertId = 56 # Integer | The alert id.
try:
# Delete an alert.
api_instance.alerts_alert_id_delete(alertId)
except ApiException as e:
print("Exception when calling AlertsApi->alertsAlertIdDelete: %s\n" % e)
Parameters
Name | Description |
---|---|
alert_id* |
Integer
(uint)
The alert id.
Required
|
Responses
Status: 204 - Alert deleted succesfully.
Status: 406 - Alert's id is not number.
Status: 404 - The resource does not exists.
{code=404, message=Resource with id 1123 does not exist.}
Status: 500 - An unexpected error occured.
{code=500, message=Operation X did something wrong during processing}