Reference

ssb-collector-client package

ssb_collector_client.collector module

class CollectorClient(collector_url)

Bases: object

Client for interacting with the SSB Collector service.

This class provides methods to start, stop, and monitor collector tasks.

Parameters:

collector_url (str) – The base URL of the collector service

Example

>>> client = CollectorClient("https://collector.example.com")
>>> client.collector_url
'https://collector.example.com'
running_tasks()

Get all running collector tasks.

Returns:

The “requests.Response” object from the API call

Return type:

Response

start(specification)

Start a new collector task.

Parameters:

specification (dict[str, Any]) – The JSON object of the collector specification

Returns:

The “requests.Response” object from the API call

Return type:

Response

stop(task_id)

Stop a running collector task.

Parameters:

task_id (int) – The id of the task to stop.

Returns:

The “requests.Response” object from the API call

Return type:

Response

running_tasks(collector_url)

Get all running collector tasks.

Parameters:

collector_url (str) – The URL of the collector service

Returns:

The “requests.Response” object from the API call

Return type:

Response

start(collector_url, specification)

Start a new collector task.

Parameters:
  • collector_url (str) – The URL of the collector service

  • specification (dict[str, Any]) – The JSON object of the collector specification

Returns:

The “requests.Response” object from the API call

Return type:

Response

stop(collector_url, task_id)

Stop a running collector task.

Parameters:
  • collector_url (str) – The URL of the collector service

  • task_id (int) – The id of the task to stop.

Returns:

The “requests.Response” object from the API call

Return type:

Response