Description: Gets a specified worker service by workerKey
.
Since: 7.63.2
Security: Admin user, project-admin or non-admin if the Worker is of Generic Event type and has been shared with non-admin users.
Usage:GET /worker/api/v1/workers/{workerKey}
Produces: application/json; charset=utf-8
Header parameter: Authorization: Bearer
Parameters
Parameter | Datatype | Mandatory | Description |
---|---|---|---|
projectKey | string | No | If set, this Worker will be available in the scope of the given project (editable by platform admin and project admin). If not set, this Worker will be global and only editable by the platform admin. If set, this Worker will be available in the scope of the given project (editable by platform admin and project admin). Otherwise this Worker will be global and only editable by platform admin. Once set, the projectKey cannot be changed. |
Sample Usage
curl -X GET 'https://myserver.com/worker/api/v1/workers/{workerKey}' Ok
Sample Response
{ "key": string, "description": string, "enabled": boolean, "sourceCode": string, "action": string, "filterCriteria": { "artifactFilterCriteria": { "repoKeys": [ "repo1", "Repo2" ], } }, "secrets": undefined | Secret[] }
Secret Type
{ "key": string, // The name of the secret. "value": string // The value of the secret. }
Defining Action
{ enum Action { BEFORE_DOWNLOAD, AFTER_DOWNLOAD, BEFORE_UPLOAD, AFTER_CREATE }
Success Response Codes:
200: OK successful.
Error Response Codes:
400 The request payload is malformed.
401 Invalid credentials.
403 Insufficient permissions.
404 Worker does not exist.
Error Response
{ "errors": [ { "status": number // The HTTP error status code "message": string // The reason of the error } ] }