Description: Gets a list of worker services, or a filtered list of worker services associated with a specific action. To get a specific worker by workersKey
, see Get Specified Worker.
Since: 7.63.2
Security: Admin user.
Usage: GET /worker/api/v1/workers
Produces: application/json; charset=utf-8
Header parameter: Authorization: Bearer
Sample Usage
curl -X GET 'https://myserver.com/worker/api/v1/workers
Query Parameters
Name | Datatype | Mandatory | Description |
---|---|---|---|
action | string | No | If an action is provided, only workers associated with the given action will be returned, otherwise the full list is returned. One of the following actions can be applied:
|
keysOnly | boolean | No | If Default: |
Sample Query 1
GET 'https://myserver.com/worker/api/v1/workers?action=BEFORE_DOWNLOAD&keysOnly=trueworkers'
Sample Response 1
{ "keys": [ "Worker1", "Worker2", ... "WorkerN" ] }
Sample Query 2
GET 'https://myserver.com/worker/api/v1/workers'
Sample Response 2
{ "workers": [ { "key": string, "description": string, "enabled": boolean, "sourceCode": string, "action": string, "filterCriteria": { "artifactFilterCriteria": { "repoKeys": [ "repo1", "Repo2" ], "includePatterns": undefined | string[], "excludePatterns": undefined | string[] } }, "secrets": Secret[] }
Success Response Codes:
200: Ok successful.
Error Response Codes:
400 The request payload is malformed.
401 Invalid credentials.
403 Insufficient permissions.
Error Response
{ "errors": [ { "status": number // The HTTP error status code "message": string // The reason of the error } ] }