Search Service

Default

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 *

Responses


alertsPost

Get alerts

Returns a list of alerts based on the provided filters.


/alerts

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/alerts" \
 -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();
        AlertsPostRequest alertsPostRequest = ; // AlertsPostRequest | 

        try {
            array[_alerts_post_200_response_inner] result = apiInstance.alertsPost(alertsPostRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#alertsPost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        AlertsPostRequest alertsPostRequest = ; // AlertsPostRequest | 

        try {
            array[_alerts_post_200_response_inner] result = apiInstance.alertsPost(alertsPostRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#alertsPost");
            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];
AlertsPostRequest *alertsPostRequest = ; // 

// Get alerts
[apiInstance alertsPostWith:alertsPostRequest
              completionHandler: ^(array[_alerts_post_200_response_inner] 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 alertsPostRequest = ; // {AlertsPostRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.alertsPost(alertsPostRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class alertsPostExample
    {
        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 alertsPostRequest = new AlertsPostRequest(); // AlertsPostRequest | 

            try {
                // Get alerts
                array[_alerts_post_200_response_inner] result = apiInstance.alertsPost(alertsPostRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.alertsPost: " + 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();
$alertsPostRequest = ; // AlertsPostRequest | 

try {
    $result = $api_instance->alertsPost($alertsPostRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->alertsPost: ', $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 $alertsPostRequest = WWW::OPenAPIClient::Object::AlertsPostRequest->new(); # AlertsPostRequest | 

eval {
    my $result = $api_instance->alertsPost(alertsPostRequest => $alertsPostRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->alertsPost: $@\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()
alertsPostRequest =  # AlertsPostRequest | 

try:
    # Get alerts
    api_response = api_instance.alerts_post(alertsPostRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->alertsPost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let alertsPostRequest = ; // AlertsPostRequest

    let mut context = DefaultApi::Context::default();
    let result = client.alertsPost(alertsPostRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
alertsPostRequest *

Responses


searchPost

search MailChannels traffic logs


/search

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/search?start_at=56&count=56" \
 -d '{
  "end_date" : "end_date",
  "rcpt" : "rcpt",
  "rspcode" : 0,
  "rspmsg" : "rspmsg",
  "upstream" : "upstream",
  "subject" : "subject",
  "delivered" : "Y",
  "message_id" : "message_id",
  "spam_disposition" : "CONFIRMED",
  "sender_id" : "sender_id",
  "upstream_hostname" : "upstream_hostname",
  "lastcmd" : "lastcmd",
  "sender" : "sender",
  "virus_disposition" : "CONFIRMED",
  "start_date" : "start_date"
}'
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();
        Integer startAt = 56; // Integer | For pagination purposes, defines the offset from the first result. Defaults to 0. To get
the next page, use start_at + count. E.g. if count is 20, the next start_at will be 20, then 40.
Note that there's a hard limit of 10,000 results per query. A bad request is returned if 
"start_at + count" exceeds 9,999.

        Integer count = 56; // Integer | The number of results to return. Defaults to 20, max is 100.
        SearchRequest searchRequest = ; // SearchRequest | 

        try {
            SearchResults result = apiInstance.searchPost(startAt, count, searchRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#searchPost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer startAt = 56; // Integer | For pagination purposes, defines the offset from the first result. Defaults to 0. To get
the next page, use start_at + count. E.g. if count is 20, the next start_at will be 20, then 40.
Note that there's a hard limit of 10,000 results per query. A bad request is returned if 
"start_at + count" exceeds 9,999.

        Integer count = 56; // Integer | The number of results to return. Defaults to 20, max is 100.
        SearchRequest searchRequest = ; // SearchRequest | 

        try {
            SearchResults result = apiInstance.searchPost(startAt, count, searchRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#searchPost");
            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];
Integer *startAt = 56; // For pagination purposes, defines the offset from the first result. Defaults to 0. To get
the next page, use start_at + count. E.g. if count is 20, the next start_at will be 20, then 40.
Note that there's a hard limit of 10,000 results per query. A bad request is returned if 
"start_at + count" exceeds 9,999.
 (optional) (default to null)
Integer *count = 56; // The number of results to return. Defaults to 20, max is 100. (optional) (default to null)
SearchRequest *searchRequest = ; //  (optional)

// search MailChannels traffic logs
[apiInstance searchPostWith:startAt
    count:count
    searchRequest:searchRequest
              completionHandler: ^(SearchResults 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 opts = {
  'startAt': 56, // {Integer} For pagination purposes, defines the offset from the first result. Defaults to 0. To get
the next page, use start_at + count. E.g. if count is 20, the next start_at will be 20, then 40.
Note that there's a hard limit of 10,000 results per query. A bad request is returned if 
"start_at + count" exceeds 9,999.

  'count': 56, // {Integer} The number of results to return. Defaults to 20, max is 100.
  'searchRequest':  // {SearchRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchPost(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class searchPostExample
    {
        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 startAt = 56;  // Integer | For pagination purposes, defines the offset from the first result. Defaults to 0. To get
the next page, use start_at + count. E.g. if count is 20, the next start_at will be 20, then 40.
Note that there's a hard limit of 10,000 results per query. A bad request is returned if 
"start_at + count" exceeds 9,999.
 (optional)  (default to null)
            var count = 56;  // Integer | The number of results to return. Defaults to 20, max is 100. (optional)  (default to null)
            var searchRequest = new SearchRequest(); // SearchRequest |  (optional) 

            try {
                // search MailChannels traffic logs
                SearchResults result = apiInstance.searchPost(startAt, count, searchRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.searchPost: " + 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();
$startAt = 56; // Integer | For pagination purposes, defines the offset from the first result. Defaults to 0. To get
the next page, use start_at + count. E.g. if count is 20, the next start_at will be 20, then 40.
Note that there's a hard limit of 10,000 results per query. A bad request is returned if 
"start_at + count" exceeds 9,999.

$count = 56; // Integer | The number of results to return. Defaults to 20, max is 100.
$searchRequest = ; // SearchRequest | 

try {
    $result = $api_instance->searchPost($startAt, $count, $searchRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->searchPost: ', $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 $startAt = 56; # Integer | For pagination purposes, defines the offset from the first result. Defaults to 0. To get
the next page, use start_at + count. E.g. if count is 20, the next start_at will be 20, then 40.
Note that there's a hard limit of 10,000 results per query. A bad request is returned if 
"start_at + count" exceeds 9,999.

my $count = 56; # Integer | The number of results to return. Defaults to 20, max is 100.
my $searchRequest = WWW::OPenAPIClient::Object::SearchRequest->new(); # SearchRequest | 

eval {
    my $result = $api_instance->searchPost(startAt => $startAt, count => $count, searchRequest => $searchRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->searchPost: $@\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()
startAt = 56 # Integer | For pagination purposes, defines the offset from the first result. Defaults to 0. To get
the next page, use start_at + count. E.g. if count is 20, the next start_at will be 20, then 40.
Note that there's a hard limit of 10,000 results per query. A bad request is returned if 
"start_at + count" exceeds 9,999.
 (optional) (default to null)
count = 56 # Integer | The number of results to return. Defaults to 20, max is 100. (optional) (default to null)
searchRequest =  # SearchRequest |  (optional)

try:
    # search MailChannels traffic logs
    api_response = api_instance.search_post(startAt=startAt, count=count, searchRequest=searchRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->searchPost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let startAt = 56; // Integer
    let count = 56; // Integer
    let searchRequest = ; // SearchRequest

    let mut context = DefaultApi::Context::default();
    let result = client.searchPost(startAt, count, searchRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
searchRequest

JSON representation of the search query. If not present, defaults to 20 logs for the authenticated account.

Query parameters
Name Description
start_at
Integer
For pagination purposes, defines the offset from the first result. Defaults to 0. To get the next page, use start_at + count. E.g. if count is 20, the next start_at will be 20, then 40. Note that there's a hard limit of 10,000 results per query. A bad request is returned if "start_at + count" exceeds 9,999.
count
Integer
The number of results to return. Defaults to 20, max is 100.

Responses


senderprofilePost

Retrieve aggregated search profile


/senderprofile

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/senderprofile" \
 -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();
        SenderprofilePostRequest senderprofilePostRequest = ; // SenderprofilePostRequest | 

        try {
            _senderprofile_post_200_response result = apiInstance.senderprofilePost(senderprofilePostRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#senderprofilePost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        SenderprofilePostRequest senderprofilePostRequest = ; // SenderprofilePostRequest | 

        try {
            _senderprofile_post_200_response result = apiInstance.senderprofilePost(senderprofilePostRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#senderprofilePost");
            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];
SenderprofilePostRequest *senderprofilePostRequest = ; // 

// Retrieve aggregated search profile

[apiInstance senderprofilePostWith:senderprofilePostRequest
              completionHandler: ^(_senderprofile_post_200_response 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 senderprofilePostRequest = ; // {SenderprofilePostRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.senderprofilePost(senderprofilePostRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class senderprofilePostExample
    {
        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 senderprofilePostRequest = new SenderprofilePostRequest(); // SenderprofilePostRequest | 

            try {
                // Retrieve aggregated search profile

                _senderprofile_post_200_response result = apiInstance.senderprofilePost(senderprofilePostRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.senderprofilePost: " + 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();
$senderprofilePostRequest = ; // SenderprofilePostRequest | 

try {
    $result = $api_instance->senderprofilePost($senderprofilePostRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->senderprofilePost: ', $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 $senderprofilePostRequest = WWW::OPenAPIClient::Object::SenderprofilePostRequest->new(); # SenderprofilePostRequest | 

eval {
    my $result = $api_instance->senderprofilePost(senderprofilePostRequest => $senderprofilePostRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->senderprofilePost: $@\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()
senderprofilePostRequest =  # SenderprofilePostRequest | 

try:
    # Retrieve aggregated search profile

    api_response = api_instance.senderprofile_post(senderprofilePostRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->senderprofilePost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let senderprofilePostRequest = ; // SenderprofilePostRequest

    let mut context = DefaultApi::Context::default();
    let result = client.senderprofilePost(senderprofilePostRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
senderprofilePostRequest *

JSON representation of the search query.

Responses