Skip to content

Latest commit

 

History

History
214 lines (143 loc) · 4.98 KB

TasksApi.md

File metadata and controls

214 lines (143 loc) · 4.98 KB

nexuscli.TasksApi

All URIs are relative to https://localhost/service/siesta/

Method HTTP request Description
get_task_by_id GET /rest/beta/tasks/{id} Get a single task by id
get_tasks GET /rest/beta/tasks List tasks
run POST /rest/beta/tasks/{id}/run Run task
stop POST /rest/beta/tasks/{id}/stop Stop task

get_task_by_id

TaskXO get_task_by_id(id)

Get a single task by id

Example

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

# Configure HTTP basic authorization: basicAuth
nexuscli.configuration.username = 'YOUR_USERNAME'
nexuscli.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = nexuscli.TasksApi()
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)

Parameters

Name Type Description Notes
id str Id of the task to get

Return type

TaskXO

Authorization

basicAuth

HTTP request headers

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

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

get_tasks

PageTaskXO get_tasks()

List tasks

Example

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

# Configure HTTP basic authorization: basicAuth
nexuscli.configuration.username = 'YOUR_USERNAME'
nexuscli.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = nexuscli.TasksApi()

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

Parameters

This endpoint does not need any parameter.

Return type

PageTaskXO

Authorization

basicAuth

HTTP request headers

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

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

run

run(id)

Run task

Example

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

# Configure HTTP basic authorization: basicAuth
nexuscli.configuration.username = 'YOUR_USERNAME'
nexuscli.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = nexuscli.TasksApi()
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)

Parameters

Name Type Description Notes
id str Id of the task to run

Return type

void (empty response body)

Authorization

basicAuth

HTTP request headers

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

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

stop

stop(id)

Stop task

Example

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

# Configure HTTP basic authorization: basicAuth
nexuscli.configuration.username = 'YOUR_USERNAME'
nexuscli.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = nexuscli.TasksApi()
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)

Parameters

Name Type Description Notes
id str Id of the task to stop

Return type

void (empty response body)

Authorization

basicAuth

HTTP request headers

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

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