get_service_ips
Returns service IP addresses and networks.
Returns a list of known IPs and networks used by the service specified by the service_id or service_name parameter.
/get_service_ips
Usage and SDK Samples
curl -X GET\
-H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json:"\
"https://api.scarletshark.com/v1.0/get_service_ips?service_name=&service_id=&limit=&max_age=&nonce="
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();
DefaultApi apiInstance = new DefaultApi();
String serviceName = serviceName_example; // String | The service name of the service to retrun IPs for.
Integer serviceId = 56; // Integer | The service_id of the service to retrun IPs for.
Integer limit = 56; // Integer | The number of results to return.
Integer maxAge = 56; // Integer | The max age, in days, for the last time this service was identified using this IP.
Integer nonce = 56; // Integer | A request nonce.
try {
inline_response_200 result = apiInstance.get_service_ips(serviceName, serviceId, limit, maxAge, nonce);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#get_service_ips");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String serviceName = serviceName_example; // String | The service name of the service to retrun IPs for.
Integer serviceId = 56; // Integer | The service_id of the service to retrun IPs for.
Integer limit = 56; // Integer | The number of results to return.
Integer maxAge = 56; // Integer | The max age, in days, for the last time this service was identified using this IP.
Integer nonce = 56; // Integer | A request nonce.
try {
inline_response_200 result = apiInstance.get_service_ips(serviceName, serviceId, limit, maxAge, nonce);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#get_service_ips");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
String *serviceName = serviceName_example; // The service name of the service to retrun IPs for. (optional)
Integer *serviceId = 56; // The service_id of the service to retrun IPs for. (optional)
Integer *limit = 56; // The number of results to return. (optional) (default to 5000)
Integer *maxAge = 56; // The max age, in days, for the last time this service was identified using this IP. (optional) (default to 90)
Integer *nonce = 56; // A request nonce. (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Returns service IP addresses and networks.
[apiInstance get_service_ipsWith:serviceName
serviceId:serviceId
limit:limit
maxAge:maxAge
nonce:nonce
completionHandler: ^(inline_response_200 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ScarletSharkApi = require('scarlet_shark_api');
var defaultClient = ScarletSharkApi.ApiClient.instance;
var api = new ScarletSharkApi.DefaultApi()
var opts = {
'serviceName': serviceName_example, // {{String}} The service name of the service to retrun IPs for.
'serviceId': 56, // {{Integer}} The service_id of the service to retrun IPs for.
'limit': 56, // {{Integer}} The number of results to return.
'maxAge': 56, // {{Integer}} The max age, in days, for the last time this service was identified using this IP.
'nonce': 56 // {{Integer}} A request nonce.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.get_service_ips(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class get_service_ipsExample
{
public void main()
{
var apiInstance = new DefaultApi();
var serviceName = serviceName_example; // String | The service name of the service to retrun IPs for. (optional)
var serviceId = 56; // Integer | The service_id of the service to retrun IPs for. (optional)
var limit = 56; // Integer | The number of results to return. (optional) (default to 5000)
var maxAge = 56; // Integer | The max age, in days, for the last time this service was identified using this IP. (optional) (default to 90)
var nonce = 56; // Integer | A request nonce. (optional)
try
{
// Returns service IP addresses and networks.
inline_response_200 result = apiInstance.get_service_ips(serviceName, serviceId, limit, maxAge, nonce);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.get_service_ips: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiDefaultApi();
$serviceName = serviceName_example; // String | The service name of the service to retrun IPs for.
$serviceId = 56; // Integer | The service_id of the service to retrun IPs for.
$limit = 56; // Integer | The number of results to return.
$maxAge = 56; // Integer | The max age, in days, for the last time this service was identified using this IP.
$nonce = 56; // Integer | A request nonce.
try {
$result = $api_instance->get_service_ips($serviceName, $serviceId, $limit, $maxAge, $nonce);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->get_service_ips: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $serviceName = serviceName_example; # String | The service name of the service to retrun IPs for.
my $serviceId = 56; # Integer | The service_id of the service to retrun IPs for.
my $limit = 56; # Integer | The number of results to return.
my $maxAge = 56; # Integer | The max age, in days, for the last time this service was identified using this IP.
my $nonce = 56; # Integer | A request nonce.
eval {
my $result = $api_instance->get_service_ips(serviceName => $serviceName, serviceId => $serviceId, limit => $limit, maxAge => $maxAge, nonce => $nonce);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->get_service_ips: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.DefaultApi()
serviceName = serviceName_example # String | The service name of the service to retrun IPs for. (optional)
serviceId = 56 # Integer | The service_id of the service to retrun IPs for. (optional)
limit = 56 # Integer | The number of results to return. (optional) (default to 5000)
maxAge = 56 # Integer | The max age, in days, for the last time this service was identified using this IP. (optional) (default to 90)
nonce = 56 # Integer | A request nonce. (optional)
try:
# Returns service IP addresses and networks.
api_response = api_instance.get_service_ips(serviceName=serviceName, serviceId=serviceId, limit=limit, maxAge=maxAge, nonce=nonce)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->get_service_ips: %s\n" % e)
Parameters
Name | Description |
---|---|
service_name |
String
The service name of the service to retrun IPs for.
|
service_id |
Integer
The service_id of the service to retrun IPs for.
|
limit |
Integer
The number of results to return.
|
max_age |
Integer
The max age, in days, for the last time this service was identified using this IP.
|
nonce |
Integer
A request nonce.
|