Skip to content

Latest commit

 

History

History
78 lines (58 loc) · 4.9 KB

WebhookjobApi.md

File metadata and controls

78 lines (58 loc) · 4.9 KB

harbor_client.WebhookjobApi

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

Method HTTP request Description
list_webhook_jobs GET /projects/{project_name_or_id}/webhook/jobs List project webhook jobs

list_webhook_jobs

list[WebhookJob] 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)

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

Name Type Description Notes
project_name_or_id str The name or id of the project
policy_id int The policy ID.
x_request_id str An unique ID for the request [optional]
x_is_resource_name 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 str Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=v)", "range(k=[minmax])", "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=[minmax] [optional]
sort 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 int The page number [optional] [default to 1]
page_size int The size of per page [optional] [default to 10]
status list[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] [Back to API list] [Back to Model list] [Back to README]