harbor_client.ScheduleApi

All URIs are relative to http://localhost/api/v2.0

MethodHTTP requestDescription
get_schedule_pausedGET /schedules/{job_type}/paused
list_schedulesGET /schedules

get_schedule_paused

Signature

get_schedule_paused(job_type: str, x_request_id: Optional[str])-> SchedulerStatus

Get scheduler paused status

Example

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

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.ScheduleApi(harbor_client.ApiClient(configuration))
job_type = 'job_type_example' # str | The type of the job. 'all' stands for all job types, current only support query with all
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    api_response = api_instance.get_schedule_paused(job_type, x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduleApi->get_schedule_paused: %s\n" % e)

Parameters

NameTypeDescriptionNotes
job_typestrThe type of the job. 'all' stands for all job types, current only support query with all
x_request_idstrAn unique ID for the request[optional]

Return type

SchedulerStatus

Authorization

basic

HTTP request headers

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

[Back to top]

list_schedules

Signature

list_schedules(x_request_id: Optional[str], page: Optional[int], page_size: Optional[int])-> list[ScheduleTask]

List schedules

Example

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

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.ScheduleApi(harbor_client.ApiClient(configuration))
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
page = 1 # int | The page number (optional) (default to 1)
page_size = 10 # int | The size of per page (optional) (default to 10)

try:
    api_response = api_instance.list_schedules(x_request_id=x_request_id, page=page, page_size=page_size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduleApi->list_schedules: %s\n" % e)

Parameters

NameTypeDescriptionNotes
x_request_idstrAn unique ID for the request[optional]
pageintThe page number[optional] [default to 1]
page_sizeintThe size of per page[optional] [default to 10]

Return type

list[ScheduleTask]

Authorization

basic

HTTP request headers

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

[Back to top]