All URIs are relative to http://localhost/api
Method | HTTP request | Description |
---|---|---|
get_task | GET /task/{id} | Get the status or result of a task |
{str: (bool, date, datetime, dict, float, int, list, str, none_type)} get_task(id)
Get the status or result of a task
import time
import ibutsu_client
from ibutsu_client.api import task_api
from pprint import pprint
# Defining the host is optional and defaults to http://localhost/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
host = "http://localhost/api"
)
# Enter a context with an instance of the API client
with ibutsu_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = task_api.TaskApi(api_client)
id = "id_example" # str | The ID of the task
# example passing only required values which don't have defaults set
try:
# Get the status or result of a task
api_response = api_instance.get_task(id)
pprint(api_response)
except ibutsu_client.ApiException as e:
print("Exception when calling TaskApi->get_task: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The ID of the task |
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
No authorization required
- Content-Type: Not defined
- Accept: application/json, text/plain
Status code | Description | Response headers |
---|---|---|
200 | The task has completed and the data has been returned | - |
206 | The task either doesn't exist or hasn't finished | - |
203 | Error occurred in the task | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]