optimserverclientpython.TaskApi

All URIs are relative to https://dbos

Method HTTP request Description
get_task GET /tasks/{taskId} Get a specific task details.
get_tasks GET /tasks Get all known tasks.

get_task

Task get_task(task_id)

Get a specific task details.

This API retrieves the details for a specific task. If the task is known, but disabled (the worker is down), details can still be retrieved. This is, on purpose, not the same behaviour as the API to retrieve the list of tasks. This allows to get information about completed jobs derived from disabled tasks.

Example

from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = optimserverclientpython.TaskApi()
task_id = 'task_id_example' # str | 

try:
    # Get a specific task details.
    api_response = api_instance.get_task(task_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TaskApi->get_task: %s\n" % e)

Parameters

Name Type Description Notes
task_id str

Return type

Task

HTTP request headers

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

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

get_tasks

list[Task] get_tasks()

Get all known tasks.

This API allows you to retrieve all currently known tasks in the system. The list of tasks is an aggregate of all the taskIds supported by the connected workers.

Example

from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = optimserverclientpython.TaskApi()

try:
    # Get all known tasks.
    api_response = api_instance.get_tasks()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TaskApi->get_tasks: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

list[Task]

HTTP request headers

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

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