/api/1.0/blocking/by-ad-server-details - get
Blocked counts grouped by ad-server details (JSON)
Returns grouped blocked and logged counts by selected ad-server detail columns over a time window.
Usage and SDK Samples
curl -X GET -H "Authorization: [[apiKey]]" "https://api-prod.adlightning.com/blocking-results/api/1.0/blocking/by-ad-server-details?site=&start_date=&end_date=&ad_detail_cols="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.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: universalAuthorizerFunc
ApiKeyAuth universalAuthorizerFunc = (ApiKeyAuth) defaultClient.getAuthentication("universalAuthorizerFunc");
universalAuthorizerFunc.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//universalAuthorizerFunc.setApiKeyPrefix("Token");
DefaultApi apiInstance = new DefaultApi();
String site = site_example; // String | Optional: PG site id or name (roles must allow access). Defaults from caller role.
String startDate = startDate_example; // String | Start date for results in ISO 8601. YYYY-MM-DD or full timestamp with timezone.
String endDate = endDate_example; // String | End date for results in ISO 8601. End is exclusive when a time is provided.
String authorization = authorization_example; // String | Bearer token provided by Ad Lightning
String adDetailCols = adDetailCols_example; // String | Optional: Comma-separated list (or repeated param) of ad detail columns to group by. Allowed: company_id, order_id, campaign_id, ad_server, ad_unit, lineitem_id, creative_id. Defaults align with server.
try {
BlockedByAdServerDetailsResponse result = apiInstance.api10BlockingByAdServerDetailsGet(site, startDate, endDate, authorization, adDetailCols);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#api10BlockingByAdServerDetailsGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String site = site_example; // String | Optional: PG site id or name (roles must allow access). Defaults from caller role.
String startDate = startDate_example; // String | Start date for results in ISO 8601. YYYY-MM-DD or full timestamp with timezone.
String endDate = endDate_example; // String | End date for results in ISO 8601. End is exclusive when a time is provided.
String authorization = authorization_example; // String | Bearer token provided by Ad Lightning
String adDetailCols = adDetailCols_example; // String | Optional: Comma-separated list (or repeated param) of ad detail columns to group by. Allowed: company_id, order_id, campaign_id, ad_server, ad_unit, lineitem_id, creative_id. Defaults align with server.
try {
BlockedByAdServerDetailsResponse result = apiInstance.api10BlockingByAdServerDetailsGet(site, startDate, endDate, authorization, adDetailCols);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#api10BlockingByAdServerDetailsGet");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: universalAuthorizerFunc)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *site = site_example; // Optional: PG site id or name (roles must allow access). Defaults from caller role. (optional)
String *startDate = startDate_example; // Start date for results in ISO 8601. YYYY-MM-DD or full timestamp with timezone. (optional)
String *endDate = endDate_example; // End date for results in ISO 8601. End is exclusive when a time is provided. (optional)
String *authorization = authorization_example; // Bearer token provided by Ad Lightning (optional)
String *adDetailCols = adDetailCols_example; // Optional: Comma-separated list (or repeated param) of ad detail columns to group by. Allowed: company_id, order_id, campaign_id, ad_server, ad_unit, lineitem_id, creative_id. Defaults align with server. (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Blocked counts grouped by ad-server details (JSON)
[apiInstance api10BlockingByAdServerDetailsGetWith:site
startDate:startDate
endDate:endDate
authorization:authorization
adDetailCols:adDetailCols
completionHandler: ^(BlockedByAdServerDetailsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ProdApiBlockingResultsServerless = require('prod_api_blocking_results_serverless');
var defaultClient = ProdApiBlockingResultsServerless.ApiClient.instance;
// Configure API key authorization: universalAuthorizerFunc
var universalAuthorizerFunc = defaultClient.authentications['universalAuthorizerFunc'];
universalAuthorizerFunc.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//universalAuthorizerFunc.apiKeyPrefix['Authorization'] = "Token"
var api = new ProdApiBlockingResultsServerless.DefaultApi()
var opts = {
'site': site_example, // {String} Optional: PG site id or name (roles must allow access). Defaults from caller role.
'startDate': startDate_example, // {String} Start date for results in ISO 8601. YYYY-MM-DD or full timestamp with timezone.
'endDate': endDate_example, // {String} End date for results in ISO 8601. End is exclusive when a time is provided.
'authorization': authorization_example, // {String} Bearer token provided by Ad Lightning
'adDetailCols': adDetailCols_example // {String} Optional: Comma-separated list (or repeated param) of ad detail columns to group by. Allowed: company_id, order_id, campaign_id, ad_server, ad_unit, lineitem_id, creative_id. Defaults align with server.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.api10BlockingByAdServerDetailsGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class api10BlockingByAdServerDetailsGetExample
{
public void main()
{
// Configure API key authorization: universalAuthorizerFunc
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new DefaultApi();
var site = site_example; // String | Optional: PG site id or name (roles must allow access). Defaults from caller role. (optional)
var startDate = startDate_example; // String | Start date for results in ISO 8601. YYYY-MM-DD or full timestamp with timezone. (optional)
var endDate = endDate_example; // String | End date for results in ISO 8601. End is exclusive when a time is provided. (optional)
var authorization = authorization_example; // String | Bearer token provided by Ad Lightning (optional)
var adDetailCols = adDetailCols_example; // String | Optional: Comma-separated list (or repeated param) of ad detail columns to group by. Allowed: company_id, order_id, campaign_id, ad_server, ad_unit, lineitem_id, creative_id. Defaults align with server. (optional)
try
{
// Blocked counts grouped by ad-server details (JSON)
BlockedByAdServerDetailsResponse result = apiInstance.api10BlockingByAdServerDetailsGet(site, startDate, endDate, authorization, adDetailCols);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.api10BlockingByAdServerDetailsGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: universalAuthorizerFunc
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$api_instance = new Swagger\Client\Api\DefaultApi();
$site = site_example; // String | Optional: PG site id or name (roles must allow access). Defaults from caller role.
$startDate = startDate_example; // String | Start date for results in ISO 8601. YYYY-MM-DD or full timestamp with timezone.
$endDate = endDate_example; // String | End date for results in ISO 8601. End is exclusive when a time is provided.
$authorization = authorization_example; // String | Bearer token provided by Ad Lightning
$adDetailCols = adDetailCols_example; // String | Optional: Comma-separated list (or repeated param) of ad detail columns to group by. Allowed: company_id, order_id, campaign_id, ad_server, ad_unit, lineitem_id, creative_id. Defaults align with server.
try {
$result = $api_instance->api10BlockingByAdServerDetailsGet($site, $startDate, $endDate, $authorization, $adDetailCols);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->api10BlockingByAdServerDetailsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
# Configure API key authorization: universalAuthorizerFunc
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $site = site_example; # String | Optional: PG site id or name (roles must allow access). Defaults from caller role.
my $startDate = startDate_example; # String | Start date for results in ISO 8601. YYYY-MM-DD or full timestamp with timezone.
my $endDate = endDate_example; # String | End date for results in ISO 8601. End is exclusive when a time is provided.
my $authorization = authorization_example; # String | Bearer token provided by Ad Lightning
my $adDetailCols = adDetailCols_example; # String | Optional: Comma-separated list (or repeated param) of ad detail columns to group by. Allowed: company_id, order_id, campaign_id, ad_server, ad_unit, lineitem_id, creative_id. Defaults align with server.
eval {
my $result = $api_instance->api10BlockingByAdServerDetailsGet(site => $site, startDate => $startDate, endDate => $endDate, authorization => $authorization, adDetailCols => $adDetailCols);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->api10BlockingByAdServerDetailsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: universalAuthorizerFunc
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.DefaultApi()
site = site_example # String | Optional: PG site id or name (roles must allow access). Defaults from caller role. (optional)
startDate = startDate_example # String | Start date for results in ISO 8601. YYYY-MM-DD or full timestamp with timezone. (optional)
endDate = endDate_example # String | End date for results in ISO 8601. End is exclusive when a time is provided. (optional)
authorization = authorization_example # String | Bearer token provided by Ad Lightning (optional)
adDetailCols = adDetailCols_example # String | Optional: Comma-separated list (or repeated param) of ad detail columns to group by. Allowed: company_id, order_id, campaign_id, ad_server, ad_unit, lineitem_id, creative_id. Defaults align with server. (optional)
try:
# Blocked counts grouped by ad-server details (JSON)
api_response = api_instance.api10_blocking_by_ad_server_details_get(site=site, startDate=startDate, endDate=endDate, authorization=authorization, adDetailCols=adDetailCols)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->api10BlockingByAdServerDetailsGet: %s\n" % e)
Parameters
| Name | Description |
|---|---|
| Authorization |
| Name | Description |
|---|---|
| site |
String
Optional: PG site id or name (roles must allow access). Defaults from caller role.
|
| start_date |
String
Start date for results in ISO 8601. YYYY-MM-DD or full timestamp with timezone.
|
| end_date |
String
End date for results in ISO 8601. End is exclusive when a time is provided.
|
| ad_detail_cols |
String
Optional: Comma-separated list (or repeated param) of ad detail columns to group by. Allowed: company_id, order_id, campaign_id, ad_server, ad_unit, lineitem_id, creative_id. Defaults align with server.
|