Skip to main content

workers

POST /workers.get_activity_report

Description

Returns count of active company workers in the selected time range.

Parameters

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
from_date
required
Starting time (in seconds from epoch) for collecting statisticsnumber
interval
required
Time interval in seconds for a single statistics point. The minimal value is 1integer
to_date
required
Ending time (in seconds from epoch) for collecting statisticsnumber

Responses

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
active
optional
Activity series that include only workers that worked on a task in the given
time interval.
workers.activity_series
total
optional
Activity series that include all the workers that sent reports in the given
time interval.
workers.activity_series

POST /workers.get_all

Description

Returns information on all registered workers.

Parameters

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
last_seen
optional
Filter out workers not active for more than last_seen seconds. A value or 0 or
'none' will disable the filter.
integer
system_tags
optional
The list of allowed worker system tags. Prepend tag value with '-' in order to
exclude
< string > array
tags
optional
The list of allowed worker tags. Prepend tag value with '-' in order to exclude< string > array

Responses

HTTP CodeSchema
200Response 200

Response 200

NameSchema
workers
optional
< workers.worker > array

POST /workers.get_count

Description

Returns the number of registered workers.

Parameters

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
last_seen
optional
Filter out workers not active for more than last_seen seconds. A value or 0 or
'none' will disable the filter.
integer
system_tags
optional
The list of allowed worker system tags. Prepend tag value with '-' in order to
exclude
< string > array
tags
optional
The list of allowed worker tags. Prepend tag value with '-' in order to exclude< string > array

Responses

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
count
optional
Workers countinteger

POST /workers.get_metric_keys

Description

Returns worker statistics metric keys grouped by categories.

Parameters

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
worker_ids
optional
List of worker ids to collect metrics for. If not provided or empty then all
the company workers metrics are analyzed.
< string > array

Responses

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
categories
optional
List of unique metric categories found in the statistics of the requested
workers.
< workers.metrics_category > array

POST /workers.get_stats

Description

Returns statistics for the selected workers and time range aggregated by date
intervals.

Parameters

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
from_date
required
Starting time (in seconds from epoch) for collecting statisticsnumber
interval
required
Time interval in seconds for a single statistics point. The minimal value is 1integer
items
required
List of metric keys and requested statistics< workers.stat_item > array
split_by_variant
optional
If true then break statistics by hardware sub types
Default : false
boolean
to_date
required
Ending time (in seconds from epoch) for collecting statisticsnumber
worker_ids
optional
List of worker ids to collect metrics for. If not provided or empty then all
the company workers metrics are analyzed.
< string > array

Responses

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
workers
optional
List of the requested workers with their statistics< workers.worker_stats > array

POST /workers.register

Description

Register a worker in the system. Called by the Worker Daemon.

Parameters

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
queues
optional
List of queue IDs on which the worker is listening.< string > array
system_tags
optional
System tags for the worker< string > array
tags
optional
User tags for the worker< string > array
timeout
optional
Registration timeout in seconds. If timeout seconds have passed since the
worker's last call to register or status_report, the worker is automatically
removed from the list of registered workers.
integer
worker
required
Worker id. Must be unique in company.string

Responses

HTTP CodeSchema
200object

POST /workers.status_report

Description

Called periodically by the worker daemon to report machine status

Parameters

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
machine_stats
optional
The machine statistics.workers.machine_stats
queue
optional
ID of the queue from which task was received. If no queue is sent, the worker's
queue field will be cleared.
string
queues
optional
List of queue IDs on which the worker is listening. If null, the worker's
queues list will not be updated.
< string > array
system_tags
optional
New system tags for the worker< string > array
tags
optional
New user tags for the worker< string > array
task
optional
ID of a task currently being run by the worker. If no task is sent, the
worker's task field will be cleared.
string
timestamp
required
UNIX time in seconds since epoch.integer
worker
required
Worker id.string

Responses

HTTP CodeSchema
200object

POST /workers.unregister

Description

Unregister a worker in the system. Called by the Worker Daemon.

Parameters

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
worker
required
Worker id. Must be unique in company.string

Responses

HTTP CodeSchema
200object