All URIs are relative to http://localhost/service/rest
| Method | HTTP request | Description |
|---|---|---|
| get_task_by_id | GET /v1/tasks/{id} | Get a single task by id |
| get_tasks | GET /v1/tasks | List tasks |
| run | POST /v1/tasks/{id}/run | Run task |
| stop | POST /v1/tasks/{id}/stop | Stop task |
TaskXO get_task_by_id(id)
Get a single task by id
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.TasksApi(api_client)
id = 'id_example' # str | Id of the task to get
try:
# Get a single task by id
api_response = api_instance.get_task_by_id(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TasksApi->get_task_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Id of the task to get |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
| 404 | Task not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PageTaskXO get_tasks(type=type)
List tasks
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.TasksApi(api_client)
type = 'type_example' # str | Type of the tasks to get (optional)
try:
# List tasks
api_response = api_instance.get_tasks(type=type)
pprint(api_response)
except ApiException as e:
print("Exception when calling TasksApi->get_tasks: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| type | str | Type of the tasks to get | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
run(id)
Run task
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.TasksApi(api_client)
id = 'id_example' # str | Id of the task to run
try:
# Run task
api_instance.run(id)
except ApiException as e:
print("Exception when calling TasksApi->run: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Id of the task to run |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Task was run | - |
| 404 | Task not found | - |
| 405 | Task is disabled | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
stop(id)
Stop task
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.TasksApi(api_client)
id = 'id_example' # str | Id of the task to stop
try:
# Stop task
api_instance.stop(id)
except ApiException as e:
print("Exception when calling TasksApi->stop: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Id of the task to stop |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Task was stopped | - |
| 404 | Task not found | - |
| 409 | Unable to stop task | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]