Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 4.29 KB

WebhookjobApi.md

File metadata and controls

81 lines (58 loc) · 4.29 KB

Harbor2Client::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

Array<WebhookJob> list_webhook_jobs(project_name_or_idpolicy_id, opts)

List project webhook jobs

This endpoint returns webhook jobs of a project.

Example

# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
  # Configure HTTP basic authorization: basic
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = Harbor2Client::WebhookjobApi.new

project_name_or_id = 'project_name_or_id_example' # String | The name or id of the project

policy_id = 789 # Integer | The policy ID.

opts = { 
  x_request_id: 'x_request_id_example' # String | An unique ID for the request
  x_is_resource_name: false # BOOLEAN | 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.
  q: 'q_example', # String | 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]
  sort: 'sort_example', # String | 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\"
  page: 1, # Integer | The page number
  page_size: 10, # Integer | The size of per page
  status: ['status_example'] # Array<String> | The status of webhook job.
}

begin
  #List project webhook jobs
  result = api_instance.list_webhook_jobs(project_name_or_idpolicy_id, opts)
  p result
rescue Harbor2Client::ApiError => e
  puts "Exception when calling WebhookjobApi->list_webhook_jobs: #{e}"
end

Parameters

Name Type Description Notes
project_name_or_id String The name or id of the project
policy_id Integer The policy ID.
x_request_id String An unique ID for the request [optional]
x_is_resource_name BOOLEAN 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 String Query string to query resources. Supported query patterns are &quot;exact match(k=v)&quot;, &quot;fuzzy match(k=v)&quot;, &quot;range(k=[minmax])&quot;, &quot;list with union releationship(k={v1 v2 v3})&quot; and &quot;list with intersetion relationship(k=(v1 v2 v3))&quot;. The value of range and list can be string(enclosed by &quot; or '), integer or time(in format &quot;2020-04-09 02:36:00&quot;). All of these query patterns should be put in the query string &quot;q=xxx&quot; and splitted by &quot;,&quot;. e.g. q=k1=v1,k2=v2,k3=[minmax] [optional]
sort String Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with &quot;sort=field1,-field2&quot; [optional]
page Integer The page number [optional] [default to 1]
page_size Integer The size of per page [optional] [default to 10]
status Array<String> The status of webhook job. [optional]

Return type

Array<WebhookJob>

Authorization

basic

HTTP request headers

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