flamenco/addon/flamenco/manager/docs/WorkerMgtApi.md
2022-05-31 11:21:41 +02:00

3.6 KiB

flamenco.manager.WorkerMgtApi

All URIs are relative to http://localhost

Method HTTP request Description
fetch_worker GET /api/worker-mgt/workers/{worker_id} Fetch info about the worker.
fetch_workers GET /api/worker-mgt/workers Get list of workers.

fetch_worker

Worker fetch_worker(worker_id)

Fetch info about the worker.

Example

import time
import flamenco.manager
from flamenco.manager.api import worker_mgt_api
from flamenco.manager.model.worker import Worker
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = flamenco.manager.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with flamenco.manager.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = worker_mgt_api.WorkerMgtApi(api_client)
    worker_id = "worker_id_example" # str | 

    # example passing only required values which don't have defaults set
    try:
        # Fetch info about the worker.
        api_response = api_instance.fetch_worker(worker_id)
        pprint(api_response)
    except flamenco.manager.ApiException as e:
        print("Exception when calling WorkerMgtApi->fetch_worker: %s\n" % e)

Parameters

Name Type Description Notes
worker_id str

Return type

Worker

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Worker info -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetch_workers

WorkerList fetch_workers()

Get list of workers.

Example

import time
import flamenco.manager
from flamenco.manager.api import worker_mgt_api
from flamenco.manager.model.worker_list import WorkerList
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = flamenco.manager.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with flamenco.manager.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = worker_mgt_api.WorkerMgtApi(api_client)

    # example, this endpoint has no required or optional parameters
    try:
        # Get list of workers.
        api_response = api_instance.fetch_workers()
        pprint(api_response)
    except flamenco.manager.ApiException as e:
        print("Exception when calling WorkerMgtApi->fetch_workers: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

WorkerList

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Known workers -

[Back to top] [Back to API list] [Back to Model list] [Back to README]