openapi: 3.0.1
info:
title: Rundeck / Runbook Automation API
description: |-
Rundeck / Runbook Automation REST API for job automation, execution management, and system administration.
The Rundeck API provides comprehensive access to:
- Job management (create, update, delete, execute jobs)
- Execution monitoring and control
- Project and resource management
- Node filtering and resource queries
- System configuration and administration
- SCM integration (Git and other version control)
- Authentication token management
- Metrics and health monitoring
All API endpoints require authentication via API token, password session, or JWT token (Enterprise).
API version must be specified in the URL path (e.g., /api/46/...).
For detailed documentation, see: [Rundeck API Docs](https://docs.rundeck.com/docs/api/)
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: "59"
externalDocs:
description: Original Rundeck API Documentation
url: https://docs.rundeck.com/docs/api/
servers:
- url: "{protocol}://{host}:{port}/api/{version}"
description: Rundeck / Runbook Automation Server
variables:
protocol:
description: Protocol (http or https)
enum:
- http
- https
default: https
host:
description: Server hostname or IP address
default: localhost
port:
description: Server port number
default: "4440"
version:
description: API version number
default: '59'
security:
- rundeckApiToken: []
- rundeckPassword: []
- rundeckJWT: []
tags:
- name: ACL
description: Access Control List operations
- name: Ad Hoc
description: Ad-hoc command execution operations
- name: API
description: API information and utilities
- name: Authorization
description: Check User Authorization operations
- name: Calendars
description: Calendar management operations
- name: Cluster
description: Cluster management operations
- name: Configuration
description: Configuration management
- name: Execution Mode
description: Execution Mode operations
- name: Health
description: Health check operations
- name: History
description: Execution history operations
- name: Jobs
description: Job management operations
- name: Job Executions
description: Job execution operations
- name: Key Storage
description: Key storage operations
- name: License
description: License management operations
- name: Log Storage
description: Log storage operations
- name: Metrics
description: Metrics and monitoring operations
- name: Plugins
description: Plugin management operations
- name: Project
description: Project management operations
- name: ROI
description: Return on Investment metrics operations
- name: Runner
description: Runner management operations
- name: SCM
description: Source Control Management operations
- name: System
description: System operations
- name: Tokens
description: API token operations
- name: Tours
description: User interface tour operations
- name: User
description: User management operations
- name: User Class
description: User Class management operations
- name: Webhook
description: Webhook operations
paths:
/:
get:
tags:
- API
summary: Get API Information
description: |-
Returns basic information about the Rundeck API including the current API version and base URL.
This endpoint provides essential API metadata that clients can use to determine available functionality and construct properly formatted API requests. The response includes the highest supported API version number and the base URL for making subsequent API calls.
Use this endpoint to verify API connectivity and determine the correct API version to use for your integration.
operationId: info
responses:
"200":
description: API Information
content:
application/json:
schema:
type: object
examples:
api-info:
description: API Information response example
value:
apiversion: 44
href: http://localhost:4441/api/44
/authorizations/application/{kind}:
get:
tags:
- Authorization
summary: Check authorization for application resource kind
description: |-
Evaluates whether the current user has authorization to perform specific actions on resources of a given kind within the application context.
This endpoint checks permissions for a resource type (kind) such as "job", "project", "system", etc., and returns authorization results for each requested action. The evaluation is performed using the application's access control policies and the authenticated user's permissions.
The `actions` parameter must be provided as a query parameter and can be specified multiple times for multiple actions.
Example: `GET /api/56/authorizations/application/job?actions=create&actions=read`
Useful for UI components that need to conditionally display features or for applications that need to verify permissions before attempting operations.
**INCUBATING**: This endpoint is in "incubating" status, and may change.
operationId: appContextAuthorizationsForResourceKind
parameters:
- name: kind
in: path
description: Resource Kind
required: true
schema:
type: string
- name: actions
in: query
description: Actions to check authorization for (can be specified multiple
times)
required: true
schema:
type: array
items:
type: string
responses:
"200":
description: Action authorizations
content:
application/json:
schema:
$ref: "#/components/schemas/AuthorizationsResponse"
"400":
description: Bad request - missing required parameter `actions`
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/authorizations/application/{type}/{specifier}:
get:
tags:
- Authorization
summary: Get authorizations for an application type with specifier
description: "Get authorizations for the supplied set of actions for the subject\
\ executing the API call. \nEvaluation is made in the context of the application\
\ for the supplied type and specifier.\n\nThe `actions` parameter must be\
\ provided as a query parameter and can be specified multiple times for multiple\
\ actions.\n\nExample: `GET /api/56/authorizations/application/project/myproject?actions=read&actions=delete`\n\
\n**INCUBATING**: This endpoint is in \"incubating\" status, and may change."
operationId: appContextAuthorizationsForTypeWithSpecifier
parameters:
- name: type
in: path
description: Resource Type
required: true
schema:
type: string
- name: specifier
in: path
description: Resource specifier
required: true
schema:
type: string
- name: actions
in: query
description: Actions to check authorization for (can be specified multiple
times)
required: true
schema:
type: array
items:
type: string
responses:
"200":
description: Action authorizations
content:
application/json:
schema:
$ref: "#/components/schemas/AuthorizationsResponse"
"400":
description: Bad request - missing required parameter `actions`
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/authorizations/project/{project}/job/{specifier}:
get:
tags:
- Authorization
summary: Get authorizations for a job
description: "Get authorizations for the supplied set of actions for the subject\
\ executing the API call. \nEvaluation is made in the context of the project\
\ for the supplied job.\n\n**INCUBATING**: This endpoint is in \"incubating\"\
\ status, and may change."
operationId: projectContextAuthorizationsForJob
parameters:
- name: project
in: path
description: Project Name
required: true
schema:
type: string
- name: specifier
in: path
description: Job Id
required: true
schema:
type: string
- name: actions
in: query
description: Actions to check authorization for (can be specified multiple
times)
required: true
schema:
type: array
items:
type: string
responses:
"200":
description: Action authorizations
content:
application/json:
schema:
$ref: "#/components/schemas/AuthorizationsResponse"
/authorizations/project/{project}/{kind}:
get:
tags:
- Authorization
summary: Get authorizations for a project resource kind
description: "Get authorizations for the supplied set of actions for the subject\
\ executing the API call. \nEvaluation is made in the context of the project\
\ for the supplied resource kind.\n\nThe `actions` parameter must be provided\
\ as a query parameter and can be specified multiple times for multiple actions.\n\
\nExample: `GET /api/56/authorizations/project/myproject/node?actions=read&actions=run`\n\
\n**INCUBATING**: This endpoint is in \"incubating\" status, and may change."
operationId: projectContextAuthorizationsForResourceKind
parameters:
- name: project
in: path
description: Project Name
required: true
schema:
type: string
- name: kind
in: path
description: Resource Kind
required: true
schema:
type: string
- name: actions
in: query
description: Actions to check authorization for (can be specified multiple
times)
required: true
schema:
type: array
items:
type: string
responses:
"200":
description: Action authorizations
content:
application/json:
schema:
$ref: "#/components/schemas/AuthorizationsResponse"
"400":
description: Bad request - missing required parameter `actions`
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/authorizations/project/{project}/{type}/{specifier}:
get:
tags:
- Authorization
summary: Get authorizations for a type with specifier
description: "Get authorizations for the supplied set of actions for the subject\
\ executing the API call. \nEvaluation is made in the context of the project\
\ for the type with a specifier.\n\nThe `actions` parameter must be provided\
\ as a query parameter and can be specified multiple times for multiple actions.\n\
\nExample: `GET /api/56/authorizations/project/myproject/node/node1?actions=read&actions=run`\n\
\n**INCUBATING**: This endpoint is in \"incubating\" status, and may change."
operationId: projectContextAuthorizationsForTypeWithSpecifier
parameters:
- name: project
in: path
description: Project Name
required: true
schema:
type: string
- name: type
in: path
description: Resource Type
required: true
schema:
type: string
- name: specifier
in: path
description: Resource specifier
required: true
schema:
type: string
- name: actions
in: query
description: Actions to check authorization for (can be specified multiple
times)
required: true
schema:
type: array
items:
type: string
responses:
"200":
description: Action authorizations
content:
application/json:
schema:
$ref: "#/components/schemas/AuthorizationsResponse"
"400":
description: Bad request - missing required parameter `actions`
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/execution/{id}:
get:
tags:
- Job Executions
summary: Execution Info
description: Get the status for an execution by ID.
operationId: apiExecution
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
responses:
"200":
description: "See: Listing Running Executions. JSON response requires API\
\ v14."
content:
application/json:
examples:
execution-info:
description: Execution info response
value:
id: 1
href: "[url]"
permalink: "[url]"
status: succeeded/failed/aborted/timedout/retried/other
project: "[project]"
user: "[user]"
date-started:
unixtime: 1431536339809
date: 2015-05-13T16:58:59Z
date-ended:
unixtime: 1431536346423
date: 2015-05-13T16:59:06Z
job:
id: "[uuid]"
href: "[url]"
permalink: "[url]"
averageDuration: 6094
name: "[name]"
group: "[group]"
project: "[project]"
description: ""
options:
opt2: a
opt1: testvalue
description: "echo hello there [... 5 steps]"
argstring: -opt1 testvalue -opt2 a
successfulNodes:
- nodea
- nodeb
failedNodes:
- nodec
- noded
delete:
tags:
- Job Executions
summary: Delete an Execution
description: |+
Delete an execution by ID.
Authorization requirement: Requires the `delete_execution` action allowed for a `project` in the `application` context.
See: [Administration - Access Control Policy - Application Scope Resources and Actions](https://docs.rundeck.com/docs/administration/security/authorization.html#application-scope-resources-and-actions)
operationId: apiExecutionDelete
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
responses:
"204":
description: No Content
/execution/{id}/abort:
post:
tags:
- Job Executions
summary: Aborting Executions
description: Abort a running execution by ID.
operationId: apiExecutionAbort
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
- name: asUser
in: query
description: Specifies a username identifying the user who aborted the execution.
Requires `runAs` actiion authorization.
required: false
schema:
type: string
- name: forceIncomplete
in: query
description: "if `true`, forces a running execution to be marked as \"incomplete\"\
."
required: false
schema:
type: boolean
responses:
"200":
description: |
The status of the abort action will be included as an element.
The `[abort-state]` will be one of: "pending", "failed", or "aborted".
If the `[abort-state]` is "failed", then `[reason]` will be a textual description of the reason.
Authorization required:
* action: `kill`, or `admin`, `app_admin`
* resource: `execution`
content:
application/json:
examples:
abort-execution:
description: Abort execution response
value: |-
{
"abort": {
"status": "[abort-state]",
"reason": "[reason]"
},
"execution": {
"id": "[id]",
"status": "[execution status]",
"href": "[API href]",
}
}
/execution/{id}/input/files:
get:
tags:
- Job Executions
summary: List Input Files for an Execution
description: "List input files used for an execution. Since: V19"
operationId: apiExecutionInputFiles
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
responses:
"200":
description: Ok
content:
application/json:
schema:
$ref: "#/components/schemas/ExecutionFileInfoList"
examples:
input-files-list:
description: Execution input files list
value:
files:
- id: 382c7596-435b-4103-8781-6b32fbd629b2
user: admin
fileState: deleted
sha: 9284ed4fd7fe1346904656f329db6cc49c0e7ae5b8279bff37f96bc6eb59baad
jobId: 7b3fff59-7a2d-4a31-a5b2-dd26177c823c
dateCreated: 2017-02-24T23:26:48Z
serverNodeUUID: 3425B691-7319-4EEE-8425-F053C628B4BA
size: 12
expirationDate: 2017-02-24T23:27:18Z
execId: 2837
/execution/{id}/output:
get:
tags:
- Job Executions
summary: Execution Output
description: |+
Get the output for an execution by ID. The execution can be currently running or may have already completed. Output can be filtered down to a specific node or workflow step.
The log output for each execution is stored in a file on the Rundeck server, and this API endpoint allows you to retrieve some or all of the output, in several possible formats: json, and plain text. When retrieving the plain text output, some metadata about the log is included in HTTP Headers. JSON includes metadata about each output log line, as well as metadata about the state of the execution and log file, and your current index location in the file.
Output can be selected by Node or Step Context or both as of API v10.
Several parameters can be used to retrieve only part of the output log data. You can use these parameters to more efficiently retrieve the log content over time while an execution is running.
The log file used to store the execution output is a formatted text file which also contains metadata about each line of log output emitted during an execution. Several data values in this API endpoint refer to "bytes", but these do not reflect the size of the final log data; they are only relative to the formatted log file itself. You can treat these byte values as opaque locations in the log file, but you should not try to correlate them to the actual textual log lines.
#### Tailing Output
To "tail" the output from a running execution, you will need to make a series of requests to this API endpoint, and update the `offset` value that you send to reflect the returned `dataoffset` value that you receive. This gives you a consistent pointer into the output log file.
When starting these requests, there are two mechanisms you can use:
1. Start at the beginning, specifying either a `lastmod` or a `offset` of 0
2. Start at the end, by using `lastlines` to receive the last available set of log lines.
After your first request you will have the `dataoffset` and `lastmod` response values you can use to continue making requests for subsequent log output. You can choose several ways to do this:
1. Use the `offset` and `lastmod` parameters to indicate modification time and receive as much output as is available
2. Use the `offset` and `maxlines` parameter to specify a maximum number of log entries
3. Use only the `offset` parameter and receive as much output as is available.
After each request, you will update your `offset` value to reflect the `dataoffset` in the response.
All log output has been read when the `iscompleted` value is "true".
Below is some example pseudo-code for using this API endpoint to follow the output of a running execution "live":
* set offset to 0
* set lastmod to 0
* Repeat until `iscompleted` response value is "true":
* perform request sending `offset` and `lastmod` parameters
* print any log entries, update progress bar, etc.
* Record the resulting `dataoffset` and `lastmod` response values for the next request
* if `unmodified` is "true", sleep for 5 seconds
* otherwise sleep for 2 seconds
**Authorization:**
This endpoint requires that the user have `read` access to the Job or to Adhoc executions to retrieve the output content.
operationId: apiExecutionOutput
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
- name: nodename
in: query
description: "Node Name, all results will be filtered for only this node."
schema:
type: string
- name: stepctx
in: query
description: Step Context ID. This is a string in the form `1/2/3` indicating
the step context.
schema:
type: string
- name: offset
in: query
description: byte offset to read from in the file. 0 indicates the beginning.
schema:
type: integer
- name: lastlines
in: query
description: number of lines to retrieve from the end of the available output.
If specified it will override the `offset` value and return only the specified
number of lines at the end of the log.
schema:
type: integer
- name: lastmod
in: query
description: "epoch datestamp in milliseconds, return results only if modification\
\ changed since the specified date OR if more data is available at the given\
\ `offset`."
schema:
type: integer
format: int64
- name: maxlines
in: query
description: maximum number of lines to retrieve forward from the specified
offset.
schema:
type: integer
- name: compacted
in: query
description: "if true, results will be in compacted form. Since: v21"
schema:
type: boolean
- name: format
in: query
description: Specify output format
schema:
type: string
enum:
- json
- text
responses:
"200":
description: "Log Output Response. \n\nThe result will contain a set of\
\ data values reflecting the execution's status, as well as the status\
\ and read location in the output file.\n\n* In JSON, there will be an\
\ object containing these fields.\n* In plain text format, HTTP headers\
\ will include some information about the loging state, but individual\
\ log entries will only be returned in textual form without metadata.\n\
\nContents:\n\n* `id`: ID of the execution\n* `message`: optional text\
\ message indicating why no entries were returned\n* `error`: optional\
\ text message indicating an error case\n* `unmodified`: true/false, (optional)\
\ \"true\" will be returned if the `lastmod` parameter was used and the\
\ file had not changed\n* `empty`: true/false, (optional) \"true\" will\
\ be returned if the log file does not exist or is empty, which may occur\
\ if the log data is requested before any output has been stored.\n* `offset`:\
\ Byte offset to read for the next set of data\n* `completed`: true/false,\
\ \"true\" if the current log entries or request parameters include all\
\ of the available data\n* `execCompleted`: true/false, \"true\" if the\
\ execution has completed.\n* `hasFailedNodes`: true/false, \"true\" if\
\ the execution has recorded a list of failed nodes\n* `execState`: execution\
\ state, one of \"running\",\"succeeded\",\"failed\",\"aborted\"\n* `lastModified`:\
\ (long integer), millisecond timestamp of the last modification of the\
\ log file\n* `execDuration`: (long integer), millisecond duration of\
\ the execution\n* `percentLoaded`: (float), (optional) percentage of\
\ the output which has been loaded by the parameters to this request\n\
* `totalSize`: (integer), total bytes available in the output file\n*\
\ `filter` - if a `node` or `step` filter was used\n - `nodename` -\
\ value of the node name filter\n - `stepctx` - value of the step context\
\ filter\n* `compacted`: `true` if compacted form was requested and is\
\ used in the response (API v21+)\n* `compactedAttr`: name of JSON log\
\ entry key used by default for fully compacted entries (API v21+)\n\n\
Each log entry will be included in a section called `entries`.\n\n* In\
\ JSON, `entries` will contain an array of Objects, each containing the\
\ following format\n\nContent of each Log Entry object:\n\n* `time`: Timestamp\
\ in format: \"HH:MM:SS\"\n* `absolute_time`: Timestamp in format: \"\
yyyy-MM-dd'T'HH:mm:ssZ\"\n* `level`: Log level, one of: ERROR,WARN,NORMAL,VERBOSE,DEBUG,OTHER\n\
* `log`: The log message\n* `user`: User name\n* `command`: Workflow command\
\ context string\n* `node`: Node name\n* `stepctx`: The step context such\
\ as `1` or `1/2/3`\n* `metadata`: Map of extra metadata for the entry\
\ (API v43+)\n\n#### Log Entries in Compacted Form (API v21+)\n\nAs of\
\ API v21, you can specify `compacted=true` in the URL parameters, which\
\ will send the Output Content in \"compacted\" form. This will be indicated\
\ by the `compacted`=`true` value in\nthe result data.\n\nIn this mode,\
\ Log Entries are compacted by only including the changed values from\
\ the\nprevious Log Entry in the list. The first Log Entry in the results\
\ will always have complete information. Subsequent entries may include\
\ only changed values.\n\nIn JSON format (API v21-v58), if the `compactedAttr`\
\ value is `log` in the response data, and only the `log` value changed\
\ relative to a previous Log Entry, the Log Entry may consist only of\
\ the log message string. That is, the array entry will be a string, not\
\ an object.\n\nAs of API v59, compacted entries are always objects even\
\ when only the `log` value changed. This avoids mixed-type arrays and\
\ ensures clients can always treat each entry as an object.\n\nWhen no\
\ values changed from the previous Log Entry, the Log Entry will be an\
\ empty object.\n\nWhen an entry value is not present in the subsequent\
\ Log Entry, but was present in the previous\none, in JSON this will be\
\ represented with a `null` value."
headers:
X-Rundeck-ExecOutput-Message:
description: The `message` field (text format only)
schema:
type: string
X-Rundeck-Exec-Duration:
description: the `execDuration` field (text format only)
schema:
type: integer
X-Rundeck-ExecOutput-Empty:
description: The `empty` field (text format only)
schema:
type: boolean
X-Rundeck-Exec-State:
description: The `execState` field (text format only)
schema:
type: string
X-Rundeck-Exec-Completed:
description: The `execCompleted` field (text format only)
schema:
type: boolean
X-Rundeck-ExecOutput-Offset:
description: The `offset` field (text format only)
schema:
type: integer
X-Rundeck-ExecOutput-LastModifed:
description: The `lastModified` field (text format only)
schema:
type: string
format: iso
X-Rundeck-ExecOutput-Error:
description: The `error` field (text format only)
schema:
type: string
X-Rundeck-ExecOutput-Unmodified:
description: The `unmodified` field (text format only)
schema:
type: boolean
X-Rundeck-ExecOutput-Completed:
description: The `completed` field (text format only)
schema:
type: boolean
X-Rundeck-ExecOutput-TotalSize:
description: The `totalSize` field (text format only)
schema:
type: integer
content:
application/json:
schema:
type: object
examples:
log-output-compacted:
description: |2-
In this example, four log entries are included. The first includes all Log Entry fields.
The second is only a String, indicating only `log` value changed.
The third is an empty object, indicating the previous Log Entry was repeated identically.
The fourth specifies a new value for `stepctx` and `log` and `level` to use.
The fifth specifies a `node` and `stepctx` of `null`: indicating the `node` and `stepctx` values should be removed for
this Log Entry.
value:
id: 1
compacted: "true"
compactedAttr: log
entries:
- time: 17:00:00
absolute_time: 1970-01-02T01:00:00Z
level: NORMAL
log: This is the first log message
user: bob
node: anode1
stepctx: "1"
- This is the second log message
- {}
- stepctx: "2"
level: DEBUG
log: This is the fourth log message
- log: This is the fifth log message
text/plain:
schema:
type: string
description: Textual log output
examples:
log-output-text:
description: Textual log output
value: Log output text...
/execution/{id}/output/node/{nodename}:
get:
tags:
- Job Executions
summary: Execution Output For Node
description: Get the output for an execution filtered for a specific node.
operationId: apiExecutionOutputNodeFilter
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
- name: nodename
in: path
description: "Node Name, all results will be filtered for only this node."
required: true
schema:
type: string
responses:
"200":
description: "Log Output Response. This endpoint response is the same as\
\ the Execution Output `/execution/{id}/output` response using the `nodename`\
\ parameter."
content:
application/json:
schema:
type: object
/execution/{id}/output/node/{nodename}/step/{stepctx}:
get:
tags:
- Job Executions
summary: Execution Output For Node and Step
description: Get the output for an execution filtered for a specific node and
step.
operationId: apiExecutionOutputNodeStepFilter
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
- name: nodename
in: path
description: "Node Name, all results will be filtered for only this node."
required: true
schema:
type: string
- name: stepctx
in: path
description: Step Context ID. This is a string in the form `1/2/3` indicating
the step context.
required: true
schema:
type: string
responses:
"200":
description: "Log Output Response. This endpoint response is the same as\
\ the Execution Output `/execution/{id}/output` response using the `nodename`\
\ and `stepctx` parameters."
content:
application/json:
schema:
type: object
/execution/{id}/output/state:
get:
tags:
- Job Executions
summary: Execution Output with State
description: |
Get the metadata associated with workflow step state changes along with the log output, optionally excluding log output.
JSON response requires API v14.
operationId: apiExecutionStateOutput
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
- name: stateOnly
in: query
description: "Whether to include only state information. When false, log entries\
\ will be included."
schema:
type: boolean
responses:
"200":
description: |-
The output format is the same as [Execution Output](#execution-output), with this change:
* in the `entries` section, each entry will have a `type` value indicating the entry type
- `log` a normal log entry
- `stepbegin` beginning of the step indicated by the `stepctx`
- `stepend` finishing of the step
- `nodebegin` beginning of execution of a node for the given step
- `nodeend` finishing of execution of a node for the given step
* metadata about the entry may be included in the entry
content:
application/json:
schema:
type: object
/execution/{id}/output/step/{stepctx}:
get:
tags:
- Job Executions
summary: Execution Output For Step
description: Get the output for an execution filtered for a specific step.
operationId: apiExecutionOutputStepFilter
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
- name: stepctx
in: path
description: Step Context ID. This is a string in the form `1/2/3` indicating
the step context.
required: true
schema:
type: string
responses:
"200":
description: "Log Output Response. This endpoint response is the same as\
\ the Execution Output `/execution/{id}/output` response using the `stepctx`\
\ parameter."
content:
application/json:
schema:
type: object
/execution/{id}/state:
get:
tags:
- Job Executions
summary: Execution State
description: |
Get detail about the node and step state of an execution by ID. The execution can be currently running or completed.
JSON response requires API v14.
operationId: apiExecutionState
parameters:
- name: id
in: path
description: Execution ID
required: true
schema:
type: string
responses:
"200":
description: "The content of the response contains state information for\
\ different parts of the workflow:\n\n* overall state\n* per-node overall\
\ state\n* per-step node state\n\nA workflow can have a step which consists\
\ of a sub-workflow, so each particular step has a \"Step Context Identifier\"\
\ \nwhich defines its location in the workflow(s), and looks something\
\ like \"1/5/2\". Each number identifies the step \nnumber (starting at\
\ 1) at a workflow level. If there is a \"/\" in the context identifier,\
\ it means there are \nsub-workflow step numbers, and each preceding number\
\ corresponds to a step which has a sub-workflow.\n\nTo identify the state\
\ of a particular node at a particular step, both a Node name, and a Step\
\ Context Identifier are \nnecessary.\n\nIn the result set returned by\
\ this API call, state information is organized primarily by Step and\
\ is structured in \nthe same way as the workflow. This means that sub-workflows\
\ will have nested state structures for their steps.\n\nThe state information\
\ for a Node will not contain the full set of details for the Step and\
\ Node, since this \ninformation is present in the workflow structure\
\ which contains the step state.\n\n#### State Result Content\n\nThe result\
\ set contains this top-level structure:\n\n* general overall state information\n\
\ - `startTime` execution start time (see *Timestamp format* below)\n\
\ - `endTime` execution end time if complete\n - `updateTime` last\
\ update time\n - `executionState` overall execution state\n* `allNodes`\
\ contains a *Node Name List* (see below) of nodes known to be targeted\
\ in some workflow\n* `nodes` contains an *Overall Node State List* of\
\ per-node step states\n* `serverNode` name of the server node\n* `executionId`\
\ current execution ID\n* `completed` true/false whether the execution\
\ is completed\n* A *Workflow Section* (see below)\n\n**Workflow Section**\n\
\nEach Workflow Section within the result set will contain these structures\n\
\n* `stepCount` Number of steps in the workflow\n* `targetNodes` contains\
\ a Node Name List identifying the target nodes of the current workflow\n\
* `steps` contains a *Step State List* (see below) of information and\
\ state for each step\n\n**Node Name List**\n\nConsists of a sequence\
\ of node name entries, identifying each entry by a name.\n\n\nIn JSON,\
\ an array of node names.\n\n**Overall Node State List**\n\nConsists of\
\ a sequence of entries for each Node. Each entry contains\n\n* `name`\
\ node name\n* `steps` list of simple state indicator for steps executed\
\ by this node\n\nState Indicators:\n\n* `stepctx` Step Context Identifier\n\
* `executionState` execution state for this step and node\n\n\nIn JSON:\
\ an object where each key is a node name, and the value is an array of\
\ State indicators. A state indicator \nis an object with two keys, `stepctx`\
\ and `executionState`\n\n``` json\n{\n \"abc\": [\n {\n \
\ \"executionState\": \"SUCCEEDED\",\n \"stepctx\": \"1\"\n \
\ },\n {\n \"executionState\": \"SUCCEEDED\",\n \
\ \"stepctx\": \"2/1\"\n }\n ]\n}\n```\n\n**Step State List**\n\
\nA list of Step State information. Each step is identified by its number\
\ in the workflow (starting at 1) and its step\n context\n\n* `id` the\
\ step number (JSON)\n* `stepctx` the step context identifier in the workflow\n\
* general overall state information for the step\n - `startTime` execution\
\ start time\n - `endTime` execution end time if complete\n - `updateTime`\
\ last update time\n - `executionState` overall execution state\n*\
\ `nodeStep` true/false. true if this step directly targets each node\
\ from the targetNodes list. If true, this means\n the step will contain\
\ a `nodeStates` section\n* `nodeStates` a *Node Step State Detail List*\
\ (see below) for the target nodes if this is a node step.\n* `hasSubworkflow`\
\ true/false. true if this step has a sub-workflow and a `workflow` entry\n\
* `workflow` this section contains a Workflow Section\n\n**Node Step State\
\ Detail List**\n\nA sequence of state details for a set of Nodes for\
\ the containing step. Each entry will contain:\n\n* `name` the node name\n\
* state information for the Node\n - `startTime` execution start time\n\
\ - `endTime` execution end time if complete\n - `updateTime` last\
\ update time\n - `executionState` overall execution state\n\n\nIn\
\ JSON: an object with node names as keys. Values are objects containing\
\ the state information entries.\n\n``` json\n{\n \"abc\": {\n \
\ \"executionState\": \"SUCCEEDED\",\n \"endTime\": \"2014-01-13T20:38:31Z\"\
,\n \"updateTime\": \"2014-01-13T20:38:31Z\",\n \"startTime\"\
: \"2014-01-13T20:38:25Z\"\n }\n}\n```\n\n**Timestamp format:**\n\n\
The timestamp format is ISO8601: `yyyy-MM-dd'T'HH:mm:ss'Z'`\n\n**Execution\
\ states:**\n\n* `WAITING` - Waiting to start running\n* `RUNNING` - Currently\
\ running\n* `RUNNING_HANDLER` - Running error handler\\*\n* `SUCCEEDED`\
\ - Finished running successfully\n* `FAILED` - Finished with a failure\n\
* `ABORTED` - Execution was aborted\n* `NODE_PARTIAL_SUCCEEDED` - Partial\
\ success for some nodes\\*\n* `NODE_MIXED` - Mixed states among nodes\\\
*\n* `NOT_STARTED` - After waiting the execution did not start\\*\n\n\\\
* these states only apply to steps/nodes and do not apply to the overall\
\ execution or workflow.\n"
content:
application/json:
schema:
type: object
examples:
execution-state:
description: Execution state response with workflow details
value:
completed: true
executionState: SUCCEEDED
endTime: 2014-01-13T20:38:36Z
serverNode: dignan
startTime: 2014-01-13T20:38:25Z
updateTime: 2014-01-13T20:38:36Z
stepCount: 2
allNodes:
- dignan
targetNodes:
- dignan
nodes:
dignan:
- executionState: SUCCEEDED
stepctx: "1"
- executionState: SUCCEEDED
stepctx: 2/1
executionId: 134
steps:
- executionState: SUCCEEDED
endTime: 2014-01-13T20:38:31Z
nodeStates:
dignan:
executionState: SUCCEEDED
endTime: 2014-01-13T20:38:31Z
updateTime: 2014-01-13T20:38:31Z
startTime: 2014-01-13T20:38:25Z
updateTime: 2014-01-13T20:38:25Z
nodeStep: true
id: "1"
startTime: 2014-01-13T20:38:25Z
- workflow:
completed: true
startTime: 2014-01-13T20:38:31Z
updateTime: 2014-01-13T20:38:36Z
stepCount: 1
allNodes:
- dignan
targetNodes:
- dignan
steps:
- executionState: SUCCEEDED
endTime: 2014-01-13T20:38:36Z
nodeStates:
dignan:
executionState: SUCCEEDED
endTime: 2014-01-13T20:38:36Z
updateTime: 2014-01-13T20:38:36Z
startTime: 2014-01-13T20:38:31Z
updateTime: 2014-01-13T20:38:31Z
nodeStep: true
id: "1"
startTime: 2014-01-13T20:38:31Z
endTime: 2014-01-13T20:38:36Z
executionState: SUCCEEDED
executionState: SUCCEEDED
endTime: 2014-01-13T20:38:36Z
hasSubworkflow: true
updateTime: 2014-01-13T20:38:36Z
nodeStep: false
id: "2"
startTime: 2014-01-13T20:38:31Z
"404":
description: "Execution state not found. This occurs when the execution\
\ never started (e.g., schedule conflict)"
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/executions/delete:
post:
tags:
- Job Executions
summary: Bulk Delete Executions
description: "Delete a set of Executions by their IDs.\n\nThe IDs can be specified\
\ in two ways:\n\n1. Using a URL parameter `ids`, as a comma separated list,\
\ with no body content\n\n POST /api/12/executions/delete?ids=1,2,17\n\
\ Content-Length: 0\n\n2. Using a request body of JSON data.\n\nNote:\
\ the JSON schema also supports a basic JSON array \n"
operationId: apiExecutionDeleteBulk
parameters:
- name: ids
in: query
description: comma separated list of IDs
required: false
schema:
type: string
format: comma-separated
requestBody:
description: Delete Bulk IDs request.
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/DeleteBulkRequest"
- $ref: "#/components/schemas/DeleteBulkRequestLong"
- type: array
items:
type: object
examples:
array:
value: "[ 1, 2, 17 ]"
object:
value:
ids:
- 1
- 2
- 17
responses:
"200":
description: Summary of bulk delete results
content:
application/json:
schema:
$ref: "#/components/schemas/DeleteBulkResponse"
examples:
bulk-delete-response:
description: Bulk delete response with failures
value:
failures:
- id: "82"
message: "Not found: 82"
- id: "83"
message: "Not found: 83"
- id: "84"
message: "Not found: 84"
failedCount: 3
successCount: 2
allsuccessful: false
requestCount: 5
/executions/metrics:
get:
tags:
- Job Executions
summary: Execution Query Metrics
description: Obtain metrics over the result set of an execution query.
operationId: apiExecutionMetrics_docs
parameters:
- name: project
in: query
description: Project name
schema:
type: string
- name: statusFilter
in: query
description: Execution status
schema:
type: string
enum:
- running
- succeeded
- failed
- aborted
- name: abortedbyFilter
in: query
description: Username who aborted an execution
schema:
type: string
- name: jobIdListFilter
in: query
description: "specify a Job ID to include, can be specified multiple times"
schema:
type: string
- name: excludeJobIdListFilter
in: query
description: "specify a Job ID to exclude, can be specified multiple times"
schema:
type: string
- name: jobListFilter
in: query
description: "specify a full Job group/name to include, can be specified multiple\
\ times"
schema:
type: string
- name: excludeJobListFilter
in: query
description: "specify a full Job group/name to exclude, can be specified multiple\
\ times"
schema:
type: string
- name: groupPath
in: query
description: specify a group or partial group path to include all jobs within
that group path. Set to the special value "-" to match the top level jobs
only.
schema:
type: string
- name: groupPathExact
in: query
description: specify an exact group path to match. Set to the special value
"-" to match the top level jobs only.
schema:
type: string
- name: excludeGroupPath
in: query
description: specify a group or partial group path to exclude all jobs within
that group path. Set to the special value "-" to match the top level jobs
only.
schema:
type: string
- name: excludeGroupPathExact
in: query
description: specify an exact group path to exclude. Set to the special value
"-" to match the top level jobs only.
schema:
type: string
- name: jobFilter
in: query
description: specify a filter for the job Name. Include any job name that
matches this value
schema:
type: string
- name: excludeJobFilter
in: query
description: specify a filter for the job Name. Exclude any job name that
matches this value.
schema:
type: string
- name: jobExactFilter
in: query
description: specify an exact job name to match.
schema:
type: string
- name: excludeJobExactFilter
in: query
description: specify an exact job name to exclude.
schema:
type: string
- name: startafterFilter
in: query
description: start after date
schema:
type: string
format: iso
- name: startbeforeFilter
in: query
description: start before date
schema:
type: string
format: iso
- name: endafterFilter
in: query
description: end after date
schema:
type: string
format: iso
- name: endbeforeFilter
in: query
description: end before date
schema:
type: string
format: iso
- name: begin
in: query
description: "Specify exact date for earliest execution completion time. Format:\
\ a unix millisecond timestamp, or a W3C dateTime string in the format \"\
yyyy-MM-ddTHH:mm:ssZ\"."
schema:
type: string
format: iso
- name: end
in: query
description: "Specify exact date for latest execution completion time. Format:\
\ a unix millisecond timestamp, or a W3C dateTime string in the format \"\
yyyy-MM-ddTHH:mm:ssZ\"."
schema:
type: string
format: iso
- name: adhoc
in: query
description: "if true, include only Adhoc executions, if false return only\
\ Job executions. By default any matching executions are returned, however\
\ if you use any of the Job filters below, then only Job executions will\
\ be returned."
schema:
type: boolean
- name: recentFilter
in: query
description: |
Use a simple text format to filter executions that completed within a period of time.
The format is "XY" where X is an integer, and "Y" is one of:
* `s`: second
* `n`: minute
* `h`: hour
* `d`: day
* `w`: week
* `m`: month
* `y`: year
So a value of `2w` would return executions that completed within the last two weeks.
schema:
type: string
- name: olderFilter
in: query
description: (same format as `recentFilter`) return executions that completed
before the specified relative period of time. E.g. a value of `30d` returns
executions older than 30 days.
schema:
type: string
- name: userFilter
in: query
description: Username who started the execution
schema:
type: string
- name: executionTypeFilter
in: query
description: "specify the execution type, one of: `scheduled` (schedule trigger),\
\ `user` (user trigger), `user-scheduled` (user scheduled trigger). Since:\
\ v20"
schema:
type: string
enum:
- scheduled
- user
- user-scheduled
- name: useStats
in: query
description: "if true, use snapshot-based metrics from SCHEDULED_EXECUTION_STATS\
\ table (fast, returns empty metrics (all zeros) if no stats exist). if\
\ false or not provided, use execution table query (slow, always returns\
\ data). Since: v57"
schema:
type: boolean
- name: groupByJob
in: query
description: "if true with useStats=true, returns metrics for all jobs in\
\ the project (batch mode). Requires project parameter. Returns format:\
\ {jobs: {uuid1: metrics, uuid2: metrics, ...}}. RUN-3768 Phase 5. Since:\
\ v57"
schema:
type: boolean
- name: max
in: query
description: "maximum number of results to include in response. (default:\
\ 20)"
schema:
type: integer
- name: offset
in: query
description: "offset for first result to include. (default: 0)"
schema:
type: integer
responses:
"200":
description: Metrics response
content:
application/json:
schema:
$ref: "#/components/schemas/MetricsQueryResponse"
examples:
execution-metrics:
description: Execution metrics response
value:
duration:
average: 1s
min: 0s
max: 3s
total: 1325
/feature:
get:
tags:
- System
summary: List all System Feature on/off Status
description: The query will return all system features' status
operationId: featureQueryAll
parameters: []
responses:
"200":
description: List of features' on/off status
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/FeatureEnabledResult"
/feature/{featureName}:
get:
tags:
- System
summary: Get Rundeck System Feature Status
description: Return whether a feature is enabled or disabled.
operationId: featureQuery
parameters:
- name: featureName
in: path
description: "Feature name without the `feature.` prefix, or blank to receive\
\ list of all system features"
required: true
allowEmptyValue: false
schema:
type: string
responses:
"200":
description: On/off status of the feature
content:
application/json:
schema:
$ref: "#/components/schemas/FeatureEnabledResult"
/home/summary:
get:
tags:
- Job Executions
summary: Summary of executions and projects
description: |
Get Summary information about executions and projects.
Since: V45
operationId: apiHomeSummary
responses:
"200":
description: |
Success response, with summary information.
Fields:
`execCount`
: Number of executions
`totalFailedCount`
: Number of failed executions in the last 24 hours
`recentUsers`
: Name of users who triggered executions in the last 24 hours
`recentProjects`
: Name of projects with executions in the last 24 hours
`frameworkNodeName`
: Name of framework node
content:
application/json:
schema:
$ref: "#/components/schemas/HomeSummary"
examples:
home-summary:
description: Home summary response
value:
execCount: 0
totalFailedCount: 0
recentUsers: []
recentProjects: []
frameworkNodeName: localhost
/job/{id}:
get:
tags:
- Jobs
summary: Getting a Job Definition
description: |-
Export a single job definition, in one of the supported formats.
Authorization required: `read` for the Job.
operationId: apiJobExport
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: format
in: query
description: can be "yaml" or "json" (API v44+) to specify the output format
schema:
type: string
responses:
"200":
description: |-
Job definition, depending on the requested format:
* YAML: [job-yaml](https://docs.rundeck.com/docs/manual/document-format-reference/job-yaml-v12.html) format
* JSON: [job-json](https://docs.rundeck.com/docs/manual/document-format-reference/job-json-v44.html) format (API v44+)
content:
application/json:
schema:
type: object
externalDocs:
description: Job JSON Format
url: https://docs.rundeck.com/docs/manual/document-format-reference/job-json-v44.html
text/yaml:
schema:
type: object
externalDocs:
description: Job JSON Format
url: https://docs.rundeck.com/docs/manual/document-format-reference/job-json-v44.html
application/x-yaml:
schema:
type: string
externalDocs:
description: Job YAML Format
url: https://docs.rundeck.com/docs/manual/document-format-reference/job-yaml-v12.html
"404":
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
text/yaml:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
"403":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
text/yaml:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
"415":
description: Unsupported Media type.
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
text/yaml:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
delete:
tags:
- Jobs
summary: Deleting a Job Definition
description: |-
Delete a single job definition.
Authorization required: `delete` for the job.
operationId: apiJobDelete
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
responses:
"200":
description: apiJobDelete 200 response
content:
application/json:
schema:
type: object
"204":
description: Successful delete. No Content
"404":
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
"403":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
"409":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/job/{id}/execution/disable:
post:
tags:
- Jobs
summary: Disable Executions for a Job
description: "Disable executions for a job. \n\nAuthorization required: `toggle_execution`\
\ action for a job.\n\nSince: V14"
operationId: apiFlipExecutionDisabled
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
responses:
"200":
description: Success Response
content:
application/json:
schema:
type: object
examples:
success-response:
description: Success response
value:
success: true
/job/{id}/execution/enable:
post:
tags:
- Jobs
summary: Enable Executions for a Job
description: "Enable executions for a job. \n\nAuthorization required: `toggle_execution`\
\ action for a job.\n\nSince: V14"
operationId: apiFlipExecutionEnabled
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
responses:
"200":
description: Success Response
content:
application/json:
schema:
type: object
examples:
success-response:
description: Success response
value:
success: true
/job/{id}/executions:
get:
tags:
- Jobs
summary: Getting Executions for a Job
description: |
Get the list of executions for a Job.
Authorizations required: `read` or `view` for the Job, and `read` for the project resource type `execution`.
operationId: apiJobExecutions
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: status
in: query
description: "the status of executions you want to be returned. Must be \n\
one of \"succeeded\", \"failed\", \"aborted\", or \"running\". If this\
\ parameter is blank or unset, include all executions."
schema:
type: string
enum:
- succeeded
- failed
- aborted
- running
- name: max
in: query
description: "indicate the maximum number of results to return. If \nunspecified,\
\ all results will be returned"
schema:
type: integer
- name: offset
in: query
description: "indicate the 0-indexed offset for the first result to \nreturn."
schema:
type: integer
- name: includeJobRef
in: query
description: |-
if true, include executions from the job reference
in the results. Default is false. Requires API version 50 or later.
schema:
type: boolean
responses:
"200":
description: Executions results
content:
application/json:
schema:
type: array
items:
type: object
examples:
job-executions-list:
description: List of job executions
value: |-
[{
"id": 1,
"href": "[url]",
"permalink": "[url]",
"status": "succeeded/failed/aborted/timedout/retried/other",
"project": "[project]",
"user": "[user]",
"date-started": {
"unixtime": 1431536339809,
"date": "2015-05-13T16:58:59Z"
},
"date-ended": {
"unixtime": 1431536346423,
"date": "2015-05-13T16:59:06Z"
},
"job": {
"id": "[uuid]",
"href": "[url]",
"permalink": "[url]",
"averageDuration": 6094,
"name": "[name]",
"group": "[group]",
"project": "[project]",
"description": "",
"options": {
"opt2": "a",
"opt1": "testvalue"
}
},
"description": "echo hello there [... 5 steps]",
"argstring": "-opt1 testvalue -opt2 a",
"successfulNodes": [
"nodea","nodeb"
],
"failedNodes": [
"nodec","noded"
]
}]
post:
tags:
- Jobs
summary: Running a Job
description: |
Run a job specified by ID.
Parameters can be specified in the request body, instead of as query parameters
Authorization required: `run` for the Job resource.
operationId: apiJobRun
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: argString
in: query
description: "argument string to pass to the job, of the form: `-opt value\
\ -opt2 value ...`."
schema:
type: string
- name: loglevel
in: query
description: argument specifying the loglevel to use
schema:
type: string
enum:
- DEBUG
- VERBOSE
- INFO
- WARN
- ERROR
- name: asUser
in: query
description: specifies a username identifying the user who ran the job. Requires
`runAs` permission.
schema:
type: string
- name: filter
in: query
description: can be a node filter string.
schema:
type: string
- name: runAtTime
in: query
description: |-
Specify a time to run the job (Since: v18).
This is a ISO-8601 date and time stamp with timezone, with optional milliseconds., e.g. `2016-11-23T12:20:55-0800` or `2016-11-23T12:20:55.123-0800`
schema:
type: string
format: date-time
- name: option.OPTNAME
in: query
description: "Option value for option named `OPTNAME`. If any `option.OPTNAME`\
\ parameters are specified, the `argString` value is ignored (Since: v18)."
schema:
type: string
- name: meta.KEY
in: query
description: "Additional metadata keyd by `KEY`. (Since: v32)."
schema:
type: string
requestBody:
description: |-
Parameters can be specified in the request body, instead of as query parameters.
(**API v18** or later): The `options` entry can contain a map of option name -> value, in which case the `argString` is ignored.
content:
application/json:
schema:
type: object
examples:
run-job-with-options-example:
description: Run job with parameters and options
value:
argString: '...'
loglevel: '...'
asUser: '...'
filter: '...'
runAtTime: '...'
options:
myopt1: value
responses:
"200":
description: Created Execution
content:
application/json:
schema:
type: object
examples:
job-execution-response:
description: Job execution response
value:
id: 1
href: "[url]"
permalink: "[url]"
status: succeeded/failed/aborted/timedout/retried/other
project: "[project]"
user: "[user]"
date-started:
unixtime: 1431536339809
date: 2015-05-13T16:58:59Z
date-ended:
unixtime: 1431536346423
date: 2015-05-13T16:59:06Z
job:
id: "[uuid]"
href: "[url]"
permalink: "[url]"
averageDuration: 6094
name: "[name]"
group: "[group]"
project: "[project]"
description: ""
options:
opt2: a
opt1: testvalue
description: "echo hello there [... 5 steps]"
argstring: -opt1 testvalue -opt2 a
successfulNodes:
- nodea
- nodeb
failedNodes:
- nodec
- noded
delete:
tags:
- Jobs
summary: Delete all Executions for a Job
description: Delete all executions for a Job.
operationId: apiJobExecutionsDelete
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
responses:
"200":
description: Summary of bulk delete results
content:
application/json:
schema:
$ref: "#/components/schemas/DeleteBulkResponse"
/job/{id}/forecast:
get:
tags:
- Jobs
summary: Get Job Forecast
description: |-
Get Metadata for the job including a schedule forecast for a specific amount of time of the job by ID.
(**API v48** or later): forecast includes information about one time scheduled execution, and information if the project related to the job allows executions and scheduling
Authorization required: `read` or `view` for the Job
Since: V31
operationId: apiJobForecast
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
format: uuid
- name: time
in: query
description: "Time range to forecast. \n\nFormat is a string like `2d1h4n5s`\
\ using the following characters for time units:\n* `s` second\n* `n` minute\n\
* `h` hour\n* `d` day\n* `w` week\n* `m` month\n* `y` year\n"
schema:
pattern: "(\\d+[snhdwmy])+"
type: string
- name: past
in: query
description: "Whether to return results in the past. default: false"
schema:
type: boolean
- name: max
in: query
description: Maximum number of results to return
schema:
type: integer
responses:
"200":
description: Forecast Response
content:
application/json:
schema:
$ref: "#/components/schemas/JobInfo"
/job/{id}/info:
get:
tags:
- Jobs
summary: Get Job Metadata
description: |-
Get metadata about a specific job.
Authorization required: `read` or `view` for the job.
Since: V18
operationId: apiJobDetail
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
responses:
"200":
description: Job metadata
content:
application/json:
schema:
$ref: "#/components/schemas/JobInfo"
/job/{id}/input/file:
post:
tags:
- Jobs
summary: Upload Multiple Files for Job Options
description: |-
Job Options of type `file` require a file input. You can upload multiple files en-masse.
Each uploaded file is assigned a unique "file key" identifier.
You can then Run the Job using the "file key" as the option value.
For multiple files, use a Multi-part request. For each file, specify the field name as `option.NAME` where NAME
is the option name. The filename is specified normally within the multi-part request.
Since: v19
operationId: apiJobFileMultiUpload
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
requestBody:
description: |
Upload Multiple Files.
For multiple files, use a Multi-part request. For each file, specify the field name as `option.NAME` where NAME
is the option name. The filename is specified normally within the multi-part request.
content:
multipart/form-data:
schema:
type: object
responses:
"200":
description: "Successful response, with multiple uploaded file tokens"
content:
application/json:
schema:
$ref: "#/components/schemas/JobFileUpload"
/job/{id}/input/file/{optionName}:
post:
tags:
- Jobs
summary: Upload a File for a Job Option
description: |-
Job Options of type `file` require a file input. This endpoint uploads a single file individually.
Each uploaded file is assigned a unique "file key" identifier.
You can then Run the Job using the "file key" as the option value.
Since: v19
operationId: apiJobFileUpload
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: optionName
in: path
description: "For a single file/option value, specify the option name either\
\ as a query parameter or as part of the URL path"
required: true
schema:
type: string
- name: fileName
in: query
description: Specify the original file name (optional)
schema:
type: string
requestBody:
description: Upload a single file directly
content:
application/octet-stream:
schema:
type: object
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/JobFileUpload"
/job/{id}/meta:
get:
tags:
- Jobs
summary: Get Job UI Metadata
description: |-
Get metadata for a specific job.
Authorization required: `read` or `view` for the Job.
Since: v46
operationId: apiJobMeta
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: meta
in: query
description: "Comma-separated list of metadata item names to include, or \"\
*\" for all (default)"
required: true
explode: false
schema:
type: string
- name: metaExclude
in: query
description: "Since API v58: Comma-separated metadata names to omit. Ignored\
\ when the request API version is below 58. When set, if meta includes \"\
*\", \nit is expanded to all names from registered JobMetadataComponent\
\ beans, then exclusions are applied."
required: true
explode: false
schema:
type: string
responses:
"200":
description: Job results
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ItemMeta"
/job/{id}/retry/{executionId}:
post:
tags:
- Jobs
summary: Retry a Job based on execution
description: |
Retry a failed execution on failed nodes only or on the same as the execution.
This is the same functionality as the `Retry Failed Nodes ...` button on the execution page.
Parameters can be specified in the request body, instead of as query parameters
Authorization required: `run` for the Job resource, and `read` or `view` for the Execution resource.
Since: v24
operationId: apiJobRetry
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: executionId
in: path
description: Execution ID
required: true
schema:
type: string
- name: failedNodes
in: query
description: "`false` to run on the same nodes as the original execution,\
\ `true`or empty to run only on failed nodes."
schema:
type: boolean
- name: argString
in: query
description: "argument string to pass to the job, of the form: `-opt value\
\ -opt2 value ...`."
schema:
type: string
- name: loglevel
in: query
description: argument specifying the loglevel to use
schema:
type: string
enum:
- DEBUG
- VERBOSE
- INFO
- WARN
- ERROR
- name: asUser
in: query
description: specifies a username identifying the user who ran the job. Requires
`runAs` permission.
schema:
type: string
- name: filter
in: query
description: can be a node filter string.
schema:
type: string
- name: runAtTime
in: query
description: |-
Specify a time to run the job (Since: v18).
This is a ISO-8601 date and time stamp with timezone, with optional milliseconds., e.g. `2016-11-23T12:20:55-0800` or `2016-11-23T12:20:55.123-0800`
schema:
type: string
format: date-time
- name: option.OPTNAME
in: query
description: "Option value for option named `OPTNAME`. If any `option.OPTNAME`\
\ parameters are specified, the `argString` value is ignored (Since: v18)."
schema:
type: string
- name: meta.KEY
in: query
description: "Additional metadata keyd by `KEY`. (Since: v32)."
schema:
type: string
requestBody:
description: |-
Parameters can be specified in the request body, instead of as query parameters.
(**API v18** or later): The `options` entry can contain a map of option name -> value, in which case the `argString` is ignored.
content:
application/json:
schema:
type: object
examples:
retry-job-with-failed-nodes-example:
description: Retry job execution with parameters
value:
failedNodes: true
argString: '...'
loglevel: '...'
asUser: '...'
filter: '...'
runAtTime: '...'
options:
myopt1: value
responses:
"200":
description: Created Execution
content:
application/json:
schema:
type: object
examples:
job-execution-response:
description: Job execution response
value:
id: 1
href: "[url]"
permalink: "[url]"
status: succeeded/failed/aborted/timedout/retried/other
project: "[project]"
user: "[user]"
date-started:
unixtime: 1431536339809
date: 2015-05-13T16:58:59Z
date-ended:
unixtime: 1431536346423
date: 2015-05-13T16:59:06Z
job:
id: "[uuid]"
href: "[url]"
permalink: "[url]"
averageDuration: 6094
name: "[name]"
group: "[group]"
project: "[project]"
description: ""
options:
opt2: a
opt1: testvalue
description: "echo hello there [... 5 steps]"
argstring: -opt1 testvalue -opt2 a
successfulNodes:
- nodea
- nodeb
failedNodes:
- nodec
- noded
/job/{id}/run:
post:
tags:
- Jobs
summary: Running a Job
description: |
Run a job specified by ID.
Parameters can be specified in the request body, instead of as query parameters
Authorization required: `run` for the Job resource.
operationId: apiJobRun_1
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: argString
in: query
description: "argument string to pass to the job, of the form: `-opt value\
\ -opt2 value ...`."
schema:
type: string
- name: loglevel
in: query
description: argument specifying the loglevel to use
schema:
type: string
enum:
- DEBUG
- VERBOSE
- INFO
- WARN
- ERROR
- name: asUser
in: query
description: specifies a username identifying the user who ran the job. Requires
`runAs` permission.
schema:
type: string
- name: filter
in: query
description: can be a node filter string.
schema:
type: string
- name: runAtTime
in: query
description: |-
Specify a time to run the job (Since: v18).
This is a ISO-8601 date and time stamp with timezone, with optional milliseconds., e.g. `2016-11-23T12:20:55-0800` or `2016-11-23T12:20:55.123-0800`
schema:
type: string
format: date-time
- name: option.OPTNAME
in: query
description: "Option value for option named `OPTNAME`. If any `option.OPTNAME`\
\ parameters are specified, the `argString` value is ignored (Since: v18)."
schema:
type: string
- name: meta.KEY
in: query
description: "Additional metadata keyd by `KEY`. (Since: v32)."
schema:
type: string
requestBody:
description: |-
Parameters can be specified in the request body, instead of as query parameters.
(**API v18** or later): The `options` entry can contain a map of option name -> value, in which case the `argString` is ignored.
content:
application/json:
schema:
type: object
examples:
run-job-with-options-example:
description: Run job with parameters and options
value:
argString: '...'
loglevel: '...'
asUser: '...'
filter: '...'
runAtTime: '...'
options:
myopt1: value
responses:
"200":
description: Created Execution
content:
application/json:
schema:
type: object
examples:
job-execution-response:
description: Job execution response
value:
id: 1
href: "[url]"
permalink: "[url]"
status: succeeded/failed/aborted/timedout/retried/other
project: "[project]"
user: "[user]"
date-started:
unixtime: 1431536339809
date: 2015-05-13T16:58:59Z
date-ended:
unixtime: 1431536346423
date: 2015-05-13T16:59:06Z
job:
id: "[uuid]"
href: "[url]"
permalink: "[url]"
averageDuration: 6094
name: "[name]"
group: "[group]"
project: "[project]"
description: ""
options:
opt2: a
opt1: testvalue
description: "echo hello there [... 5 steps]"
argstring: -opt1 testvalue -opt2 a
successfulNodes:
- nodea
- nodeb
failedNodes:
- nodec
- noded
/job/{id}/schedule/disable:
post:
tags:
- Jobs
summary: Disable Schedule for a Job
description: "Disable schedule for a job. \n\nAuthorization required: `toggle_schedule`\
\ action for a job.\n\nSince: V14"
operationId: apiFlipScheduleDisabled
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
responses:
"200":
description: Success Response
content:
application/json:
schema:
type: object
examples:
success-response:
description: Success response
value:
success: true
/job/{id}/schedule/enable:
post:
tags:
- Jobs
summary: Enable Schedule for a Job
description: "Enable schedule for a job. \n\nAuthorization required: `toggle_schedule`\
\ action for a job.\n\nSince: V14"
operationId: apiFlipScheduleEnabled
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
responses:
"200":
description: Success Response
content:
application/json:
schema:
type: object
examples:
success-response:
description: Success response
value:
success: true
/job/{id}/scm/{integration}/action/{actionId}:
post:
tags:
- SCM
summary: Perform Job SCM Action
description: |-
Perform the action for the SCM integration plugin, with a set of input parameters,
for the Job.
Depending on the available Input Fields for the action. (See `/job/{id}/scm/{integration}/action/inputs`), the action will
expect a set of `input` values.
Authorization required: `export` or `scm_export` (for export integration), or `import` or `scm_import` (for import integration), for the Job resource.
Since: v15
operationId: apiJobActionPerform
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: integration
in: path
description: SCM integration type
required: true
schema:
type: string
enum:
- export
- import
- name: actionId
in: path
description: Action Name/ID
required: true
schema:
type: string
requestBody:
description: SCM Action Input Request.
content:
application/json:
schema:
type: object
examples:
scm-action-input-example:
description: Input fields for SCM action
value:
input:
field1: value1
field2: value2
required: true
responses:
"200":
description: "SCM Action success response.\n \nIf a follow-up **Action**\
\ is expected to be called, the action ID will be identified by the `nextAction`\
\ value.\n "
content:
application/json:
schema:
$ref: "#/components/schemas/ScmActionResult"
examples:
scm-action-success:
description: SCM action success response
value:
message: Some message.
nextAction: next-action
success: true
"400":
description: "SCM Action invalid response.\n \nThe response will include\
\ information about the result.\n"
content:
application/json:
schema:
$ref: "#/components/schemas/ScmActionResult"
examples:
scm-action-error:
description: SCM action error response
value:
message: Some input was invalid.
success: false
validationErrors:
dir: required
url: required
/job/{id}/scm/{integration}/action/{actionId}/input:
get:
tags:
- SCM
summary: Get Job SCM Action Input Fields
description: |-
Get the input fields and selectable items for a specific action.
Each action may have a set of Input Fields describing user-input values.
Export actions may have a set of `exportItems`s which describe Job changes that can be
included in the action.
Import actions may have a set of `importItems`s which describe paths from the import repo
which can be selected for the action, they will also be associated with a Job after they are matched.
Authorization required: `export` or `scm_export` (for export integration), or `import` or `scm_import` (for import integration), for the Job resource.
Since: v15
operationId: apiJobActionInput
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: integration
in: path
description: SCM integration type
required: true
schema:
type: string
enum:
- export
- import
- name: actionId
in: path
description: Action Name/ID
required: true
schema:
type: string
responses:
"200":
description: |+
SCM Action Input response.
`exportItems` values:
* `itemId` - ID of the repo item, e.g. a file path
* `job` - job information
* `groupPath` group path, or empty/null
* `jobId` job ID
* `jobName` job name
* `deleted` - boolean, whether the job was deleted and requires deleting the associated repo item
* `renamed` - boolean if the job was renamed
* `originalId` - ID of a repo item if the job was renamed and now is stored at a different repo path, or empty/null
* `status` - file status String, the same value as in the `$synchState` of [Get Job SCM Status](#get-job-scm-status).
`importItems` values:
* `itemId` - ID of the repo item, e.g. a file path
* `job` - job information, may be empty/null
* `groupPath` group path, or empty
* `jobId` job ID
* `jobName` job name
* `tracked` - boolean, true if there is an associated `job`
* `deleted` - boolean, whether the job was deleted on remote and requires to be deleted
* `status` - file status String, the same value as in the `$synchState` of [Get Job SCM Status](#get-job-scm-status).
Input fields have a number of properties:
* `name` identifier for the field, used when submitting the input values.
* `defaultValue` a default value if the input does not specify one
* `description` textual description
* `renderOptions` a key/value map of options, such as declaring that GUI display the input as a password field.
* `required` true/false whether the input is required
* `scope`
* `title` display title for the field
* `type` data type of the field: `String`, `Integer`, `Select` (multi-value), `FreeSelect` (open-ended multi-value), `Boolean` (true/false)
* `values` if the type is `Select` or `FreeSelect`, a list of string values to choose from
content:
application/json:
schema:
$ref: "#/components/schemas/ScmActionInput"
/job/{id}/scm/{integration}/diff:
get:
tags:
- SCM
summary: Get Job SCM Diff
description: |-
Retrieve the file diff for the Job, if there are changes for the integration.
The format of the diff content depends on the specific plugin. For the Git plugins,
a unified diff format is used.
Authorization required: `export` or `scm_export` (for export integration), or `import` or `scm_import` (for import integration), for the Job resource.
Since: v15
operationId: apiJobDiff
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: integration
in: path
description: SCM integration type
required: true
schema:
type: string
enum:
- export
- import
responses:
"200":
description: |
SCM Diff response.
The `commit` info will be the same structure as in `/job/{id}/scm/{integration}/status` response.
For `import` only, `incomingCommit` will indicate the to-be-imported change.
content:
application/json:
schema:
$ref: "#/components/schemas/ScmJobDiff"
examples:
job-scm-diff:
description: Job SCM diff response
value:
commit: {}
diffContent: '...'
id: $jobId
incomingCommit: {}
integration: $integration
project: $project
/job/{id}/scm/{integration}/status:
get:
tags:
- SCM
summary: Get Job SCM Status
description: |
Get SCM status for a Job.
Authorization required: `export` or `scm_export` (for export integration), or `import` or `scm_import` (for import integration), for the Job resource.
Since: v15
operationId: apiJobStatus
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
- name: integration
in: path
description: SCM integration type
required: true
schema:
type: string
enum:
- export
- import
responses:
"200":
description: |-
SCM Status response.
Note: `import` status will not include any actions for the job, refer to the Project status to list import actions.
Import plugin values for `$synchState`:
* `CLEAN` - no changes
* `UNKNOWN` - status unknown, e.g. the job was not imported via SCM
* `REFRESH_NEEDED` - plugin needs to refresh
* `IMPORT_NEEDED` - Job changes need to be imported
* `DELETE_NEEDED` - Job need to be deleted
Export plugin values for `$synchState`:
* `CLEAN` - no changes
* `REFRESH_NEEDED` - plugin needs to refresh
* `EXPORT_NEEDED` - job changes need to be exported
* `CREATE_NEEDED` - Job needs to be added to the repo
content:
application/json:
schema:
$ref: "#/components/schemas/ScmJobStatus"
examples:
job-scm-status:
description: Job SCM status response
value:
actions:
- $action
commit:
author: $commitAuthor
commitId: $commitId
date: $commitDate
info:
key: value..
message: $commitMessage
id: $jobId
integration: $integration
message: $statusMessage
project: $project
synchState: $synchState
/job/{id}/workflow:
get:
tags:
- Jobs
summary: Get Job Workflow
description: |-
Get the workflow tree for a job. It will traverse referenced jobs to a depth of 3.
Authorization required: `read` or `view` for the Job.
The authorization level affects the response data.
* `read` - full workflow details are included for each step
* `view` - basic information and description is included for each step
Since: v34
operationId: apiJobWorkflow
parameters:
- name: id
in: path
description: Job ID
required: true
schema:
type: string
responses:
"200":
description: |-
Workflow response.
**Workflow Step Fields**
* `description`: Present and set to workflow step description if configured
* `exec`: If command step field is present and set to command string; otherwise
* `script`: Present and set to `"true"` if script step
* `scriptfile`: Present and set to file path if `scriptfile` step
* `scripturl`: If `scripturl` step field is present and set to URL if step
* `jobRef`: Present if step is a job reference
* `jobId`: If step is a job reference field is present and contains the referenced
jobs ID
* `type`: For plugin steps present and set to step plugin type
* `nodeStep`: Present if `type` is present and set to `"true"` or `"false"` to indicate
if the step is a node step. Implicitly `"true"` if not present and not a job step.
* `workflow`: If step is a job reference contains the sub-workflow
content:
application/json:
schema:
type: object
examples:
job-workflow:
description: Job workflow structure
value:
workflow:
- description: "[description]"
exec: "[exec]"
script: "[script]"
scriptfile: "[scriptfile]"
scripturl: "[scripturl]"
jobRef:
name: "[name]"
group: "[group]"
uuid: "[uuid]"
nodeStep: "[nodeStep]"
importOptions: "[importOptions]"
jobId: "[jobId]"
type: "[type]"
nodeStep: true
workflow: []
/jobs/delete:
post:
tags:
- Jobs
summary: Bulk Job Delete
description: "Delete multiple job definitions at once.\n\nBoth `DELETE` and\
\ `POST` are allowed for doing a bulk delete of jobs. \nHowever, to send a\
\ body with the request, \nthen the POST method must be used, \nsince the\
\ DELETE method does not allow for request bodies.\n \nAuthorization required:\
\ `delete` on project resource type `job`, and `delete` on each Job resource.\n"
operationId: apiJobDeleteBulk
requestBody:
description: Bulk ID request
content:
application/json:
schema:
$ref: "#/components/schemas/ApiBulkJobDeleteRequest"
responses:
"200":
description: Summary of bulk delete results
content:
application/json:
schema:
$ref: "#/components/schemas/DeleteBulkResponse"
examples:
bulk-job-delete:
description: Bulk job delete response
value:
failures:
- id: "82"
message: "Not found: 82"
- id: "83"
message: "Not found: 83"
- id: "84"
message: "Not found: 84"
failedCount: 3
successCount: 2
allsuccessful: false
requestCount: 5
delete:
tags:
- Jobs
summary: Bulk Job Delete
description: "Delete multiple job definitions at once.\n\nBoth `DELETE` and\
\ `POST` are allowed for doing a bulk delete of jobs. \nHowever, to send a\
\ body with the request, \nthen the POST method must be used, \nsince the\
\ DELETE method does not allow for request bodies.\n \nAuthorization required:\
\ `delete` on project resource type `job`, and `delete` on each Job resource.\n"
operationId: apiJobDeleteBulk_docs2
parameters:
- name: ids
in: query
description: "The Job IDs to delete, can be specified multiple times"
required: false
schema:
type: array
items:
type: string
- name: idlist
in: query
description: The Job IDs to delete as a single comma-separated string.
required: false
schema:
type: string
format: comma-separated
responses:
"200":
description: Summary of bulk delete results
content:
application/json:
schema:
$ref: "#/components/schemas/DeleteBulkResponse"
/jobs/execution/disable:
post:
tags:
- Jobs
summary: Bulk Toggle Job Execution Disabled
description: |-
Toggle executions disabled for a set of jobs.
Authorization required: `toggle_execution` action for each job.
Since: v16
operationId: apiFlipExecutionDisabledBulk
parameters:
- name: ids
in: query
description: "The Job IDs to delete, can be specified multiple times"
schema:
type: array
items:
type: string
- name: idlist
in: query
description: The Job IDs to delete as a single comma-separated string.
schema:
type: string
format: comma-separated
requestBody:
description: request
content:
application/json:
schema:
$ref: "#/components/schemas/ApiBulkJobDeleteRequest"
responses:
"200":
description: "Bulk toggle result.\n\nFailed results will contain:\n\n* `id`\
\ - the Job ID\n* `error` - result error message for the request\n* `errorCode`\
\ - a code indicating the type of failure, currently one of `failed`,\
\ `unauthorized` or \n`notfound`."
content:
application/json:
schema:
type: object
examples:
bulk-execution-disable:
description: Bulk execution disable response
value:
requestCount: 2
enabled: true
allsuccessful: false
succeeded:
- id: "[UUID]"
message: success message
failed:
- id: "[UUID]"
errorCode: "(error code, see above)"
message: (success or failure message)
/jobs/execution/enable:
post:
tags:
- Jobs
summary: Bulk Toggle Job Execution Enabled
description: |-
Toggle executions enabled for a set of jobs.
Authorization required: `toggle_execution` action for each job.
Since: v16
operationId: apiFlipExecutionEnabledBulk
parameters:
- name: ids
in: query
description: "The Job IDs to delete, can be specified multiple times"
schema:
type: array
items:
type: string
- name: idlist
in: query
description: The Job IDs to delete as a single comma-separated string.
schema:
type: string
format: comma-separated
requestBody:
description: Bulk ID request
content:
application/json:
schema:
$ref: "#/components/schemas/ApiBulkJobDeleteRequest"
responses:
"200":
description: "Bulk toggle result.\n\nFailed results will contain:\n\n* `id`\
\ - the Job ID\n* `error` - result error message for the request\n* `errorCode`\
\ - a code indicating the type of failure, currently one of `failed`,\
\ `unauthorized` or \n`notfound`."
content:
application/json:
schema:
type: object
examples:
bulk-execution-enable:
description: Bulk execution enable response
value:
requestCount: 2
enabled: true
allsuccessful: false
succeeded:
- id: "[UUID]"
message: success message
failed:
- id: "[UUID]"
errorCode: "(error code, see above)"
message: (success or failure message)
/jobs/file/{id}:
get:
tags:
- Jobs
summary: Get Info About an Uploaded File
description: Get info about an uploaded file given its ID.
operationId: apiJobFileInfo
parameters:
- name: id
in: path
description: File ID
required: true
schema:
type: string
responses:
"200":
description: File info
content:
application/json:
schema:
$ref: "#/components/schemas/JobFileInfo"
examples:
job-file-info:
description: Job file upload info
value:
dateCreated: 2017-02-24T19:10:33Z
execId: 2741
expirationDate: 2017-02-24T19:11:03Z
fileState: deleted
id: f985864b-fa1b-4e09-af7a-4315e9908372
jobId: 7b3fff59-7a2d-4a31-a5b2-dd26177c823c
serverNodeUUID: 3425B691-7319-4EEE-8425-F053C628B4BA
sha: 9284ed4fd7fe1346904656f329db6cc49c0e7ae5b8279bff37f96bc6eb59baad
size: 12
user: admin
/jobs/schedule/disable:
post:
tags:
- Jobs
summary: Bulk Toggle Job Schedule Disabled
description: |-
Toggle schedule disabled for a set of jobs.
Authorization required: `toggle_schedule` action for each job.
Since: v16
operationId: apiFlipScheduleDisabledBulk
parameters:
- name: ids
in: query
description: "The Job IDs to delete, can be specified multiple times"
schema:
type: array
items:
type: string
- name: idlist
in: query
description: The Job IDs to delete as a single comma-separated string.
schema:
type: string
format: comma-separated
requestBody:
description: Bulk ID request
content:
application/json:
schema:
$ref: "#/components/schemas/ApiBulkJobDeleteRequest"
responses:
"200":
description: "Bulk toggle result.\n\nFailed results will contain:\n\n* `id`\
\ - the Job ID\n* `error` - result error message for the request\n* `errorCode`\
\ - a code indicating the type of failure, currently one of `failed`,\
\ `unauthorized` or \n`notfound`."
content:
application/json:
schema:
type: object
examples:
bulk-schedule-disable:
description: Bulk schedule disable response
value:
requestCount: 2
enabled: true
allsuccessful: false
succeeded:
- id: "[UUID]"
message: success message
failed:
- id: "[UUID]"
errorCode: "(error code, see above)"
message: (success or failure message)
/jobs/schedule/enable:
post:
tags:
- Jobs
summary: Bulk Toggle Job Schedule Enabled
description: |-
Toggle schedule enabled for a set of jobs.
Authorization required: `toggle_schedule` action for each job.
Since: v16
operationId: apiFlipScheduleEnabledBulk
parameters:
- name: ids
in: query
description: "The Job IDs to delete, can be specified multiple times"
schema:
type: array
items:
type: string
- name: idlist
in: query
description: The Job IDs to delete as a single comma-separated string.
schema:
type: string
format: comma-separated
requestBody:
description: Bulk ID request
content:
application/json:
schema:
$ref: "#/components/schemas/ApiBulkJobDeleteRequest"
responses:
"200":
description: "Bulk toggle result.\n\nFailed results will contain:\n\n* `id`\
\ - the Job ID\n* `error` - result error message for the request\n* `errorCode`\
\ - a code indicating the type of failure, currently one of `failed`,\
\ `unauthorized` or \n`notfound`."
content:
application/json:
schema:
type: object
examples:
bulk-schedule-enable:
description: Bulk schedule enable response
value:
requestCount: 2
enabled: true
allsuccessful: false
succeeded:
- id: "[UUID]"
message: success message
failed:
- id: "[UUID]"
errorCode: "(error code, see above)"
message: (success or failure message)
/metrics:
get:
tags:
- Metrics
summary: List available metrics
description: Return list of available metrics endpoints
operationId: apiMetricsList_docs
responses:
"200":
description: List of metrics available
content:
application/json:
schema:
$ref: "#/components/schemas/LinkListResponse"
/metrics/healthcheck:
get:
tags:
- Metrics
summary: Get healthcheck results
description: Return results of health checks
operationId: apiMetricsHealthcheck_docs
responses:
"200":
description: Healthcheck results
content:
application/json:
schema:
type: object
"404":
description: Error response
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/metrics/metrics:
get:
tags:
- Metrics
summary: Get metrics data
description: "Return metrics data including gauges, counters, histograms, meters,\
\ and timers"
operationId: apiMetricsMetrics_docs
responses:
"200":
description: Metrics data
content:
application/json:
schema:
type: object
"404":
description: Error response
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/metrics/ping:
get:
tags:
- Metrics
summary: Ping metrics endpoint
description: Simple ping endpoint that returns a text response
operationId: apiMetricsPing_docs
responses:
"200":
description: Ping response
content:
text/plain:
schema:
type: string
"404":
description: Error response
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/metrics/threads:
get:
tags:
- Metrics
summary: Get thread dump
description: Return a dump of running JVM threads
operationId: apiMetricsThreads_docs
responses:
"200":
description: Thread dump
content:
text/plain:
schema:
type: string
"404":
description: Error response
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/plugin/list:
get:
tags:
- Plugins
summary: List installed plugins
description: |
Get the list of installed Plugins.
Since: v33
operationId: listPlugins
responses:
"200":
description: List of Plugins
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ApiPluginListProvider"
/project/{project}:
get:
tags:
- Project
summary: Get a project
description: |-
Get information about a project.
The reponse in XML or JSON format is determined by the Accept request header.
Authorization required: `read` access for `project` resource type to get basic project details and `configure` access to get all properties config or `admin` or `app_admin` access for `user` resource type.
operationId: apiProjectGet
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
responses:
"200":
description: Project details
content:
application/json:
schema:
type: object
examples:
project-details:
description: Project details response
value:
description: ""
name: PROJECT_NAME
url: http://server:4440/api/11/project/PROJECT_NAME
config: {}
delete:
tags:
- Project
summary: Delete a project
description: |-
Delete an existing project on the server. The action cannot be undone.
Authorization required: `delete` access for `project` resource type or `admin` or `app_admin` access for `user` resource type.
operationId: apiProjectDelete
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
- name: deferred
in: query
description: "Deferred Delete. Since: v45"
required: false
allowEmptyValue: false
schema:
type: boolean
responses:
"204":
description: No content
"400":
description: Project details
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/project/{project}/acl/{path}:
get:
tags:
- ACL
summary: Get ACL Policy file for a project.
description: "Retrieve the YAML text of the ACL Policy file for a project. \n\
If YAML or text content is requested, the contents will be returned directly.\
\ Otherwise if XML or JSON is requested, the YAML text will be wrapped within\
\ that format.\n\nAuthorization required: `read` access for `Project ACL`\
\ resource type or `admin` or `app_admin` access for `user` resource type.\n\
Since: v14"
operationId: apiProjectAclsGet_docs
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
- name: path
in: path
description: Path to the Acl policy file
required: true
allowEmptyValue: false
schema:
type: string
responses:
"200":
description: Project details
content:
text/plain:
schema:
type: string
examples:
acl-policy:
description: ACL policy document
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/x-yaml:
schema:
type: object
examples:
acl-policy:
description: ACL policy document
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/json:
examples:
acl-contents:
description: ACL policy contents
value:
contents: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
put:
tags:
- ACL
summary: Update a Project ACL Policy
description: "Use `PUT` to update a policy.\nIf the Content-Type is `application/yaml`\
\ or `text/plain`, then the request body is the ACL policy contents directly.\
\ \nOtherwise if XML or JSON is requested, the YAML text will be wrapped within\
\ that format.\n\nAuthorization required: `update` access for `Project ACL`\
\ resource type or `admin` or `app_admin` access for `user` resource type.\n\
Since: v14"
operationId: apiProjectAclsPut_docs
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
- name: path
in: path
description: Path to the ACL Policy
required: true
allowEmptyValue: false
schema:
type: string
requestBody:
content:
text/plain:
schema:
type: string
examples:
update-project-acl-yaml-example:
description: Update project ACL policy in YAML format
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/x-yaml:
schema:
type: string
examples:
update-project-acl-yaml-content-example:
description: Update project ACL policy as YAML
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/json:
schema:
type: object
examples:
update-project-acl-json-example:
description: Update project ACL policy as JSON with embedded YAML
value:
contents: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
responses:
"200":
description: ACL Policy updated
content:
text/plain:
examples:
acl-policy:
description: ACL policy document
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/x-yaml:
examples:
acl-policy:
description: ACL policy document
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/json:
examples:
acl-contents:
description: ACL policy contents
value:
contents: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
"404":
description: Not found
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
post:
tags:
- ACL
summary: Update a Project ACL Policy
description: "Use `POST` to create a policy.\nIf the Content-Type is `application/yaml`\
\ or `text/plain`, then the request body is the ACL policy contents directly.\
\ \nOtherwise if XML or JSON is requested, the YAML text will be wrapped within\
\ that format.\n\nAuthorization required: `create` access for `Project ACL`\
\ resource type or `admin` or `app_admin` access for `user` resource type.\n\
Since: v14"
operationId: apiProjectAclsPost_docs
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
- name: path
in: path
description: Path to the ACL Policy
required: true
allowEmptyValue: false
schema:
type: string
requestBody:
content:
text/plain:
schema:
type: string
examples:
project-acl-yaml-example:
description: Project ACL policy in YAML format
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/x-yaml:
schema:
type: object
examples:
project-acl-yaml-content-example:
description: Project ACL policy as YAML
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/json:
schema:
type: object
examples:
project-acl-json-example:
description: Project ACL policy as JSON with embedded YAML
value:
contents: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
responses:
"201":
description: ACL policy created
content:
text/plain:
schema:
type: string
examples:
acl-policy:
description: ACL policy document
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/x-yaml:
schema:
type: object
examples:
acl-policy:
description: ACL policy document
value: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
application/json:
schema:
type: object
examples:
acl-contents:
description: ACL policy contents
value:
contents: |-
description: "my policy"
context:
application: rundeck
for:
project:
- allow: read
by:
group: build
"409":
description: Conflict if already exists
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
"400":
description: Bad request if validation failure
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
delete:
tags:
- ACL
summary: Delete an ACL policy file.
description: |-
Delete a project ACL policy file.
Authorization required: `delete` access for `Project ACL` resource type or `admin` or `app_admin` access for `user` resource type.
Since: v14
operationId: apiProjectAclsDelete_docs
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
- name: path
in: path
description: Path to the ACL policy
required: true
allowEmptyValue: false
schema:
type: string
responses:
"204":
description: No content
"404":
description: Not found
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
/project/{project}/config:
get:
tags:
- Project
summary: Get a project config
description: |-
Retrieve the project configuration data.
The response, based on `Accept` header, can be returned in the Text, XML or Json format.
Authorization required: `configure` access for `project` resource type or `admin` or `app_admin` access for `user` resource type.
operationId: apiProjectConfigGet
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
responses:
"200":
description: Project configuration retrieved successfully
content:
application/json:
schema:
type: object
additionalProperties: true
examples:
projectConfig:
description: Example project configuration
value:
project.description: My Project Description
project.label: My Project
project.disable.executions: "false"
project.disable.schedule: "false"
project.execution.history.cleanup.enabled: "true"
project.execution.history.cleanup.retention.days: "60"
project.execution.history.cleanup.retention.minimum: "50"
project.execution.history.cleanup.batch: "500"
project.execution.history.cleanup.schedule: 0 0 0 1/1 * ? *
project.jobs.gui.groupExpandLevel: "1"
resources.source.1.type: file
resources.source.1.config.file: /var/rundeck/projects/myproject/etc/resources.xml
resources.source.1.config.generateFileAutomatically: "true"
resources.source.1.config.includeServerNode: "true"
service.NodeExecutor.default.provider: jsch-ssh
service.FileCopier.default.provider: jsch-scp
put:
tags:
- Project
summary: Modify a project config
description: |-
Replaces all configuration data with the submitted values. Any existing configuration properties not included in the request will be removed.
The response, based on `Accept` header, can be returned in the Text, XML or Json format.
Authorization required: `configure` access for `project` resource type or `admin` or `app_admin` access for `user` resource type.
operationId: apiProjectConfigPut
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
examples:
set-project-config:
summary: Replace all project config settings
value:
key: value
key2: value2...
text/plain:
schema:
type: string
examples:
set-project-config:
summary: Replace all project config settings
value: |-
key=value
key2=value
responses:
"200":
description: Project details
content:
application/json:
schema:
type: object
examples:
example:
value:
key: value
key2: value2...
text/plain:
schema:
type: string
examples:
example:
value: |-
key=value
key2=value
/project/{project}/config/{keypath}:
get:
tags:
- Project
summary: Get an individual project config by their key
description: |-
Retrieve an individual configuration properties by their key.
The response, based on `Accept` header, can be returned in the Text, XML or Json format.
Authorization required: `configure` access for `project` resource type or `admin` or `app_admin` access for `user` resource type.
operationId: apiProjectConfigKeyGet
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
- name: keypath
in: path
description: Key Path
required: true
allowEmptyValue: false
schema:
type: string
responses:
"200":
description: Project details
content:
text/plain:
schema:
type: object
examples:
config-text:
description: Project config in text format
value: |-
key=value
key2=value
application/json:
schema:
type: object
examples:
config-json:
description: Project config in JSON format
value:
key: value
key2: value2...
"404":
description: Not found
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
put:
tags:
- Project
summary: Set the value.
description: |-
Replace an individual configuration data with the submitted value.
The response, based on `Accept` header, can be returned in the Text, XML or Json format.
Authorization required: `configure` access for `project` resource type or `admin` or `app_admin` access for `user` resource type.
operationId: apiProjectConfigKeyPut
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
- name: keypath
in: path
description: Key Path
required: true
allowEmptyValue: false
schema:
type: string
- name: enablePluginValidation
in: query
description: Enable plugin validation
required: false
allowEmptyValue: false
schema:
type: boolean
requestBody:
content:
application/json:
schema:
type: object
examples:
set-project-config:
summary: Replace an individual config settings
value:
value: key value
text/plain:
schema:
type: string
examples:
set-project-config:
summary: Replace an individual config settings
value: key value
responses:
"200":
description: Project details
content:
application/json:
schema:
type: object
examples:
example:
value:
'[KEY]': key value
text/plain:
schema:
type: string
examples:
example:
value: key value
"400":
description: Bad request to put project config
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorResponse"
delete:
tags:
- Project
summary: Delete the key
description: |-
Delete an individual configuration properties by their key.
Authorization required: `configure` access for `project` resource type or `admin` or `app_admin` access for `user` resource type.
operationId: apiProjectConfigKeyDelete
parameters:
- name: project
in: path
description: Project Name
required: true
allowEmptyValue: false
schema:
type: string
- name: keypath
in: path
description: Key Path
required: true
allowEmptyValue: false
schema:
type: string
responses:
"204":
description: No content
/project/{project}/executions:
get:
tags:
- Job Executions
summary: Execution Query
description: Query for Executions based on Job or Execution details.
operationId: apiExecutionsQueryv14_docs
parameters:
- name: project
in: path
description: Project name
required: true
schema:
type: string
- name: statusFilter
in: query
description: Execution status
schema:
type: string
enum:
- running
- succeeded
- failed
- aborted
- name: abortedbyFilter
in: query
description: Username who aborted an execution
schema:
type: string
- name: jobIdListFilter
in: query
description: "specify a Job ID to include, can be specified multiple times"
schema:
type: string
- name: excludeJobIdListFilter
in: query
description: "specify a Job ID to exclude, can be specified multiple times"
schema:
type: string
- name: jobListFilter
in: query
description: "specify a full Job group/name to include, can be specified multiple\
\ times"
schema:
type: string
- name: excludeJobListFilter
in: query
description: "specify a full Job group/name to exclude, can be specified multiple\
\ times"
schema:
type: string
- name: groupPath
in: query
description: specify a group or partial group path to include all jobs within
that group path. Set to the special value "-" to match the top level jobs
only.
schema:
type: string
- name: groupPathExact
in: query
description: specify an exact group path to match. Set to the special value
"-" to match the top level jobs only.
schema:
type: string
- name: excludeGroupPath
in: query
description: specify a group or partial group path to exclude all jobs within
that group path. Set to the special value "-" to match the top level jobs
only.
schema:
type: string
- name: excludeGroupPathExact
in: query
description: specify an exact group path to exclude. Set to the special value
"-" to match the top level jobs only.
schema:
type: string
- name: jobFilter
in: query
description: specify a filter for the job Name. Include any job name that
matches this value
schema:
type: string
- name: excludeJobFilter
in: query
description: specify a filter for the job Name. Exclude any job name that
matches this value.
schema:
type: string
- name: jobExactFilter
in: query
description: specify an exact job name to match.
schema:
type: string
- name: excludeJobExactFilter
in: query
description: specify an exact job name to exclude.
schema:
type: string
- name: startafterFilter
in: query
description: start after date
schema:
type: string
format: iso
- name: startbeforeFilter
in: query
description: start before date
schema:
type: string
format: iso
- name: endafterFilter
in: query
description: end after date
schema:
type: string
format: iso
- name: endbeforeFilter
in: query
description: end before date
schema:
type: string
format: iso
- name: begin
in: query
description: "Specify exact date for earliest execution completion time. Format:\
\ a unix millisecond timestamp, or a W3C dateTime string in the format \"\
yyyy-MM-ddTHH:mm:ssZ\"."
schema:
type: string
format: iso
- name: end
in: query
description: "Specify exact date for latest execution completion time. Format:\
\ a unix millisecond timestamp, or a W3C dateTime string in the format \"\
yyyy-MM-ddTHH:mm:ssZ\"."
schema:
type: string
format: iso
- name: adhoc
in: query
description: "if true, include only Adhoc executions, if false return only\
\ Job executions. By default any matching executions are returned, however\
\ if you use any of the Job filters below, then only Job executions will\
\ be returned."
schema:
type: boolean
- name: recentFilter
in: query
description: |
Use a simple text format to filter executions that completed within a period of time.
The format is "XY" where X is an integer, and "Y" is one of:
* `s`: second
* `n`: minute
* `h`: hour
* `d`: day
* `w`: week
* `m`: month
* `y`: year
So a value of `2w` would return executions that completed within the last two weeks.
schema:
type: string
- name: olderFilter
in: query
description: (same format as `recentFilter`) return executions that completed
before the specified relative period of time. E.g. a value of `30d` returns
executions older than 30 days.
schema:
type: string
- name: userFilter
in: query
description: Username who started the execution
schema:
type: string
- name: executionTypeFilter
in: query
description: "specify the execution type, one of: `scheduled` (schedule trigger),\
\ `user` (user trigger), `user-scheduled` (user scheduled trigger). Since:\
\ v20"
schema:
type: string
enum:
- scheduled
- user
- user-scheduled
- name: useStats
in: query
description: "if true, use snapshot-based metrics from SCHEDULED_EXECUTION_STATS\
\ table (fast, returns empty metrics (all zeros) if no stats exist). if\
\ false or not provided, use execution table query (slow, always returns\
\ data). Since: v57"
schema:
type: boolean
- name: groupByJob
in: query
description: "if true with useStats=true, returns metrics for all jobs in\
\ the project (batch mode). Requires project parameter. Returns format:\
\ {jobs: {uuid1: metrics, uuid2: metrics, ...}}. RUN-3768 Phase 5. Since:\
\ v57"
schema:
type: boolean
- name: adhocStringFilter
in: query
description: filter adhoc executions by command title (partial match).
schema:
type: string
- name: nodeFilter
in: query
description: "filter executions by node name or filter expression (partial\
\ match). Use 'name:nodename' for simple node name search, or a filter expression\
\ like 'tags:value' for complex filters."
schema:
type: string
- name: optionFilter
in: query
description: "filter executions by option values (partial match, e.g. '-test\
\ 123')."
schema:
type: string
- name: max
in: query
description: "maximum number of results to include in response. (default:\
\ 20)"
schema:
type: integer
- name: offset
in: query
description: "offset for first result to include. (default: 0)"
schema:
type: integer
responses:
"200":
description: |-
It contains a `paging` entry with paging information, and an `executions` entry with execution information:
The `[status]` value indicates the execution status. It is one of:
* `running`: execution is running
* `succeeded`: execution completed successfully
* `failed`: execution completed with failure
* `aborted`: execution was aborted
* `timedout`: execution timed out
* `failed-with-retry`: execution failed and will retry
* `scheduled`: execution is scheduled to run in the future
* `other`: execution had a custom exit status string
If `status` is `other`, then, `customStatus` will contain the exit status.
The `[url]` value for the `href` is a URL the Rundeck API for the execution.
The `[url]` value for the `permalink` is a URL to the Rundeck server page to view the execution output.
`[user]` is the username of the user who started the execution.
`[unixtime]` is the millisecond unix timestamp, and `[datetime]` is a W3C dateTime string in the format "yyyy-MM-ddTHH:mm:ssZ".
If known, the average duration of the associated Job will be indicated (in milliseconds) as `averageDuration`.
`project="[project]"` is the project name of the execution.
`successfulNodes` and `failedNodes` list the names of nodes which succeeded or failed.
The `job` section contains `options` if an `argstring` value is set. Inside `options` is a sequence of `