harbor_client.WebhookjobApi

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

MethodHTTP requestDescription
list_webhook_jobsGET /projects/{project_name_or_id}/webhook/jobsList project webhook jobs

list_webhook_jobs

Signature

list_webhook_jobs(project_name_or_id: str, policy_id: int, x_request_id: Optional[str], x_is_resource_name: Optional[bool], q: Optional[str], sort: Optional[str], page: Optional[int], page_size: Optional[int], status: Optional[list[str]])-> list[WebhookJob]

List project webhook jobs

This endpoint returns webhook jobs of a project.

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.WebhookjobApi(harbor_client.ApiClient(configuration))
project_name_or_id = 'project_name_or_id_example' # str | The name or id of the project
policy_id = 789 # int | The policy ID.
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
x_is_resource_name = false # bool | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. (optional) (default to false)
q = 'q_example' # str | Query string to query resources. Supported query patterns are \"exact match(k=v)\", \"fuzzy match(k=~v)\", \"range(k=[min~max])\", \"list with union releationship(k={v1 v2 v3})\" and \"list with intersetion relationship(k=(v1 v2 v3))\". The value of range and list can be string(enclosed by \" or '), integer or time(in format \"2020-04-09 02:36:00\"). All of these query patterns should be put in the query string \"q=xxx\" and splitted by \",\". e.g. q=k1=v1,k2=~v2,k3=[min~max] (optional)
sort = 'sort_example' # str | Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with \"sort=field1,-field2\" (optional)
page = 1 # int | The page number (optional) (default to 1)
page_size = 10 # int | The size of per page (optional) (default to 10)
status = ['status_example'] # list[str] | The status of webhook job. (optional)

try:
    # List project webhook jobs
    api_response = api_instance.list_webhook_jobs(project_name_or_id, policy_id, x_request_id=x_request_id, x_is_resource_name=x_is_resource_name, q=q, sort=sort, page=page, page_size=page_size, status=status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhookjobApi->list_webhook_jobs: %s\n" % e)

Parameters

NameTypeDescriptionNotes
project_name_or_idstrThe name or id of the project
policy_idintThe policy ID.
x_request_idstrAn unique ID for the request[optional]
x_is_resource_nameboolThe flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name.[optional] [default to false]
qstrQuery string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=~v2,k3=[min~max][optional]
sortstrSort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with "sort=field1,-field2"[optional]
pageintThe page number[optional] [default to 1]
page_sizeintThe size of per page[optional] [default to 10]
statuslist[str]The status of webhook job.[optional]

Return type

list[WebhookJob]

Authorization

basic

HTTP request headers

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

[Back to top]