Infected Host Open API

Infected_hosts_blwl

getInfectedHostsBlwl

Returns Infected hosts blacklist/whitelist IPs.


/v1/skyatp/infected_hosts/{list_type}

Usage and SDK Samples

curl -X get -H "Authorization: [[apiKey]]" "http://api.sky.junipersecurity.net/v1/skyatp/infected_hosts/{list_type}"
import .*;
import .auth.*;
import .model.*;
import .api.Infected_hosts_blwlApi;

import java.io.File;
import java.util.*;

public class Infected_hosts_blwlApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        Infected_hosts_blwlApi apiInstance = new Infected_hosts_blwlApi();
        String listType = listType_example; // String | Type of list, blacklist or whitelist.
        String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
        String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
        try {
            InfectedHostsBlwlResult result = apiInstance.getInfectedHostsBlwl(listType, authorization, xForwardedFor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Infected_hosts_blwlApi#getInfectedHostsBlwl");
            e.printStackTrace();
        }
    }
}
import .api.Infected_hosts_blwlApi;

public class Infected_hosts_blwlApiExample {

    public static void main(String[] args) {
        Infected_hosts_blwlApi apiInstance = new Infected_hosts_blwlApi();
        String listType = listType_example; // String | Type of list, blacklist or whitelist.
        String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
        String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
        try {
            InfectedHostsBlwlResult result = apiInstance.getInfectedHostsBlwl(listType, authorization, xForwardedFor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Infected_hosts_blwlApi#getInfectedHostsBlwl");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Bearer)
[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 *listType = listType_example; // Type of list, blacklist or whitelist.
String *authorization = authorization_example; // Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
String *xForwardedFor = xForwardedFor_example; // This is a header that provides tracking information for API usage. (optional)

Infected_hosts_blwlApi *apiInstance = [[Infected_hosts_blwlApi alloc] init];

[apiInstance getInfectedHostsBlwlWith:listType
    authorization:authorization
    xForwardedFor:xForwardedFor
              completionHandler: ^(InfectedHostsBlwlResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SkyAtpOpenApi = require('sky_atp_open_api');
var defaultClient = SkyAtpOpenApi.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new SkyAtpOpenApi.Infected_hosts_blwlApi()

var listType = listType_example; // {String} Type of list, blacklist or whitelist.

var authorization = authorization_example; // {String} Bearer token of the form, Bearer token, token is application token generated from Customer Portal.

var opts = { 
  'xForwardedFor': xForwardedFor_example // {String} This is a header that provides tracking information for API usage.
};

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

namespace Example
{
    public class getInfectedHostsBlwlExample
    {
        public void main()
        {
            
            // Configure API key authorization: Bearer
            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 Infected_hosts_blwlApi();
            var listType = listType_example;  // String | Type of list, blacklist or whitelist.
            var authorization = authorization_example;  // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
            var xForwardedFor = xForwardedFor_example;  // String | This is a header that provides tracking information for API usage. (optional) 

            try
            {
                InfectedHostsBlwlResult result = apiInstance.getInfectedHostsBlwl(listType, authorization, xForwardedFor);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Infected_hosts_blwlApi.getInfectedHostsBlwl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\Infected_hosts_blwlApi();
$listType = listType_example; // String | Type of list, blacklist or whitelist.
$authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
$xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.

try {
    $result = $api_instance->getInfectedHostsBlwl($listType, $authorization, $xForwardedFor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Infected_hosts_blwlApi->getInfectedHostsBlwl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use ::Configuration;
use ::Infected_hosts_blwlApi;

# Configure API key authorization: Bearer
$::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = ::Infected_hosts_blwlApi->new();
my $listType = listType_example; # String | Type of list, blacklist or whitelist.
my $authorization = authorization_example; # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
my $xForwardedFor = xForwardedFor_example; # String | This is a header that provides tracking information for API usage.

eval { 
    my $result = $api_instance->getInfectedHostsBlwl(listType => $listType, authorization => $authorization, xForwardedFor => $xForwardedFor);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Infected_hosts_blwlApi->getInfectedHostsBlwl: $@\n";
}
from __future__ import print_statement
import time
import 
from .rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# .configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = .Infected_hosts_blwlApi()
listType = listType_example # String | Type of list, blacklist or whitelist.
authorization = authorization_example # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
xForwardedFor = xForwardedFor_example # String | This is a header that provides tracking information for API usage. (optional)

try: 
    api_response = api_instance.getInfectedHostsBlwl(listType, authorization, xForwardedFor=xForwardedFor)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Infected_hosts_blwlApi->getInfectedHostsBlwl: %s\n" % e)

Parameters

Path parameters
Name Description
list_type*
string minLength:9 maxLength:9

Type of list, blacklist or whitelist.

Required
Enum: whitelist, blacklist
Header parameters
Name Description
Authorization*
string

Bearer token of the form, Bearer token, token is application token generated from Customer Portal.

Required
X-Forwarded-For
string

This is a header that provides tracking information for API usage.

Responses

Status: 200 - List of infected host whitelist/blacklist entries

{

Describes the result of a Infected hosts whitelist/blacklist result.
Example: {data: {{count: 5,ip: [{2.2.2.4},{2.2.2.10}]}}

request_id:
string

Unique identifier of this request. Used for logs on the server side.

Pattern: ^[\\w\\-]{4,64}$
data:
{

Response from Customer Portal.

ip:
count:
integer

count of the servers being returned.

Status: 400 - Request parameters are invalid

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 401 - Invalid/Expired API key

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 403 - Access denied for this API key

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 422 - Unprocessable Entity. Input is syntactically correct but semantically incorrect.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 429 - Client has sent too many requests in a given amount of time, api quota exceeded.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 500 - Internal server error

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 503 - Service is temporarily not available. The Retry-After response header will indicate how long the service is expected to be unavailable to the requesting client.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.


getInfectedHostsFeed

Returns all Infected hosts feed entries.


/v1/skyatp/infected_hosts

Usage and SDK Samples

curl -X get -H "Authorization: [[apiKey]]" "http://api.sky.junipersecurity.net/v1/skyatp/infected_hosts"
import .*;
import .auth.*;
import .model.*;
import .api.Infected_hosts_blwlApi;

import java.io.File;
import java.util.*;

public class Infected_hosts_blwlApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        Infected_hosts_blwlApi apiInstance = new Infected_hosts_blwlApi();
        String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
        String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
        try {
            InfectedHostsBlwlResult result = apiInstance.getInfectedHostsFeed(authorization, xForwardedFor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Infected_hosts_blwlApi#getInfectedHostsFeed");
            e.printStackTrace();
        }
    }
}
import .api.Infected_hosts_blwlApi;

public class Infected_hosts_blwlApiExample {

    public static void main(String[] args) {
        Infected_hosts_blwlApi apiInstance = new Infected_hosts_blwlApi();
        String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
        String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
        try {
            InfectedHostsBlwlResult result = apiInstance.getInfectedHostsFeed(authorization, xForwardedFor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Infected_hosts_blwlApi#getInfectedHostsFeed");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Bearer)
[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 *authorization = authorization_example; // Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
String *xForwardedFor = xForwardedFor_example; // This is a header that provides tracking information for API usage. (optional)

Infected_hosts_blwlApi *apiInstance = [[Infected_hosts_blwlApi alloc] init];

[apiInstance getInfectedHostsFeedWith:authorization
    xForwardedFor:xForwardedFor
              completionHandler: ^(InfectedHostsBlwlResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SkyAtpOpenApi = require('sky_atp_open_api');
var defaultClient = SkyAtpOpenApi.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new SkyAtpOpenApi.Infected_hosts_blwlApi()

var authorization = authorization_example; // {String} Bearer token of the form, Bearer token, token is application token generated from Customer Portal.

var opts = { 
  'xForwardedFor': xForwardedFor_example // {String} This is a header that provides tracking information for API usage.
};

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

namespace Example
{
    public class getInfectedHostsFeedExample
    {
        public void main()
        {
            
            // Configure API key authorization: Bearer
            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 Infected_hosts_blwlApi();
            var authorization = authorization_example;  // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
            var xForwardedFor = xForwardedFor_example;  // String | This is a header that provides tracking information for API usage. (optional) 

            try
            {
                InfectedHostsBlwlResult result = apiInstance.getInfectedHostsFeed(authorization, xForwardedFor);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Infected_hosts_blwlApi.getInfectedHostsFeed: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\Infected_hosts_blwlApi();
$authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
$xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.

try {
    $result = $api_instance->getInfectedHostsFeed($authorization, $xForwardedFor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Infected_hosts_blwlApi->getInfectedHostsFeed: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use ::Configuration;
use ::Infected_hosts_blwlApi;

# Configure API key authorization: Bearer
$::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = ::Infected_hosts_blwlApi->new();
my $authorization = authorization_example; # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
my $xForwardedFor = xForwardedFor_example; # String | This is a header that provides tracking information for API usage.

eval { 
    my $result = $api_instance->getInfectedHostsFeed(authorization => $authorization, xForwardedFor => $xForwardedFor);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Infected_hosts_blwlApi->getInfectedHostsFeed: $@\n";
}
from __future__ import print_statement
import time
import 
from .rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# .configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = .Infected_hosts_blwlApi()
authorization = authorization_example # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
xForwardedFor = xForwardedFor_example # String | This is a header that provides tracking information for API usage. (optional)

try: 
    api_response = api_instance.getInfectedHostsFeed(authorization, xForwardedFor=xForwardedFor)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Infected_hosts_blwlApi->getInfectedHostsFeed: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
string

Bearer token of the form, Bearer token, token is application token generated from Customer Portal.

Required
X-Forwarded-For
string

This is a header that provides tracking information for API usage.

Responses

Status: 200 - List of infected host Feed entries

{

Describes the result of a Infected hosts whitelist/blacklist result. Response should be in format {"IPAddress:ThreatLevel"}
Example: {data: {{count: 5,ip: [{2.2.2.4:10},{2.2.2.10:10}]}}

request_id:
string

Unique identifier of this request. Used for logs on the server side.

Pattern: ^[\\w\\-]{4,64}$
data:
{

Response from Customer Portal.

ip:
count:
integer

count of the servers being returned.

Status: 400 - Request parameters are invalid

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 401 - Invalid/Expired API key

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 403 - Access denied for this API key

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 422 - Unprocessable Entity. Input is syntactically correct but semantically incorrect.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 429 - Client has sent too many requests in a given amount of time, api quota exceeded.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 500 - Internal server error

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 503 - Service is temporarily not available. The Retry-After response header will indicate how long the service is expected to be unavailable to the requesting client.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.


removeInfectedHostsBlwl

Delete IP from a blacklist/whitelist for infected hosts


/v1/skyatp/infected_hosts/{list_type}

Usage and SDK Samples

curl -X delete -H "Authorization: [[apiKey]]" "http://api.sky.junipersecurity.net/v1/skyatp/infected_hosts/{list_type}"
import .*;
import .auth.*;
import .model.*;
import .api.Infected_hosts_blwlApi;

import java.io.File;
import java.util.*;

public class Infected_hosts_blwlApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        Infected_hosts_blwlApi apiInstance = new Infected_hosts_blwlApi();
        Infected_hosts_blwl body = ; // Infected_hosts_blwl | 
        String listType = listType_example; // String | Type of list, blacklist or whitelist.
        String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
        String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
        try {
            inline_response_202 result = apiInstance.removeInfectedHostsBlwl(body, listType, authorization, xForwardedFor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Infected_hosts_blwlApi#removeInfectedHostsBlwl");
            e.printStackTrace();
        }
    }
}
import .api.Infected_hosts_blwlApi;

public class Infected_hosts_blwlApiExample {

    public static void main(String[] args) {
        Infected_hosts_blwlApi apiInstance = new Infected_hosts_blwlApi();
        Infected_hosts_blwl body = ; // Infected_hosts_blwl | 
        String listType = listType_example; // String | Type of list, blacklist or whitelist.
        String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
        String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
        try {
            inline_response_202 result = apiInstance.removeInfectedHostsBlwl(body, listType, authorization, xForwardedFor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Infected_hosts_blwlApi#removeInfectedHostsBlwl");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Bearer)
[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"];

Infected_hosts_blwl *body = ; // 
String *listType = listType_example; // Type of list, blacklist or whitelist.
String *authorization = authorization_example; // Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
String *xForwardedFor = xForwardedFor_example; // This is a header that provides tracking information for API usage. (optional)

Infected_hosts_blwlApi *apiInstance = [[Infected_hosts_blwlApi alloc] init];

[apiInstance removeInfectedHostsBlwlWith:body
    listType:listType
    authorization:authorization
    xForwardedFor:xForwardedFor
              completionHandler: ^(inline_response_202 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SkyAtpOpenApi = require('sky_atp_open_api');
var defaultClient = SkyAtpOpenApi.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new SkyAtpOpenApi.Infected_hosts_blwlApi()

var body = ; // {Infected_hosts_blwl} 

var listType = listType_example; // {String} Type of list, blacklist or whitelist.

var authorization = authorization_example; // {String} Bearer token of the form, Bearer token, token is application token generated from Customer Portal.

var opts = { 
  'xForwardedFor': xForwardedFor_example // {String} This is a header that provides tracking information for API usage.
};

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

namespace Example
{
    public class removeInfectedHostsBlwlExample
    {
        public void main()
        {
            
            // Configure API key authorization: Bearer
            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 Infected_hosts_blwlApi();
            var body = new Infected_hosts_blwl(); // Infected_hosts_blwl | 
            var listType = listType_example;  // String | Type of list, blacklist or whitelist.
            var authorization = authorization_example;  // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
            var xForwardedFor = xForwardedFor_example;  // String | This is a header that provides tracking information for API usage. (optional) 

            try
            {
                inline_response_202 result = apiInstance.removeInfectedHostsBlwl(body, listType, authorization, xForwardedFor);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Infected_hosts_blwlApi.removeInfectedHostsBlwl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\Infected_hosts_blwlApi();
$body = ; // Infected_hosts_blwl | 
$listType = listType_example; // String | Type of list, blacklist or whitelist.
$authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
$xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.

try {
    $result = $api_instance->removeInfectedHostsBlwl($body, $listType, $authorization, $xForwardedFor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Infected_hosts_blwlApi->removeInfectedHostsBlwl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use ::Configuration;
use ::Infected_hosts_blwlApi;

# Configure API key authorization: Bearer
$::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = ::Infected_hosts_blwlApi->new();
my $body = ::Object::Infected_hosts_blwl->new(); # Infected_hosts_blwl | 
my $listType = listType_example; # String | Type of list, blacklist or whitelist.
my $authorization = authorization_example; # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
my $xForwardedFor = xForwardedFor_example; # String | This is a header that provides tracking information for API usage.

eval { 
    my $result = $api_instance->removeInfectedHostsBlwl(body => $body, listType => $listType, authorization => $authorization, xForwardedFor => $xForwardedFor);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Infected_hosts_blwlApi->removeInfectedHostsBlwl: $@\n";
}
from __future__ import print_statement
import time
import 
from .rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# .configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = .Infected_hosts_blwlApi()
body =  # Infected_hosts_blwl | 
listType = listType_example # String | Type of list, blacklist or whitelist.
authorization = authorization_example # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
xForwardedFor = xForwardedFor_example # String | This is a header that provides tracking information for API usage. (optional)

try: 
    api_response = api_instance.removeInfectedHostsBlwl(body, listType, authorization, xForwardedFor=xForwardedFor)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Infected_hosts_blwlApi->removeInfectedHostsBlwl: %s\n" % e)

Parameters

Path parameters
Name Description
list_type*
string minLength:9 maxLength:9

Type of list, blacklist or whitelist.

Required
Enum: whitelist, blacklist
Header parameters
Name Description
Authorization*
string

Bearer token of the form, Bearer token, token is application token generated from Customer Portal.

Required
X-Forwarded-For
string

This is a header that provides tracking information for API usage.

Body parameters
Name Description
body *
{

Infected hosts blacklist/whitelist data.
Example: {ip:[9.9.9.9]} To delete sepecfic IP address from feed,ip:[*] to delete entire feed

Required: ip
ip:
[
]

Responses

Status: 202 - The request has been accepted for processing.

{
request_id:
string

Unique identifier of this request. Used for logs on the server side.

Pattern: ^[\\w\\-]{4,64}$

Status: 400 - Request parameters are invalid

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 401 - Invalid/Expired API key

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 403 - Access denied for this API key

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 422 - Unprocessable Entity. Input is syntactically correct but semantically incorrect.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 429 - Client has sent too many requests in a given amount of time, api quota exceeded.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 500 - Internal server error

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 503 - Service is temporarily not available. The Retry-After response header will indicate how long the service is expected to be unavailable to the requesting client.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.


updateInfectedHostsBlwl

Updates an IP in a blacklist/whitelist for infected hosts


/v1/skyatp/infected_hosts/{list_type}

Usage and SDK Samples

curl -X patch -H "Authorization: [[apiKey]]" "http://api.sky.junipersecurity.net/v1/skyatp/infected_hosts/{list_type}"
import .*;
import .auth.*;
import .model.*;
import .api.Infected_hosts_blwlApi;

import java.io.File;
import java.util.*;

public class Infected_hosts_blwlApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        Infected_hosts_blwlApi apiInstance = new Infected_hosts_blwlApi();
        Infected_hosts_blwl body = ; // Infected_hosts_blwl | 
        String listType = listType_example; // String | Type of list, blacklist or whitelist.
        String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
        String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
        try {
            inline_response_202 result = apiInstance.updateInfectedHostsBlwl(body, listType, authorization, xForwardedFor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Infected_hosts_blwlApi#updateInfectedHostsBlwl");
            e.printStackTrace();
        }
    }
}
import .api.Infected_hosts_blwlApi;

public class Infected_hosts_blwlApiExample {

    public static void main(String[] args) {
        Infected_hosts_blwlApi apiInstance = new Infected_hosts_blwlApi();
        Infected_hosts_blwl body = ; // Infected_hosts_blwl | 
        String listType = listType_example; // String | Type of list, blacklist or whitelist.
        String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
        String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
        try {
            inline_response_202 result = apiInstance.updateInfectedHostsBlwl(body, listType, authorization, xForwardedFor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Infected_hosts_blwlApi#updateInfectedHostsBlwl");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Bearer)
[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"];

Infected_hosts_blwl *body = ; // 
String *listType = listType_example; // Type of list, blacklist or whitelist.
String *authorization = authorization_example; // Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
String *xForwardedFor = xForwardedFor_example; // This is a header that provides tracking information for API usage. (optional)

Infected_hosts_blwlApi *apiInstance = [[Infected_hosts_blwlApi alloc] init];

[apiInstance updateInfectedHostsBlwlWith:body
    listType:listType
    authorization:authorization
    xForwardedFor:xForwardedFor
              completionHandler: ^(inline_response_202 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SkyAtpOpenApi = require('sky_atp_open_api');
var defaultClient = SkyAtpOpenApi.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new SkyAtpOpenApi.Infected_hosts_blwlApi()

var body = ; // {Infected_hosts_blwl} 

var listType = listType_example; // {String} Type of list, blacklist or whitelist.

var authorization = authorization_example; // {String} Bearer token of the form, Bearer token, token is application token generated from Customer Portal.

var opts = { 
  'xForwardedFor': xForwardedFor_example // {String} This is a header that provides tracking information for API usage.
};

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

namespace Example
{
    public class updateInfectedHostsBlwlExample
    {
        public void main()
        {
            
            // Configure API key authorization: Bearer
            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 Infected_hosts_blwlApi();
            var body = new Infected_hosts_blwl(); // Infected_hosts_blwl | 
            var listType = listType_example;  // String | Type of list, blacklist or whitelist.
            var authorization = authorization_example;  // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
            var xForwardedFor = xForwardedFor_example;  // String | This is a header that provides tracking information for API usage. (optional) 

            try
            {
                inline_response_202 result = apiInstance.updateInfectedHostsBlwl(body, listType, authorization, xForwardedFor);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Infected_hosts_blwlApi.updateInfectedHostsBlwl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\Infected_hosts_blwlApi();
$body = ; // Infected_hosts_blwl | 
$listType = listType_example; // String | Type of list, blacklist or whitelist.
$authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
$xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.

try {
    $result = $api_instance->updateInfectedHostsBlwl($body, $listType, $authorization, $xForwardedFor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Infected_hosts_blwlApi->updateInfectedHostsBlwl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use ::Configuration;
use ::Infected_hosts_blwlApi;

# Configure API key authorization: Bearer
$::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = ::Infected_hosts_blwlApi->new();
my $body = ::Object::Infected_hosts_blwl->new(); # Infected_hosts_blwl | 
my $listType = listType_example; # String | Type of list, blacklist or whitelist.
my $authorization = authorization_example; # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
my $xForwardedFor = xForwardedFor_example; # String | This is a header that provides tracking information for API usage.

eval { 
    my $result = $api_instance->updateInfectedHostsBlwl(body => $body, listType => $listType, authorization => $authorization, xForwardedFor => $xForwardedFor);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Infected_hosts_blwlApi->updateInfectedHostsBlwl: $@\n";
}
from __future__ import print_statement
import time
import 
from .rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# .configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = .Infected_hosts_blwlApi()
body =  # Infected_hosts_blwl | 
listType = listType_example # String | Type of list, blacklist or whitelist.
authorization = authorization_example # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
xForwardedFor = xForwardedFor_example # String | This is a header that provides tracking information for API usage. (optional)

try: 
    api_response = api_instance.updateInfectedHostsBlwl(body, listType, authorization, xForwardedFor=xForwardedFor)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Infected_hosts_blwlApi->updateInfectedHostsBlwl: %s\n" % e)

Parameters

Path parameters
Name Description
list_type*
string minLength:9 maxLength:9

Type of list, blacklist or whitelist.

Required
Enum: whitelist, blacklist
Header parameters
Name Description
Authorization*
string

Bearer token of the form, Bearer token, token is application token generated from Customer Portal.

Required
X-Forwarded-For
string

This is a header that provides tracking information for API usage.

Body parameters
Name Description
body *
{

Infected hosts blacklist/whitelist data.
Example: {ip:[9.9.9.9]} To add/update sepecfic IP address to the feed

Required: ip
ip:
[
]

Responses

Status: 202 - The request has been accepted for processing.

{
request_id:
string

Unique identifier of this request. Used for logs on the server side.

Pattern: ^[\\w\\-]{4,64}$

Status: 400 - Request parameters are invalid

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 401 - Invalid/Expired API key

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 403 - Access denied for this API key

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 422 - Unprocessable Entity. Input is syntactically correct but semantically incorrect.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 429 - Client has sent too many requests in a given amount of time, api quota exceeded.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 500 - Internal server error

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.

Status: 503 - Service is temporarily not available. The Retry-After response header will indicate how long the service is expected to be unavailable to the requesting client.

{
err_id:
string

Text representation of error code.

message:
string

Short error description.

details:
string

Long error description. Must not be used for error handling purposes.


Generated 2017-05-23T23:20:57.601+05:30