delBlwlFile
Delete given server in the list or the entire list if one of the entries in the file is * or all.
/{list_type}/file/{server_type}
Usage and SDK Samples
curl -X DELETE -H "Authorization: [[apiKey]]" "http://api.sky.junipersecurity.net/v2/skyatp/{list_type}/file/{server_type}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BlwlNApi;
import java.io.File;
import java.util.*;
public class BlwlNApiExample {
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");
BlwlNApi apiInstance = new BlwlNApi();
String listType = listType_example; // String | Type of list, blacklist or whitelist.
String serverType = serverType_example; // String | Server type of the list. Could be one of ip, url or domain.
File file = /path/to/file.txt; // File | csv file, with a single column for server.
String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
Boolean failOnError = true; // Boolean | Whether to partially process the file in case of parsing errors.
String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
try {
Object result = apiInstance.delBlwlFile(listType, serverType, file, authorization, failOnError, xForwardedFor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BlwlNApi#delBlwlFile");
e.printStackTrace();
}
}
}
import io.swagger.client.api.BlwlNApi;
public class BlwlNApiExample {
public static void main(String[] args) {
BlwlNApi apiInstance = new BlwlNApi();
String listType = listType_example; // String | Type of list, blacklist or whitelist.
String serverType = serverType_example; // String | Server type of the list. Could be one of ip, url or domain.
File file = /path/to/file.txt; // File | csv file, with a single column for server.
String authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
Boolean failOnError = true; // Boolean | Whether to partially process the file in case of parsing errors.
String xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
try {
Object result = apiInstance.delBlwlFile(listType, serverType, file, authorization, failOnError, xForwardedFor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BlwlNApi#delBlwlFile");
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 *serverType = serverType_example; // Server type of the list. Could be one of ip, url or domain.
File *file = /path/to/file.txt; // csv file, with a single column for server.
String *authorization = authorization_example; // Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
Boolean *failOnError = true; // Whether to partially process the file in case of parsing errors. (optional) (default to true)
String *xForwardedFor = xForwardedFor_example; // This is a header that provides tracking information for API usage. (optional)
BlwlNApi *apiInstance = [[BlwlNApi alloc] init];
[apiInstance delBlwlFileWith:listType
serverType:serverType
file:file
authorization:authorization
failOnError:failOnError
xForwardedFor:xForwardedFor
completionHandler: ^(Object 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.BlwlNApi()
var listType = listType_example; // {String} Type of list, blacklist or whitelist.
var serverType = serverType_example; // {String} Server type of the list. Could be one of ip, url or domain.
var file = /path/to/file.txt; // {File} csv file, with a single column for server.
var authorization = authorization_example; // {String} Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
var opts = {
'failOnError': true, // {Boolean} Whether to partially process the file in case of parsing errors.
'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.delBlwlFile(listType, serverType, file, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class delBlwlFileExample
{
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 BlwlNApi();
var listType = listType_example; // String | Type of list, blacklist or whitelist.
var serverType = serverType_example; // String | Server type of the list. Could be one of ip, url or domain.
var file = new File(); // File | csv file, with a single column for server.
var authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
var failOnError = true; // Boolean | Whether to partially process the file in case of parsing errors. (optional) (default to true)
var xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage. (optional)
try
{
Object result = apiInstance.delBlwlFile(listType, serverType, file, authorization, failOnError, xForwardedFor);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling BlwlNApi.delBlwlFile: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Bearer
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\BlwlNApi();
$listType = listType_example; // String | Type of list, blacklist or whitelist.
$serverType = serverType_example; // String | Server type of the list. Could be one of ip, url or domain.
$file = /path/to/file.txt; // File | csv file, with a single column for server.
$authorization = authorization_example; // String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
$failOnError = true; // Boolean | Whether to partially process the file in case of parsing errors.
$xForwardedFor = xForwardedFor_example; // String | This is a header that provides tracking information for API usage.
try {
$result = $api_instance->delBlwlFile($listType, $serverType, $file, $authorization, $failOnError, $xForwardedFor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BlwlNApi->delBlwlFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BlwlNApi;
# Configure API key authorization: Bearer
$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::BlwlNApi->new();
my $listType = listType_example; # String | Type of list, blacklist or whitelist.
my $serverType = serverType_example; # String | Server type of the list. Could be one of ip, url or domain.
my $file = /path/to/file.txt; # File | csv file, with a single column for server.
my $authorization = authorization_example; # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
my $failOnError = true; # Boolean | Whether to partially process the file in case of parsing errors.
my $xForwardedFor = xForwardedFor_example; # String | This is a header that provides tracking information for API usage.
eval {
my $result = $api_instance->delBlwlFile(listType => $listType, serverType => $serverType, file => $file, authorization => $authorization, failOnError => $failOnError, xForwardedFor => $xForwardedFor);
print Dumper($result);
};
if ($@) {
warn "Exception when calling BlwlNApi->delBlwlFile: $@\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: Bearer
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.BlwlNApi()
listType = listType_example # String | Type of list, blacklist or whitelist.
serverType = serverType_example # String | Server type of the list. Could be one of ip, url or domain.
file = /path/to/file.txt # File | csv file, with a single column for server.
authorization = authorization_example # String | Bearer token of the form, Bearer token, token is application token generated from Customer Portal.
failOnError = true # Boolean | Whether to partially process the file in case of parsing errors. (optional) (default to true)
xForwardedFor = xForwardedFor_example # String | This is a header that provides tracking information for API usage. (optional)
try:
api_response = api_instance.del_blwl_file(listType, serverType, file, authorization, failOnError=failOnError, xForwardedFor=xForwardedFor)
pprint(api_response)
except ApiException as e:
print("Exception when calling BlwlNApi->delBlwlFile: %s\n" % e)
Parameters
Name | Description |
---|---|
list_type* |
String
Type of list, blacklist or whitelist.
Required
|
server_type* |
String
Server type of the list. Could be one of ip, url or domain.
Required
|
Name | Description |
---|---|
Authorization* | |
X-Forwarded-For |
String
This is a header that provides tracking information for API usage.
|
Name | Description |
---|---|
file* |
File
csv file, with a single column for server.
Required
|
failOnError |
Boolean
Whether to partially process the file in case of parsing errors.
|