THOR Thunderstorm API

Info

info

Receive static information about the running THOR instance

Receive static information about the running THOR instance.


/api/info

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8080/api/v1/api/info"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InfoApi;

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

public class InfoApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        InfoApi apiInstance = new InfoApi();

        try {
            ThunderstormInfo result = apiInstance.info();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#info");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.info();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->info: $e\n');
}

import org.openapitools.client.api.InfoApi;

public class InfoApiExample {
    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();

        try {
            ThunderstormInfo result = apiInstance.info();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#info");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
InfoApi *apiInstance = [[InfoApi alloc] init];

// Receive static information about the running THOR instance
[apiInstance infoWithCompletionHandler: 
              ^(ThunderstormInfo output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ThorThunderstormApi = require('thor_thunderstorm_api');

// Create an instance of the API class
var api = new ThorThunderstormApi.InfoApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.info(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class infoExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new InfoApi();

            try {
                // Receive static information about the running THOR instance
                ThunderstormInfo result = apiInstance.info();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling InfoApi.info: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InfoApi();

try {
    $result = $api_instance->info();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->info: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InfoApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InfoApi->new();

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

# Create an instance of the API class
api_instance = openapi_client.InfoApi()

try:
    # Receive static information about the running THOR instance
    api_response = api_instance.info()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->info: %s\n" % e)
extern crate InfoApi;

pub fn main() {

    let mut context = InfoApi::Context::default();
    let result = client.info(&context).wait();

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

Scopes

Parameters

Responses


queueHistory

Retrieve a history of how many asynchronous requests were queued

Retrieve a history of how many asynchronous requests were queued


/api/queueHistory

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8080/api/v1/api/queueHistory?aggregate=789&limit=789"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InfoApi;

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

public class InfoApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        InfoApi apiInstance = new InfoApi();
        Long aggregate = 789; // Long | Aggregate this many minutes per value (default 1).
        Long limit = 789; // Long | Give a history for the last this many minutes (default infinite).

        try {
            map['String', Long] result = apiInstance.queueHistory(aggregate, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#queueHistory");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Long aggregate = new Long(); // Long | Aggregate this many minutes per value (default 1).
final Long limit = new Long(); // Long | Give a history for the last this many minutes (default infinite).

try {
    final result = await api_instance.queueHistory(aggregate, limit);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->queueHistory: $e\n');
}

import org.openapitools.client.api.InfoApi;

public class InfoApiExample {
    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();
        Long aggregate = 789; // Long | Aggregate this many minutes per value (default 1).
        Long limit = 789; // Long | Give a history for the last this many minutes (default infinite).

        try {
            map['String', Long] result = apiInstance.queueHistory(aggregate, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#queueHistory");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
InfoApi *apiInstance = [[InfoApi alloc] init];
Long *aggregate = 789; // Aggregate this many minutes per value (default 1). (optional) (default to null)
Long *limit = 789; // Give a history for the last this many minutes (default infinite). (optional) (default to null)

// Retrieve a history of how many asynchronous requests were queued
[apiInstance queueHistoryWith:aggregate
    limit:limit
              completionHandler: ^(map['String', Long] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ThorThunderstormApi = require('thor_thunderstorm_api');

// Create an instance of the API class
var api = new ThorThunderstormApi.InfoApi()
var opts = {
  'aggregate': 789, // {Long} Aggregate this many minutes per value (default 1).
  'limit': 789 // {Long} Give a history for the last this many minutes (default infinite).
};

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

namespace Example
{
    public class queueHistoryExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new InfoApi();
            var aggregate = 789;  // Long | Aggregate this many minutes per value (default 1). (optional)  (default to null)
            var limit = 789;  // Long | Give a history for the last this many minutes (default infinite). (optional)  (default to null)

            try {
                // Retrieve a history of how many asynchronous requests were queued
                map['String', Long] result = apiInstance.queueHistory(aggregate, limit);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling InfoApi.queueHistory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InfoApi();
$aggregate = 789; // Long | Aggregate this many minutes per value (default 1).
$limit = 789; // Long | Give a history for the last this many minutes (default infinite).

try {
    $result = $api_instance->queueHistory($aggregate, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->queueHistory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InfoApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InfoApi->new();
my $aggregate = 789; # Long | Aggregate this many minutes per value (default 1).
my $limit = 789; # Long | Give a history for the last this many minutes (default infinite).

eval {
    my $result = $api_instance->queueHistory(aggregate => $aggregate, limit => $limit);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InfoApi->queueHistory: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.InfoApi()
aggregate = 789 # Long | Aggregate this many minutes per value (default 1). (optional) (default to null)
limit = 789 # Long | Give a history for the last this many minutes (default infinite). (optional) (default to null)

try:
    # Retrieve a history of how many asynchronous requests were queued
    api_response = api_instance.queue_history(aggregate=aggregate, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->queueHistory: %s\n" % e)
extern crate InfoApi;

pub fn main() {
    let aggregate = 789; // Long
    let limit = 789; // Long

    let mut context = InfoApi::Context::default();
    let result = client.queueHistory(aggregate, limit, &context).wait();

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

Scopes

Parameters

Query parameters
Name Description
aggregate
Long (int64)
Aggregate this many minutes per value (default 1).
limit
Long (int64)
Give a history for the last this many minutes (default infinite).

Responses


sampleHistory

Retrieve a history of how many samples were scanned

Retrieve a history of how many samples were scanned.


/api/sampleHistory

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8080/api/v1/api/sampleHistory?aggregate=789&limit=789"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InfoApi;

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

public class InfoApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        InfoApi apiInstance = new InfoApi();
        Long aggregate = 789; // Long | Aggregate this many minutes per value (default 1).
        Long limit = 789; // Long | Give a history for the last this many minutes (default infinite).

        try {
            map['String', Long] result = apiInstance.sampleHistory(aggregate, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#sampleHistory");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Long aggregate = new Long(); // Long | Aggregate this many minutes per value (default 1).
final Long limit = new Long(); // Long | Give a history for the last this many minutes (default infinite).

try {
    final result = await api_instance.sampleHistory(aggregate, limit);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->sampleHistory: $e\n');
}

import org.openapitools.client.api.InfoApi;

public class InfoApiExample {
    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();
        Long aggregate = 789; // Long | Aggregate this many minutes per value (default 1).
        Long limit = 789; // Long | Give a history for the last this many minutes (default infinite).

        try {
            map['String', Long] result = apiInstance.sampleHistory(aggregate, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#sampleHistory");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
InfoApi *apiInstance = [[InfoApi alloc] init];
Long *aggregate = 789; // Aggregate this many minutes per value (default 1). (optional) (default to null)
Long *limit = 789; // Give a history for the last this many minutes (default infinite). (optional) (default to null)

// Retrieve a history of how many samples were scanned
[apiInstance sampleHistoryWith:aggregate
    limit:limit
              completionHandler: ^(map['String', Long] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ThorThunderstormApi = require('thor_thunderstorm_api');

// Create an instance of the API class
var api = new ThorThunderstormApi.InfoApi()
var opts = {
  'aggregate': 789, // {Long} Aggregate this many minutes per value (default 1).
  'limit': 789 // {Long} Give a history for the last this many minutes (default infinite).
};

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

namespace Example
{
    public class sampleHistoryExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new InfoApi();
            var aggregate = 789;  // Long | Aggregate this many minutes per value (default 1). (optional)  (default to null)
            var limit = 789;  // Long | Give a history for the last this many minutes (default infinite). (optional)  (default to null)

            try {
                // Retrieve a history of how many samples were scanned
                map['String', Long] result = apiInstance.sampleHistory(aggregate, limit);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling InfoApi.sampleHistory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InfoApi();
$aggregate = 789; // Long | Aggregate this many minutes per value (default 1).
$limit = 789; // Long | Give a history for the last this many minutes (default infinite).

try {
    $result = $api_instance->sampleHistory($aggregate, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->sampleHistory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InfoApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InfoApi->new();
my $aggregate = 789; # Long | Aggregate this many minutes per value (default 1).
my $limit = 789; # Long | Give a history for the last this many minutes (default infinite).

eval {
    my $result = $api_instance->sampleHistory(aggregate => $aggregate, limit => $limit);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InfoApi->sampleHistory: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.InfoApi()
aggregate = 789 # Long | Aggregate this many minutes per value (default 1). (optional) (default to null)
limit = 789 # Long | Give a history for the last this many minutes (default infinite). (optional) (default to null)

try:
    # Retrieve a history of how many samples were scanned
    api_response = api_instance.sample_history(aggregate=aggregate, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->sampleHistory: %s\n" % e)
extern crate InfoApi;

pub fn main() {
    let aggregate = 789; // Long
    let limit = 789; // Long

    let mut context = InfoApi::Context::default();
    let result = client.sampleHistory(aggregate, limit, &context).wait();

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

Scopes

Parameters

Query parameters
Name Description
aggregate
Long (int64)
Aggregate this many minutes per value (default 1).
limit
Long (int64)
Give a history for the last this many minutes (default infinite).

Responses


status

Receive live information about the running THOR instance

Receive live information about the running THOR instance.


/api/status

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8080/api/v1/api/status"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InfoApi;

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

public class InfoApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        InfoApi apiInstance = new InfoApi();

        try {
            ThunderstormStatus result = apiInstance.status();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#status");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.status();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->status: $e\n');
}

import org.openapitools.client.api.InfoApi;

public class InfoApiExample {
    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();

        try {
            ThunderstormStatus result = apiInstance.status();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#status");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
InfoApi *apiInstance = [[InfoApi alloc] init];

// Receive live information about the running THOR instance
[apiInstance statusWithCompletionHandler: 
              ^(ThunderstormStatus output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ThorThunderstormApi = require('thor_thunderstorm_api');

// Create an instance of the API class
var api = new ThorThunderstormApi.InfoApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class statusExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new InfoApi();

            try {
                // Receive live information about the running THOR instance
                ThunderstormStatus result = apiInstance.status();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling InfoApi.status: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InfoApi();

try {
    $result = $api_instance->status();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->status: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InfoApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InfoApi->new();

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

# Create an instance of the API class
api_instance = openapi_client.InfoApi()

try:
    # Receive live information about the running THOR instance
    api_response = api_instance.status()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->status: %s\n" % e)
extern crate InfoApi;

pub fn main() {

    let mut context = InfoApi::Context::default();
    let result = client.status(&context).wait();

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

Scopes

Parameters

Responses


Results

getAsyncResults

Retrieve the results of an asynchronous file check

Retrieve the results of an asynchronous file check.


/api/getAsyncResults

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8080/api/v1/api/getAsyncResults?id=789"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ResultsApi;

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

public class ResultsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ResultsApi apiInstance = new ResultsApi();
        Id id = 789; // Id | Sample ID

        try {
            AsyncResult result = apiInstance.getAsyncResults(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResultsApi#getAsyncResults");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Id id = new Id(); // Id | Sample ID

try {
    final result = await api_instance.getAsyncResults(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getAsyncResults: $e\n');
}

import org.openapitools.client.api.ResultsApi;

public class ResultsApiExample {
    public static void main(String[] args) {
        ResultsApi apiInstance = new ResultsApi();
        Id id = 789; // Id | Sample ID

        try {
            AsyncResult result = apiInstance.getAsyncResults(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResultsApi#getAsyncResults");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ResultsApi *apiInstance = [[ResultsApi alloc] init];
Id *id = 789; // Sample ID (default to null)

// Retrieve the results of an asynchronous file check
[apiInstance getAsyncResultsWith:id
              completionHandler: ^(AsyncResult output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ThorThunderstormApi = require('thor_thunderstorm_api');

// Create an instance of the API class
var api = new ThorThunderstormApi.ResultsApi()
var id = 789; // {Id} Sample ID

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

namespace Example
{
    public class getAsyncResultsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ResultsApi();
            var id = 789;  // Id | Sample ID (default to null)

            try {
                // Retrieve the results of an asynchronous file check
                AsyncResult result = apiInstance.getAsyncResults(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ResultsApi.getAsyncResults: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ResultsApi();
$id = 789; // Id | Sample ID

try {
    $result = $api_instance->getAsyncResults($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResultsApi->getAsyncResults: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ResultsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ResultsApi->new();
my $id = 789; # Id | Sample ID

eval {
    my $result = $api_instance->getAsyncResults(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResultsApi->getAsyncResults: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ResultsApi()
id = 789 # Id | Sample ID (default to null)

try:
    # Retrieve the results of an asynchronous file check
    api_response = api_instance.get_async_results(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResultsApi->getAsyncResults: %s\n" % e)
extern crate ResultsApi;

pub fn main() {
    let id = 789; // Id

    let mut context = ResultsApi::Context::default();
    let result = client.getAsyncResults(id, &context).wait();

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

Scopes

Parameters

Query parameters
Name Description
id*
Id (int64)
Sample ID
Required

Responses


Scan

check

Check a file with THOR

Check a file with THOR


/api/check

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: multipart/form-data" \
 "http://localhost:8080/api/v1/api/check?source=source_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ScanApi;

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

public class ScanApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ScanApi apiInstance = new ScanApi();
        File file = BINARY_DATA_HERE; // File | File to be checked
        String source = source_example; // String | Specify source for the THOR log

        try {
            array[Map] result = apiInstance.check(file, source);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScanApi#check");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final File file = new File(); // File | File to be checked
final String source = new String(); // String | Specify source for the THOR log

try {
    final result = await api_instance.check(file, source);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->check: $e\n');
}

import org.openapitools.client.api.ScanApi;

public class ScanApiExample {
    public static void main(String[] args) {
        ScanApi apiInstance = new ScanApi();
        File file = BINARY_DATA_HERE; // File | File to be checked
        String source = source_example; // String | Specify source for the THOR log

        try {
            array[Map] result = apiInstance.check(file, source);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScanApi#check");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ScanApi *apiInstance = [[ScanApi alloc] init];
File *file = BINARY_DATA_HERE; // File to be checked (default to null)
String *source = source_example; // Specify source for the THOR log (optional) (default to null)

// Check a file with THOR
[apiInstance checkWith:file
    source:source
              completionHandler: ^(array[Map] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ThorThunderstormApi = require('thor_thunderstorm_api');

// Create an instance of the API class
var api = new ThorThunderstormApi.ScanApi()
var file = BINARY_DATA_HERE; // {File} File to be checked
var opts = {
  'source': source_example // {String} Specify source for the THOR log
};

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

namespace Example
{
    public class checkExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ScanApi();
            var file = BINARY_DATA_HERE;  // File | File to be checked (default to null)
            var source = source_example;  // String | Specify source for the THOR log (optional)  (default to null)

            try {
                // Check a file with THOR
                array[Map] result = apiInstance.check(file, source);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ScanApi.check: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ScanApi();
$file = BINARY_DATA_HERE; // File | File to be checked
$source = source_example; // String | Specify source for the THOR log

try {
    $result = $api_instance->check($file, $source);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ScanApi->check: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ScanApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ScanApi->new();
my $file = BINARY_DATA_HERE; # File | File to be checked
my $source = source_example; # String | Specify source for the THOR log

eval {
    my $result = $api_instance->check(file => $file, source => $source);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScanApi->check: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ScanApi()
file = BINARY_DATA_HERE # File | File to be checked (default to null)
source = source_example # String | Specify source for the THOR log (optional) (default to null)

try:
    # Check a file with THOR
    api_response = api_instance.check(file, source=source)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScanApi->check: %s\n" % e)
extern crate ScanApi;

pub fn main() {
    let file = BINARY_DATA_HERE; // File
    let source = source_example; // String

    let mut context = ScanApi::Context::default();
    let result = client.check(file, source, &context).wait();

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

Scopes

Parameters

Form parameters
Name Description
file*
File (binary)
File to be checked
Required
Query parameters
Name Description
source
String
Specify source for the THOR log

Responses


checkAsync

Check a file with THOR asynchronously

Check a file with THOR asynchronously


/api/checkAsync

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: multipart/form-data" \
 "http://localhost:8080/api/v1/api/checkAsync?source=source_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ScanApi;

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

public class ScanApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ScanApi apiInstance = new ScanApi();
        File file = BINARY_DATA_HERE; // File | File to be checked
        String source = source_example; // String | Specify source for the THOR log

        try {
            SampleId result = apiInstance.checkAsync(file, source);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScanApi#checkAsync");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final File file = new File(); // File | File to be checked
final String source = new String(); // String | Specify source for the THOR log

try {
    final result = await api_instance.checkAsync(file, source);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->checkAsync: $e\n');
}

import org.openapitools.client.api.ScanApi;

public class ScanApiExample {
    public static void main(String[] args) {
        ScanApi apiInstance = new ScanApi();
        File file = BINARY_DATA_HERE; // File | File to be checked
        String source = source_example; // String | Specify source for the THOR log

        try {
            SampleId result = apiInstance.checkAsync(file, source);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScanApi#checkAsync");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ScanApi *apiInstance = [[ScanApi alloc] init];
File *file = BINARY_DATA_HERE; // File to be checked (default to null)
String *source = source_example; // Specify source for the THOR log (optional) (default to null)

// Check a file with THOR asynchronously
[apiInstance checkAsyncWith:file
    source:source
              completionHandler: ^(SampleId output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ThorThunderstormApi = require('thor_thunderstorm_api');

// Create an instance of the API class
var api = new ThorThunderstormApi.ScanApi()
var file = BINARY_DATA_HERE; // {File} File to be checked
var opts = {
  'source': source_example // {String} Specify source for the THOR log
};

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

namespace Example
{
    public class checkAsyncExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ScanApi();
            var file = BINARY_DATA_HERE;  // File | File to be checked (default to null)
            var source = source_example;  // String | Specify source for the THOR log (optional)  (default to null)

            try {
                // Check a file with THOR asynchronously
                SampleId result = apiInstance.checkAsync(file, source);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ScanApi.checkAsync: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ScanApi();
$file = BINARY_DATA_HERE; // File | File to be checked
$source = source_example; // String | Specify source for the THOR log

try {
    $result = $api_instance->checkAsync($file, $source);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ScanApi->checkAsync: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ScanApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ScanApi->new();
my $file = BINARY_DATA_HERE; # File | File to be checked
my $source = source_example; # String | Specify source for the THOR log

eval {
    my $result = $api_instance->checkAsync(file => $file, source => $source);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScanApi->checkAsync: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ScanApi()
file = BINARY_DATA_HERE # File | File to be checked (default to null)
source = source_example # String | Specify source for the THOR log (optional) (default to null)

try:
    # Check a file with THOR asynchronously
    api_response = api_instance.check_async(file, source=source)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScanApi->checkAsync: %s\n" % e)
extern crate ScanApi;

pub fn main() {
    let file = BINARY_DATA_HERE; // File
    let source = source_example; // String

    let mut context = ScanApi::Context::default();
    let result = client.checkAsync(file, source, &context).wait();

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

Scopes

Parameters

Form parameters
Name Description
file*
File (binary)
File to be checked
Required
Query parameters
Name Description
source
String
Specify source for the THOR log

Responses