alertcountPost
Get alert count
Returns a count of alerts grouped by time buckets.
/alertcount
Usage and SDK Samples
curl -X POST \
-H "X-API-KEY: [[apiKey]]" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"https://api.mailchannels.net/outbound/v1/alertcount" \
-d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: X-API-KEY
ApiKeyAuth X-API-KEY = (ApiKeyAuth) defaultClient.getAuthentication("X-API-KEY");
X-API-KEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-API-KEY.setApiKeyPrefix("Token");
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
AlertcountPostRequest alertcountPostRequest = ; // AlertcountPostRequest |
try {
map['String', 'Integer'] result = apiInstance.alertcountPost(alertcountPostRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#alertcountPost");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
AlertcountPostRequest alertcountPostRequest = ; // AlertcountPostRequest |
try {
map['String', 'Integer'] result = apiInstance.alertcountPost(alertcountPostRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#alertcountPost");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: X-API-KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-KEY"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-KEY"];
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
AlertcountPostRequest *alertcountPostRequest = ; //
// Get alert count
[apiInstance alertcountPostWith:alertcountPostRequest
completionHandler: ^(map['String', 'Integer'] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SearchService = require('search_service');
var defaultClient = SearchService.ApiClient.instance;
// Configure API key authorization: X-API-KEY
var X-API-KEY = defaultClient.authentications['X-API-KEY'];
X-API-KEY.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-API-KEY.apiKeyPrefix['X-API-KEY'] = "Token";
// Create an instance of the API class
var api = new SearchService.DefaultApi()
var alertcountPostRequest = ; // {AlertcountPostRequest}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.alertcountPost(alertcountPostRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class alertcountPostExample
{
public void main()
{
// Configure API key authorization: X-API-KEY
Configuration.Default.ApiKey.Add("X-API-KEY", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-API-KEY", "Bearer");
// Create an instance of the API class
var apiInstance = new DefaultApi();
var alertcountPostRequest = new AlertcountPostRequest(); // AlertcountPostRequest |
try {
// Get alert count
map['String', 'Integer'] result = apiInstance.alertcountPost(alertcountPostRequest);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.alertcountPost: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-API-KEY
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$alertcountPostRequest = ; // AlertcountPostRequest |
try {
$result = $api_instance->alertcountPost($alertcountPostRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->alertcountPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure API key authorization: X-API-KEY
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-KEY'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-KEY'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $alertcountPostRequest = WWW::OPenAPIClient::Object::AlertcountPostRequest->new(); # AlertcountPostRequest |
eval {
my $result = $api_instance->alertcountPost(alertcountPostRequest => $alertcountPostRequest);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->alertcountPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: X-API-KEY
openapi_client.configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
alertcountPostRequest = # AlertcountPostRequest |
try:
# Get alert count
api_response = api_instance.alertcount_post(alertcountPostRequest)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->alertcountPost: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let alertcountPostRequest = ; // AlertcountPostRequest
let mut context = DefaultApi::Context::default();
let result = client.alertcountPost(alertcountPostRequest, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Body parameters
Name | Description |
---|---|
alertcountPostRequest * |