Skip to content

Latest commit

 

History

History
543 lines (390 loc) · 16.6 KB

EdgeJobsApi.md

File metadata and controls

543 lines (390 loc) · 16.6 KB

portainer_ce_api.EdgeJobsApi

All URIs are relative to http://localhost/api

Method HTTP request Description
edge_job_create POST /edge_jobs Create an EdgeJob
edge_job_delete DELETE /edge_jobs/{id} Delete an EdgeJob
edge_job_file GET /edge_jobs/{id}/file Fetch a file of an EdgeJob
edge_job_inspect GET /edge_jobs/{id} Inspect an EdgeJob
edge_job_list GET /edge_jobs Fetch EdgeJobs list
edge_job_task_logs_inspect GET /edge_jobs/{id}/tasks/{taskID}/logs Fetch the log for a specifc task on an EdgeJob
edge_job_tasks_clear DELETE /edge_jobs/{id}/tasks/{taskID}/logs Clear the log for a specifc task on an EdgeJob
edge_job_tasks_collect POST /edge_jobs/{id}/tasks/{taskID}/logs Collect the log for a specifc task on an EdgeJob
edge_job_tasks_list GET /edge_jobs/{id}/tasks Fetch the list of tasks on an EdgeJob
edge_job_update POST /edge_jobs/{id} Update an EdgeJob

edge_job_create

PortainerEdgeGroup edge_job_create(method, body, body2)

Create an EdgeJob

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))
method = 'method_example' # str | Creation Method
body = portainer_ce_api.EdgejobsEdgeJobCreateFromFileContentPayload() # EdgejobsEdgeJobCreateFromFileContentPayload | EdgeGroup data when method is string
body2 = portainer_ce_api.EdgejobsEdgeJobCreateFromFilePayload() # EdgejobsEdgeJobCreateFromFilePayload | EdgeGroup data when method is file

try:
    # Create an EdgeJob
    api_response = api_instance.edge_job_create(method, body, body2)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_create: %s\n" % e)

Parameters

Name Type Description Notes
method str Creation Method
body EdgejobsEdgeJobCreateFromFileContentPayload EdgeGroup data when method is string
body2 EdgejobsEdgeJobCreateFromFilePayload EdgeGroup data when method is file

Return type

PortainerEdgeGroup

Authorization

jwt

HTTP request headers

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

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

edge_job_delete

edge_job_delete(id)

Delete an EdgeJob

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))
id = 'id_example' # str | EdgeJob Id

try:
    # Delete an EdgeJob
    api_instance.edge_job_delete(id)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_delete: %s\n" % e)

Parameters

Name Type Description Notes
id str EdgeJob Id

Return type

void (empty response body)

Authorization

jwt

HTTP request headers

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

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

edge_job_file

EdgejobsEdgeJobFileResponse edge_job_file(id)

Fetch a file of an EdgeJob

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))
id = 'id_example' # str | EdgeJob Id

try:
    # Fetch a file of an EdgeJob
    api_response = api_instance.edge_job_file(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_file: %s\n" % e)

Parameters

Name Type Description Notes
id str EdgeJob Id

Return type

EdgejobsEdgeJobFileResponse

Authorization

jwt

HTTP request headers

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

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

edge_job_inspect

PortainerEdgeJob edge_job_inspect(id)

Inspect an EdgeJob

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))
id = 'id_example' # str | EdgeJob Id

try:
    # Inspect an EdgeJob
    api_response = api_instance.edge_job_inspect(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_inspect: %s\n" % e)

Parameters

Name Type Description Notes
id str EdgeJob Id

Return type

PortainerEdgeJob

Authorization

jwt

HTTP request headers

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

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

edge_job_list

list[PortainerEdgeJob] edge_job_list()

Fetch EdgeJobs list

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))

try:
    # Fetch EdgeJobs list
    api_response = api_instance.edge_job_list()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_list: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

list[PortainerEdgeJob]

Authorization

jwt

HTTP request headers

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

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

edge_job_task_logs_inspect

EdgejobsFileResponse edge_job_task_logs_inspect(id, task_id)

Fetch the log for a specifc task on an EdgeJob

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))
id = 'id_example' # str | EdgeJob Id
task_id = 'task_id_example' # str | Task Id

try:
    # Fetch the log for a specifc task on an EdgeJob
    api_response = api_instance.edge_job_task_logs_inspect(id, task_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_task_logs_inspect: %s\n" % e)

Parameters

Name Type Description Notes
id str EdgeJob Id
task_id str Task Id

Return type

EdgejobsFileResponse

Authorization

jwt

HTTP request headers

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

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

edge_job_tasks_clear

edge_job_tasks_clear(id, task_id)

Clear the log for a specifc task on an EdgeJob

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))
id = 'id_example' # str | EdgeJob Id
task_id = 'task_id_example' # str | Task Id

try:
    # Clear the log for a specifc task on an EdgeJob
    api_instance.edge_job_tasks_clear(id, task_id)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_tasks_clear: %s\n" % e)

Parameters

Name Type Description Notes
id str EdgeJob Id
task_id str Task Id

Return type

void (empty response body)

Authorization

jwt

HTTP request headers

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

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

edge_job_tasks_collect

edge_job_tasks_collect(id, task_id)

Collect the log for a specifc task on an EdgeJob

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))
id = 'id_example' # str | EdgeJob Id
task_id = 'task_id_example' # str | Task Id

try:
    # Collect the log for a specifc task on an EdgeJob
    api_instance.edge_job_tasks_collect(id, task_id)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_tasks_collect: %s\n" % e)

Parameters

Name Type Description Notes
id str EdgeJob Id
task_id str Task Id

Return type

void (empty response body)

Authorization

jwt

HTTP request headers

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

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

edge_job_tasks_list

list[EdgejobsTaskContainer] edge_job_tasks_list(id)

Fetch the list of tasks on an EdgeJob

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))
id = 'id_example' # str | EdgeJob Id

try:
    # Fetch the list of tasks on an EdgeJob
    api_response = api_instance.edge_job_tasks_list(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_tasks_list: %s\n" % e)

Parameters

Name Type Description Notes
id str EdgeJob Id

Return type

list[EdgejobsTaskContainer]

Authorization

jwt

HTTP request headers

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

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

edge_job_update

PortainerEdgeJob edge_job_update(id, body)

Update an EdgeJob

Example

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

# Configure API key authorization: jwt
configuration = portainer_ce_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = portainer_ce_api.EdgeJobsApi(portainer_ce_api.ApiClient(configuration))
id = 'id_example' # str | EdgeJob Id
body = portainer_ce_api.EdgejobsEdgeJobUpdatePayload() # EdgejobsEdgeJobUpdatePayload | EdgeGroup data

try:
    # Update an EdgeJob
    api_response = api_instance.edge_job_update(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EdgeJobsApi->edge_job_update: %s\n" % e)

Parameters

Name Type Description Notes
id str EdgeJob Id
body EdgejobsEdgeJobUpdatePayload EdgeGroup data

Return type

PortainerEdgeJob

Authorization

jwt

HTTP request headers

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

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