Retrieve a list of Runbooks that will be converted to Git, along with how many RunbookRun History records will be updated
GET /api
Also reachable at /api.
Path Parameters
projectIdstring (required)spaceIdstring (required)
Response
200 — Returns as summary of the runbooks that will be converted to Git
DraftRunbooksarray of objectRunbookIdstringRunbookNamestring
PublishedRunbooksarray of objectRunbookIdstringRunbookNamestring
Example Response
{
"DraftRunbooks": [
{
"RunbookId": "string",
"RunbookName": "string"
}
],
"PublishedRunbooks": [
{
"RunbookId": "string",
"RunbookName": "string"
}
]
}Get a paginated list of the Runbooks that belong to the given Project
GET /api
Also reachable at /api, /api.
Path Parameters
projectIdstring (required)
The ID of the project.spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
excludedRunbookTagsarray of string
A list of tag IDs to exclude runbooks by. Returns runbooks that have none of the specified tags.partialNamestring
A partial or complete name to search on. This will perform a “contains” style match against the supplied name or name-fragment.runbookTagsarray of string
A list of tag IDs to filter runbooks by. Returns runbooks that have any of the specified tags.skipinteger
Number of items to skip. Defaults to zero. Minimum0.takeinteger
Number of items to take. Defaults to 30. Minimum0.
Response
200 — Success
Idstring
Gets or sets a unique identifier for this resource.ItemTypestringItemsarray of objectCancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectDefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectRunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
ItemsPerPageintegerLastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastPageNumberintegerLinksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NumberOfPagesintegerTotalResultsinteger
Example Response
{
"Id": "string",
"ItemType": "string",
"Items": [
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}
],
"ItemsPerPage": 0,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastPageNumber": 0,
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"NumberOfPages": 0,
"TotalResults": 0
}Create a new Runbook or clone an existing Runbook
POST /api
Also reachable at /api, /api.
Path Parameters
projectIdstring (required)
The Project that contains the Runbook.spaceIdstring (required)
The ID of the space containing the resource(s).
Request Body
Clonestring
The ID of an existing database runbook to copy. Cloning brings across the source runbook’s settings, its process and steps, and any project triggers that target it. The source runbook’s tags come across too, unless you supply RunbookTags. Leave unset to create a runbook from scratch, which starts with an empty process.ConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
What a run does when a step fails. One of ‘EnvironmentDefault’ (follow the target environment’s setting), ‘Off’ (fail the run immediately, the default), or ‘On’ (pause the run and wait for someone to choose whether to retry, ignore or abort).
Allowed values:EnvironmentDefault,Off,On.Descriptionstring
The description of the Runbook to create.EnvironmentScopeenum
Which environments the runbook may be run in. One of ‘All’ (every environment in the space, the default), ‘Specified’ (only the environments listed in Environments), or ‘FromProjectLifecycles’ (only the environments used by the project’s lifecycles).
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of string
The environments the runbook may be run in. Only applies when EnvironmentScope is ‘Specified’; ignored otherwise.ForcePackageDownloadboolean
Re-download every package on each run instead of reusing the copy already cached on the deployment target.MultiTenancyModeenum
Whether the runbook can be run for tenants. One of ‘Untenanted’ (untenanted runs only, the default), ‘Tenanted’ (a tenant must be supplied for every run), or ‘TenantedOrUntenanted’ (either is allowed).
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.Namestring (required)
The name of the Runbook to create. Minimum length 1.ProjectIdstring (required)
The ID of the project to create the runbook in. Must be a project that stores its runbooks in the Octopus database.PublishedRunbookSnapshotIdstring
Leave unset. A snapshot can only be published after the runbook exists and has a process.RunRetentionPolicyobject (required)QuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstring
Leave unset. Octopus creates an empty runbook process for the new runbook and links it automatically.RunbookTagsarray of string
Tags to apply to the runbook, each written as “TagSet/Tag” using either the names or the IDs of the tag set and tag (for example “Ops/Nightly”). Call find_tag_sets to discover which tag sets apply to runbooks and what tags they contain.Slugstring
A short URL-friendly identifier for the runbook, unique within the project. Generated from the name when omitted.SpaceIdstring (required)
The ID of the space containing the resource(s).
Response
201 — Created
CancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Request
{
"Clone": "Runbooks-1",
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"ForcePackageDownload": true,
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "RunbookProcess-Runbooks-1",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Example Response
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Get a list of Runbooks for a Project
GET /api
Also reachable at /api, /api.
Path Parameters
projectIdstring (required)
The ID of the project containing the resource(s).spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
idsarray of string
A list of Runbook resource ids used to filter a query.
Response
200 — Requested list of Runbooks
Runbooksarray of objectCancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectDefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectRunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Response
{
"Runbooks": [
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}
]
}Create a new Database Runbook
POST /api
Also reachable at /api.
Path Parameters
projectIdstring (required)spaceIdstring (required)
Request Body
ConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringForcePackageDownloadbooleanMultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.Namestring (required)
Minimum length 1.ProjectIdstring (required)RunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookTagsarray of stringSlugstringSpaceIdstring (required)
Response
201 — Created
IdstringNamestring
Minimum length 1.ProjectIdstringSlugstring
Minimum length 1.
Example Request
{
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"ForcePackageDownload": true,
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Example Response
{
"Id": "Runbooks-1",
"Name": "string",
"ProjectId": "Projects-1",
"Slug": "string"
}Get a Runbook by ID
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook to retrieve.projectIdstring (required)spaceIdstring (required)
Response
200 — Returns a runbook
CancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Response
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Update an existing Runbook
PUT /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
The ID of the runbook to update, for example ‘Runbooks-123’.projectIdstring (required)
The ID of the project the runbook belongs to. Must be a project that stores its runbooks in the Octopus database.spaceIdstring (required)
Request Body
CancelQueuedTasksboolean
When a new run of this runbook is queued, automatically cancel earlier runs of it that are still queued and now superseded. This is a standing setting on the runbook, not an instruction to cancel anything right now. Omit to leave the current setting unchanged.CancelRunningTasksboolean
When a new run of this runbook is queued, automatically cancel an earlier run of it that is already executing and now superseded. This is a standing setting on the runbook, not an instruction to cancel anything right now. Omit to leave the current setting unchanged.ConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
What a run does when a step fails. One of ‘EnvironmentDefault’ (follow the target environment’s setting), ‘Off’ (fail the run immediately), or ‘On’ (pause the run and wait for someone to choose whether to retry, ignore or abort). Resets to ‘Off’ when omitted.
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Which environments the runbook may be run in. One of ‘All’ (every environment in the space), ‘Specified’ (only the environments listed in Environments), or ‘FromProjectLifecycles’ (only the environments used by the project’s lifecycles). Resets to ‘All’ when omitted.
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of string
The runbook’s complete environment list, used when EnvironmentScope is ‘Specified’. This replaces the current list, so resubmit the existing environments you want to keep. The update is rejected if it would remove an environment that a project trigger still runs this runbook in.FailTargetDiscoveryboolean
Fail a run when one of its target discovery steps finds no matching deployment targets, instead of letting the step succeed. Resets to false when omitted.ForcePackageDownloadboolean
Re-download every package on each run instead of reusing the copy already cached on the deployment target. Resets to false when omitted.Idstring (required)
The ID of the runbook to update, for example ‘Runbooks-123’.MultiTenancyModeenum
Whether the runbook can be run for tenants. One of ‘Untenanted’ (untenanted runs only), ‘Tenanted’ (a tenant must be supplied for every run), or ‘TenantedOrUntenanted’ (either is allowed). Resets to ‘Untenanted’ when omitted.
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.Namestring (required)
Minimum length 1.ProjectIdstring (required)
The ID of the project the runbook belongs to. Must be a project that stores its runbooks in the Octopus database.PublishedRunbookSnapshotIdstring
The ID of the runbook snapshot to publish. Setting this to a different snapshot publishes that snapshot, which is what subsequent runs execute. Resubmit the current value to leave the published snapshot alone.RunRetentionPolicyobject (required)QuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstring
Leave this as the value returned by get_runbook. Octopus manages the link between a runbook and its process.RunbookTagsarray of string
The runbook’s complete set of tags, each written as “TagSet/Tag” using either the names or the IDs of the tag set and tag (for example “Ops/Nightly”). This replaces the current tags, so resubmit the existing ones you want to keep. Call find_tag_sets to discover which tag sets apply to runbooks.Slugstring
A short URL-friendly identifier for the runbook, unique within the project. The current slug is kept when omitted.SpaceIdstring (required)
Response
200 — Confirmation that the Runbook has been modified, containing the updated Runbook
CancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Request
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "Runbooks-1",
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Example Response
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Delete an existing Runbook
DELETE /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook to delete.projectIdstring (required)spaceIdstring (required)
Response
200 — Success
Get a list of environments a Runbook can be run within, based on its EnvironmentScope
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook.projectIdstring (required)
The ID of the project containing this resource. Will be inferred if not provided.spaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — The requested list of Runbook Environments
AllowDynamicInfrastructureboolean
If set to true, deployments to this environment will be allowed to contain steps that manage infrastructure. This relies on DeploymentActionResource being set to allow managing resource for a step.Descriptionstring
Gets or sets a short description of this environment that can be used to explain the purpose of the environment to other users. This field may contain markdown.EnvironmentTagsarray of string
List of tags assigned to this environment.ExtensionSettingsarray of objectExtensionIdstringValuesstring
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of this environment. This should be short, preferably 5-20 characters.SlugstringSortOrderinteger
Gets or sets a number indicating the priority of this environment in sort order. Environments with a lower sort order will appear in the UI before items with a higher sort order.SpaceIdstringUseGuidedFailureboolean
If set to true, deployments will prompt for manual intervention (Fail/Retry/Ignore) when failures are encountered in activities that support it. May be overridden with the Octopus.UseGuidedFailure special variable.
Example Response
[
{
"AllowDynamicInfrastructure": true,
"Description": "string",
"EnvironmentTags": [
"string"
],
"ExtensionSettings": [
{
"ExtensionId": "string",
"Values": "string"
}
],
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"Slug": "string",
"SortOrder": 0,
"SpaceId": "Spaces-1",
"UseGuidedFailure": true
}
]Get a list of environments a Runbook can be run within, based on its EnvironmentScope
GET /api
Also reachable at /api.
Path Parameters
idstring (required)
ID of the Runbook.projectIdstring (required)
The ID of the project containing this resource. Will be inferred if not provided.spaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — The requested list of Runbook Environments
Environmentsarray of objectDescriptionstring
Gets or sets a short description of this environment that can be used to explain the purpose of the environment to other users. This field may contain markdown.EnvironmentTagsarray of string
List of tags assigned to this environment.IdstringNamestring
Gets or sets the name of this environment. This should be short, preferably 5-20 characters. Minimum length 1.Slugstring
Minimum length 1.SpaceIdstringTypestring
Example Response
{
"Environments": [
{
"Description": "string",
"EnvironmentTags": [
"string"
],
"Id": "Environments-1",
"Name": "string",
"Slug": "string",
"SpaceId": "Spaces-1",
"Type": "string"
}
]
}Get all of the information necessary for creating or editing a Runbook Run for this Runbook (when you do not have a snapshot)
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook to get a Runbook Run Template for.projectIdstring (required)
ID of the project the runbook belongs to.spaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — The requested Runbook Template
Idstring
Gets or sets a unique identifier for this resource.IsGitResourceModifiedbooleanIsLibraryVariableSetModifiedbooleanIsRunbookProcessModifiedbooleanIsVariableSetModifiedbooleanLastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.PromoteToarray of objectIdstringLinksobjectNamestring
TenantPromotionsarray of objectIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NamestringPromoteToarray of object
Example Response
{
"Id": "string",
"IsGitResourceModified": true,
"IsLibraryVariableSetModified": true,
"IsRunbookProcessModified": true,
"IsVariableSetModified": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"PromoteTo": [
{
"Id": "Environments-1",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string"
}
],
"TenantPromotions": [
{
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PromoteTo": [
{}
]
}
]
}Get a Runbook Run Preview for a Runbook
GET /api
Also reachable at /api, /api.
Gets a Runbook Run Preview that describes what steps will/won’t be run during a Runbook Run on a given environment (and tenant if supplied) for a Runbook.
Path Parameters
environmentstring (required)
ID of the Environment.idstring (required)
ID of the Runbook.projectIdstring (required)
ID of the Project.spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
includeDisabledStepsboolean
Boolean to include/exclude disabled steps from response.tenantstring
ID of the Tenant.
Response
200 — Success
FormobjectElementsarray of object
Elements of the form.Valuesobject
Values supplied for the form elements.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.StepsToExecutearray of objectActionIdstringActionNamestringActionNumberstringAvailableTagSetsarray of objectCanBeSkippedbooleanExcludedMachinesarray of objectHasNoApplicableMachinesbooleanIsDisabledbooleanMachineNamesarray of stringMachinesarray of objectRolesarray of stringUnavailableMachinesarray of object
UseGuidedFailureModeByDefaultboolean
Example Response
{
"Form": {
"Elements": [
{
"Control": {},
"IsValueRequired": true,
"Name": "string"
}
],
"Values": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
},
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"StepsToExecute": [
{
"ActionId": "string",
"ActionName": "string",
"ActionNumber": "string",
"AvailableTagSets": [
{}
],
"CanBeSkipped": true,
"ExcludedMachines": [
{}
],
"HasNoApplicableMachines": true,
"IsDisabled": true,
"MachineNames": [
"string"
],
"Machines": [
{}
],
"Roles": [
"string"
],
"UnavailableMachines": [
{}
]
}
],
"UseGuidedFailureModeByDefault": true
}Get a Runbook Run Preview for a Runbook
GET /api
Also reachable at /api, /api.
Gets a Runbook Run Preview that describes what steps will/won’t be run during a Runbook Run on a given environment (and tenant if supplied) for a Runbook.
Path Parameters
environmentstring (required)
ID of the Environment.idstring (required)
ID of the Runbook.projectIdstring (required)
ID of the Project.spaceIdstring (required)
The ID of the space containing the resource(s).tenantstring (required)
ID of the Tenant.
Query Parameters
includeDisabledStepsboolean
Boolean to include/exclude disabled steps from response.
Response
200 — Success
FormobjectElementsarray of object
Elements of the form.Valuesobject
Values supplied for the form elements.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.StepsToExecutearray of objectActionIdstringActionNamestringActionNumberstringAvailableTagSetsarray of objectCanBeSkippedbooleanExcludedMachinesarray of objectHasNoApplicableMachinesbooleanIsDisabledbooleanMachineNamesarray of stringMachinesarray of objectRolesarray of stringUnavailableMachinesarray of object
UseGuidedFailureModeByDefaultboolean
Example Response
{
"Form": {
"Elements": [
{
"Control": {},
"IsValueRequired": true,
"Name": "string"
}
],
"Values": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
},
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"StepsToExecute": [
{
"ActionId": "string",
"ActionName": "string",
"ActionNumber": "string",
"AvailableTagSets": [
{}
],
"CanBeSkipped": true,
"ExcludedMachines": [
{}
],
"HasNoApplicableMachines": true,
"IsDisabled": true,
"MachineNames": [
"string"
],
"Machines": [
{}
],
"Roles": [
"string"
],
"UnavailableMachines": [
{}
]
}
],
"UseGuidedFailureModeByDefault": true
}Run the published version of this Runbook
POST /api
Also reachable at /api, /api.
Path Parameters
projectIdstring (required)
ID of the project that the runbook belongs to.runbookIdstring (required)
ID of the runbook to run.spaceIdstring (required)
The ID of the space containing the resource(s).
Request Body
ChangeRequestSettingsarray of object
Change Request Settings.Typeenum
Allowed values:ServiceNow,JiraServiceManagement.
Commentsstring
Any additional information/context.DebugModestring
If set to true contributes the OctopusPrintVariables and OctopusPrintEvaluatedVariables variables to the runbook run.EnvironmentIdstring
Legacy single-environment field; prefer EnvironmentIds. If set, this environment is added to the ones the runbook runs in. At least one of EnvironmentIds or EnvironmentId is required.EnvironmentIdsarray of string
The environments to run the runbook in — the preferred way to specify targets, one run per environment. At least one of EnvironmentIds or EnvironmentId is required.ExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the runbook run.ExcludedTargetTagIdsarray of string
A collection of target tag IDs that should be excluded from the deployment. Only deployment targets that have none of these tags will be deployed to. Tag IDs are in the format “TagSets-{id}/Tags-{id}”.FailTargetDiscoveryboolean
Whether to skip or fail cloud discovery steps with no matching target (default false).ForcePackageDownloadboolean
Whether to force downloading of already installed packages (flag, default false).FormValuesobject
Variables.PrioritystringProjectIdstring
ID of the project that the runbook belongs to.QueueTimestring
The time to execute the runbook run. Formatdate-time.QueueTimeExpirystring
The time at which the runbook run will timeout if it has not started executing. Formatdate-time.RunbookIdstring (required)
ID of the runbook to run.RunbookSnapshotNameOrIdstring
Name or ID of a specific snapshot to run. Leave unset to run the published snapshot; when you set this, also set UseDefaultSnapshot to false.SkipActionsarray of string
Actions that are to be skipped for this runbook.SpaceIdstring (required)
The ID of the space containing the resource(s).SpecificMachineIdsarray of string
A collection of machines in the target environment that the runbook should be run on. If the collection is empty, all enabled machines are used.SpecificTargetTagIdsarray of string
A collection of target tag IDs that should be included in the deployment. Only deployment targets that have at least one of these tags will be deployed to. Tag IDs are in the format “TagSets-{id}/Tags-{id}”.TenantIdstring
Legacy single-tenant field; prefer TenantIds. If set, this tenant is added to the ones the runbook runs for.TenantIdsarray of string
The tenants to run the runbook for — the preferred way to specify tenants, creating one run per environment/tenant combination. Leave empty for an untenanted run.TenantTagNamesarray of string
The tenant tags to filter tenants to run the runbook.UseDefaultSnapshotboolean
Whether to run the runbook’s published (default) snapshot. Leave true to run the published snapshot; set to false when you name a specific snapshot in RunbookSnapshotNameOrId.UseGuidedFailureboolean
If set to true, the runbook will prompt for manual intervention (Fail/Retry/Ignore) when failures are encountered in activities that support it. May be overridden with the Octopus.UseGuidedFailure special variable.
Response
200 — OK
Example Request
{
"ChangeRequestSettings": [
{
"Type": "ServiceNow"
}
],
"Comments": "string",
"DebugMode": "string",
"EnvironmentId": "Environments-1",
"EnvironmentIds": [
"Environments-1",
"..."
],
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Priority": "string",
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "Runbooks-1",
"RunbookSnapshotNameOrId": "string",
"SkipActions": [
"string"
],
"SpaceId": "Spaces-1",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TenantId": "Tenants-1",
"TenantIds": [
"Tenants-1",
"..."
],
"TenantTagNames": [
"string"
],
"UseDefaultSnapshot": true,
"UseGuidedFailure": true
}Get a list of Runbook Run Previews for a Runbook
POST /api
Also reachable at /api, /api.
Gets a list of Runbook Run Previews that describes what steps will/won’t be run during a Runbook Run on a given environment and tenant for a Runbook.
Path Parameters
projectIdstring (required)
ID of the Project.runbookIdstring (required)
ID of the Runbook.spaceIdstring (required)
The ID of the space containing the resource(s).
Request Body
DeploymentPreviewsarray of object (required)
A list of Tenant/Environment mappings to retrieve runbook run previews for.EnvironmentIdstringTenantIdstring
IncludeDisabledStepsboolean
Boolean to include/exclude disabled steps from response.ProjectIdstring (required)
ID of the Project.RunbookIdstring (required)
ID of the Runbook.SpaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — The requested list of Runbook Run previews
FormobjectElementsarray of object
Elements of the form.Valuesobject
Values supplied for the form elements.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.StepsToExecutearray of objectActionIdstringActionNamestringActionNumberstringAvailableTagSetsarray of objectCanBeSkippedbooleanExcludedMachinesarray of objectHasNoApplicableMachinesbooleanIsDisabledbooleanMachineNamesarray of stringMachinesarray of objectRolesarray of stringUnavailableMachinesarray of object
UseGuidedFailureModeByDefaultboolean
Example Request
{
"DeploymentPreviews": [
{
"EnvironmentId": "Environments-1",
"TenantId": "Tenants-1"
}
],
"IncludeDisabledSteps": true,
"ProjectId": "Projects-1",
"RunbookId": "Runbooks-1",
"SpaceId": "Spaces-1"
}Example Response
[
{
"Form": {
"Elements": [
{}
],
"Values": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
},
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"StepsToExecute": [
{
"ActionId": "string",
"ActionName": "string",
"ActionNumber": "string",
"AvailableTagSets": [
{}
],
"CanBeSkipped": true,
"ExcludedMachines": [
{}
],
"HasNoApplicableMachines": true,
"IsDisabled": true,
"MachineNames": [
"string"
],
"Machines": [
{}
],
"Roles": [
"string"
],
"UnavailableMachines": [
{}
]
}
],
"UseGuidedFailureModeByDefault": true
}
]Get all of the information necessary for creating or editing a Snapshot for a Runbook
GET /api
Also reachable at /api, /api.
Path Parameters
projectIdstring (required)
Project Id of the project containing the runbook.runbookIdstring (required)
ID of the Runbook.spaceIdstring (required)
Response
200 — Confirmation that a new Runbook Snapshot Template has been created, containing the template
GitResourcesarray of objectActionNamestring
Minimum length 1.DefaultBranchstring
Minimum length 1.FilePathFiltersarray of stringGitCredentialIdstringGitHubConnectionIdstringGitResourceSelectedLastReleaseobjectIsResolvablebooleanNamestringRepositoryUristring
Minimum length 1.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NextNameIncrementstringPackagesarray of objectActionNamestringFeedIdstringFeedNamestringFixedVersionstringIsResolvableboolean
Gets or sets a value indicating whether the PackageId or FeedId contain no references to other variables. Variables can be used to select different NuGet feeds or packages at deployment time, however, this means that it’s not possible to resolve which feed/package to search when creating a release.NuGetFeedIdstringNuGetFeedNamestringNuGetPackageIdstringPackageIdstringPackageReferenceNamestringProjectNamestringStepNamestringVersionSelectedLastReleasestring
RunbookIdstringRunbookProcessIdstring
Example Response
{
"GitResources": [
{
"ActionName": "string",
"DefaultBranch": "string",
"FilePathFilters": [
"string"
],
"GitCredentialId": "string",
"GitHubConnectionId": "string",
"GitResourceSelectedLastRelease": {
"GitCommit": "string",
"GitRef": "string"
},
"IsResolvable": true,
"Name": "string",
"RepositoryUri": "string"
}
],
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"NextNameIncrement": "string",
"Packages": [
{
"ActionName": "string",
"FeedId": "string",
"FeedName": "string",
"FixedVersion": "string",
"IsResolvable": true,
"NuGetFeedId": "string",
"NuGetFeedName": "string",
"NuGetPackageId": "string",
"PackageId": "string",
"PackageReferenceName": "string",
"ProjectName": "string",
"StepName": "string",
"VersionSelectedLastRelease": "string"
}
],
"RunbookId": "string",
"RunbookProcessId": "string"
}Get a paginated list of the Runbooks that belong to the given Project
GET /api
Also reachable at /api, /api.
Path Parameters
gitRefstring (required)
The GitRef containing the resource(s).projectIdstring (required)
The ID of the project.spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
excludedRunbookTagsarray of string
A list of tag IDs to exclude runbooks by. Returns runbooks that have none of the specified tags.partialNamestring
A partial or complete name to search on. This will perform a “contains” style match against the supplied name or name-fragment.runbookTagsarray of string
A list of tag IDs to filter runbooks by. Returns runbooks that have any of the specified tags.skipinteger
Number of items to skip. Defaults to zero. Minimum0.takeinteger
Number of items to take. Defaults to 30. Minimum0.
Response
200 — Success
Idstring
Gets or sets a unique identifier for this resource.ItemTypestringItemsarray of objectCancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectDefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectRunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
ItemsPerPageintegerLastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastPageNumberintegerLinksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NumberOfPagesintegerTotalResultsinteger
Example Response
{
"Id": "string",
"ItemType": "string",
"Items": [
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}
],
"ItemsPerPage": 0,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastPageNumber": 0,
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"NumberOfPages": 0,
"TotalResults": 0
}Create a new Git runbook
POST /api
Also reachable at /api.
Path Parameters
gitRefstring (required)projectIdstring (required)spaceIdstring (required)
Request Body
ChangeDescriptionstringConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringForcePackageDownloadbooleanGitRefstring (required)MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.Namestring (required)
Minimum length 1.ProjectIdstring (required)RunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookTagsarray of stringSlugstringSpaceIdstring (required)
Response
201 — Created
GitRefstring
Minimum length 1.IdstringNamestring
Minimum length 1.ProjectIdstringSlugstring
Minimum length 1.
Example Request
{
"ChangeDescription": "string",
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"ForcePackageDownload": true,
"GitRef": "string",
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Example Response
{
"GitRef": "string",
"Id": "Runbooks-1",
"Name": "string",
"ProjectId": "Projects-1",
"Slug": "string"
}Get a Runbook by ID
GET /api
Also reachable at /api, /api.
Path Parameters
gitRefstring (required)idstring (required)
ID of the Runbook to retrieve.projectIdstring (required)spaceIdstring (required)
Response
200 — Returns a runbook
CancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Response
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Update an existing Runbook
PUT /api
Also reachable at /api, /api.
Path Parameters
gitRefstring (required)
The Git branch to commit the change to. This must be a branch — a tag or commit cannot be written to — and the branch must not be protected in the project’s version control settings. Use get_branches to list the project’s branches.idstring (required)
The ID of the runbook to update. A runbook stored in Git uses its slug as the ID, which is only unique within its project and Git ref.projectIdstring (required)
The ID of the project the runbook belongs to. Must be a version-controlled project that stores its runbooks in Git.spaceIdstring (required)
Request Body
CancelQueuedTasksboolean
When a new run of this runbook is queued, automatically cancel earlier runs of it that are still queued and now superseded. This is a standing setting on the runbook, not an instruction to cancel anything right now. Omit to leave the current setting unchanged.CancelRunningTasksboolean
When a new run of this runbook is queued, automatically cancel an earlier run of it that is already executing and now superseded. This is a standing setting on the runbook, not an instruction to cancel anything right now. Omit to leave the current setting unchanged.ChangeDescriptionstring
The commit message for the change. Defaults to ‘Update runbook’ when omitted.ConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
What a run does when a step fails. One of ‘EnvironmentDefault’ (follow the target environment’s setting), ‘Off’ (fail the run immediately), or ‘On’ (pause the run and wait for someone to choose whether to retry, ignore or abort). Resets to ‘Off’ when omitted.
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Which environments the runbook may be run in. One of ‘All’ (every environment in the space), ‘Specified’ (only the environments listed in Environments), or ‘FromProjectLifecycles’ (only the environments used by the project’s lifecycles). Resets to ‘All’ when omitted.
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of string
The runbook’s complete environment list, used when EnvironmentScope is ‘Specified’. This replaces the current list, so resubmit the existing environments you want to keep. The update is rejected if it would remove an environment that a project trigger still runs this runbook in.FailTargetDiscoveryboolean
Fail a run when one of its target discovery steps finds no matching deployment targets, instead of letting the step succeed. Resets to false when omitted.ForcePackageDownloadboolean
Re-download every package on each run instead of reusing the copy already cached on the deployment target. Resets to false when omitted.GitRefstring (required)
The Git branch to commit the change to. This must be a branch — a tag or commit cannot be written to — and the branch must not be protected in the project’s version control settings. Use get_branches to list the project’s branches.Idstring (required)
The ID of the runbook to update. A runbook stored in Git uses its slug as the ID, which is only unique within its project and Git ref.MultiTenancyModeenum
Whether the runbook can be run for tenants. One of ‘Untenanted’ (untenanted runs only), ‘Tenanted’ (a tenant must be supplied for every run), or ‘TenantedOrUntenanted’ (either is allowed). Resets to ‘Untenanted’ when omitted.
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.Namestring (required)
Minimum length 1.ProjectIdstring (required)
The ID of the project the runbook belongs to. Must be a version-controlled project that stores its runbooks in Git.PublishedRunbookSnapshotIdstring
The ID of the runbook snapshot to publish. Resubmit the current value to leave the published snapshot alone.RunRetentionPolicyobject (required)QuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstring
Leave this as the value returned by get_runbook. Octopus manages the link between a runbook and its process.RunbookTagsarray of string
The runbook’s complete set of tags, each written as “TagSet/Tag” using either the names or the IDs of the tag set and tag (for example “Ops/Nightly”). This replaces the current tags, so resubmit the existing ones you want to keep. Call find_tag_sets to discover which tag sets apply to runbooks.Slugstring
A short URL-friendly identifier for the runbook, unique within the project. The current slug is kept when omitted.SpaceIdstring (required)
Response
200 — Confirmation that the Runbook has been modified, containing the updated Runbook
CancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Request
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ChangeDescription": "string",
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"GitRef": "string",
"Id": "Runbooks-1",
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Example Response
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Delete an existing Runbook
DELETE /api
Also reachable at /api, /api.
Path Parameters
gitRefstring (required)
The GitRef containing the resource(s).idstring (required)
ID of the Runbook to delete.projectIdstring (required)
The ID of the project.spaceIdstring (required)
The ID of the space containing the resource(s).
Request Body
ChangeDescriptionstring
The commit message for updating the Git repository.GitRefstring (required)
The GitRef containing the resource(s).Idstring (required)
ID of the Runbook to delete.ProjectIdstring (required)
The ID of the project.SpaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — Success
Example Request
{
"ChangeDescription": "string",
"GitRef": "string",
"Id": "Runbooks-1",
"ProjectId": "Projects-1",
"SpaceId": "Spaces-1"
}Get a list of environments a Runbook can be run within, based on its EnvironmentScope
GET /api
Also reachable at /api, /api.
Path Parameters
gitRefstring (required)
The Git ref to read the runbook from.idstring (required)
ID of the Runbook.projectIdstring (required)
The ID of the project containing this resource.spaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — The requested list of Runbook Environments
AllowDynamicInfrastructureboolean
If set to true, deployments to this environment will be allowed to contain steps that manage infrastructure. This relies on DeploymentActionResource being set to allow managing resource for a step.Descriptionstring
Gets or sets a short description of this environment that can be used to explain the purpose of the environment to other users. This field may contain markdown.EnvironmentTagsarray of string
List of tags assigned to this environment.ExtensionSettingsarray of objectExtensionIdstringValuesstring
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of this environment. This should be short, preferably 5-20 characters.SlugstringSortOrderinteger
Gets or sets a number indicating the priority of this environment in sort order. Environments with a lower sort order will appear in the UI before items with a higher sort order.SpaceIdstringUseGuidedFailureboolean
If set to true, deployments will prompt for manual intervention (Fail/Retry/Ignore) when failures are encountered in activities that support it. May be overridden with the Octopus.UseGuidedFailure special variable.
Example Response
[
{
"AllowDynamicInfrastructure": true,
"Description": "string",
"EnvironmentTags": [
"string"
],
"ExtensionSettings": [
{
"ExtensionId": "string",
"Values": "string"
}
],
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"Slug": "string",
"SortOrder": 0,
"SpaceId": "Spaces-1",
"UseGuidedFailure": true
}
]Get a list of environments a Runbook can be run within, based on its EnvironmentScope
GET /api
Also reachable at /api.
Path Parameters
gitRefstring (required)
ID of the Runbook.idstring (required)projectIdstring (required)
The ID of the project containing this resource. Will be inferred if not provided.spaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — The requested list of Runbook Environments
Environmentsarray of objectDescriptionstring
Gets or sets a short description of this environment that can be used to explain the purpose of the environment to other users. This field may contain markdown.EnvironmentTagsarray of string
List of tags assigned to this environment.IdstringNamestring
Gets or sets the name of this environment. This should be short, preferably 5-20 characters. Minimum length 1.Slugstring
Minimum length 1.SpaceIdstringTypestring
Example Response
{
"Environments": [
{
"Description": "string",
"EnvironmentTags": [
"string"
],
"Id": "Environments-1",
"Name": "string",
"Slug": "string",
"SpaceId": "Spaces-1",
"Type": "string"
}
]
}Get all of the information necessary for creating or editing a Runbook Run for this Runbook (when you do not have a snapshot)
GET /api
Also reachable at /api, /api.
Path Parameters
gitRefstring (required)
Gitref to get the runbook template from.idstring (required)
ID of the Runbook to get a Runbook Run Template for.projectIdstring (required)
ID of the project the runbook belongs to.spaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — The requested Runbook Template
Idstring
Gets or sets a unique identifier for this resource.IsGitResourceModifiedbooleanIsLibraryVariableSetModifiedbooleanIsRunbookProcessModifiedbooleanIsVariableSetModifiedbooleanLastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.PromoteToarray of objectIdstringLinksobjectNamestring
TenantPromotionsarray of objectIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NamestringPromoteToarray of object
Example Response
{
"Id": "string",
"IsGitResourceModified": true,
"IsLibraryVariableSetModified": true,
"IsRunbookProcessModified": true,
"IsVariableSetModified": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"PromoteTo": [
{
"Id": "Environments-1",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string"
}
],
"TenantPromotions": [
{
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PromoteTo": [
{}
]
}
]
}Get a Runbook Run Preview for a Runbook
GET /api
Also reachable at /api, /api.
Gets a Runbook Run Preview that describes what steps will/won’t be run during a Runbook Run on a given environment (and tenant if supplied) for a Runbook.
Path Parameters
environmentstring (required)
ID of the Environment.gitRefstring (required)idstring (required)
ID of the Runbook.projectIdstring (required)
ID of the Project.spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
includeDisabledStepsboolean
Boolean to include/exclude disabled steps from response.tenantstring
ID of the Tenant.
Response
200 — Success
FormobjectElementsarray of object
Elements of the form.Valuesobject
Values supplied for the form elements.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.StepsToExecutearray of objectActionIdstringActionNamestringActionNumberstringAvailableTagSetsarray of objectCanBeSkippedbooleanExcludedMachinesarray of objectHasNoApplicableMachinesbooleanIsDisabledbooleanMachineNamesarray of stringMachinesarray of objectRolesarray of stringUnavailableMachinesarray of object
UseGuidedFailureModeByDefaultboolean
Example Response
{
"Form": {
"Elements": [
{
"Control": {},
"IsValueRequired": true,
"Name": "string"
}
],
"Values": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
},
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"StepsToExecute": [
{
"ActionId": "string",
"ActionName": "string",
"ActionNumber": "string",
"AvailableTagSets": [
{}
],
"CanBeSkipped": true,
"ExcludedMachines": [
{}
],
"HasNoApplicableMachines": true,
"IsDisabled": true,
"MachineNames": [
"string"
],
"Machines": [
{}
],
"Roles": [
"string"
],
"UnavailableMachines": [
{}
]
}
],
"UseGuidedFailureModeByDefault": true
}Get a Runbook Run Preview for a Runbook
GET /api
Also reachable at /api, /api.
Gets a Runbook Run Preview that describes what steps will/won’t be run during a Runbook Run on a given environment (and tenant if supplied) for a Runbook.
Path Parameters
environmentstring (required)
ID of the Environment.gitRefstring (required)
ID of the Project.idstring (required)
ID of the Runbook.projectIdstring (required)
ID of the Project.spaceIdstring (required)
The ID of the space containing the resource(s).tenantstring (required)
ID of the Tenant.
Query Parameters
includeDisabledStepsboolean
Boolean to include/exclude disabled steps from response.
Response
200 — Success
FormobjectElementsarray of object
Elements of the form.Valuesobject
Values supplied for the form elements.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.StepsToExecutearray of objectActionIdstringActionNamestringActionNumberstringAvailableTagSetsarray of objectCanBeSkippedbooleanExcludedMachinesarray of objectHasNoApplicableMachinesbooleanIsDisabledbooleanMachineNamesarray of stringMachinesarray of objectRolesarray of stringUnavailableMachinesarray of object
UseGuidedFailureModeByDefaultboolean
Example Response
{
"Form": {
"Elements": [
{
"Control": {},
"IsValueRequired": true,
"Name": "string"
}
],
"Values": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
},
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"StepsToExecute": [
{
"ActionId": "string",
"ActionName": "string",
"ActionNumber": "string",
"AvailableTagSets": [
{}
],
"CanBeSkipped": true,
"ExcludedMachines": [
{}
],
"HasNoApplicableMachines": true,
"IsDisabled": true,
"MachineNames": [
"string"
],
"Machines": [
{}
],
"Roles": [
"string"
],
"UnavailableMachines": [
{}
]
}
],
"UseGuidedFailureModeByDefault": true
}Get a list of Runbook Run Previews for a Runbook
POST /api
Also reachable at /api, /api.
Gets a list of Runbook Run Previews that describes what steps will/won’t be run during a Runbook Run on a given environment and tenant for a Runbook.
Path Parameters
gitRefstring (required)projectIdstring (required)
ID of the Project.runbookIdstring (required)
ID of the Runbook.spaceIdstring (required)
The ID of the space containing the resource(s).
Request Body
DeploymentPreviewsarray of object (required)
A list of Tenant/Environment mappings to retrieve runbook run previews for.EnvironmentIdstringTenantIdstring
GitRefstring (required)IncludeDisabledStepsboolean
Boolean to include/exclude disabled steps from response.ProjectIdstring (required)
ID of the Project.RunbookIdstring (required)
ID of the Runbook.SpaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — The requested list of Runbook Run previews
FormobjectElementsarray of object
Elements of the form.Valuesobject
Values supplied for the form elements.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.StepsToExecutearray of objectActionIdstringActionNamestringActionNumberstringAvailableTagSetsarray of objectCanBeSkippedbooleanExcludedMachinesarray of objectHasNoApplicableMachinesbooleanIsDisabledbooleanMachineNamesarray of stringMachinesarray of objectRolesarray of stringUnavailableMachinesarray of object
UseGuidedFailureModeByDefaultboolean
Example Request
{
"DeploymentPreviews": [
{
"EnvironmentId": "Environments-1",
"TenantId": "Tenants-1"
}
],
"GitRef": "string",
"IncludeDisabledSteps": true,
"ProjectId": "Projects-1",
"RunbookId": "Runbooks-1",
"SpaceId": "Spaces-1"
}Example Response
[
{
"Form": {
"Elements": [
{}
],
"Values": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
},
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"StepsToExecute": [
{
"ActionId": "string",
"ActionName": "string",
"ActionNumber": "string",
"AvailableTagSets": [
{}
],
"CanBeSkipped": true,
"ExcludedMachines": [
{}
],
"HasNoApplicableMachines": true,
"IsDisabled": true,
"MachineNames": [
"string"
],
"Machines": [
{}
],
"Roles": [
"string"
],
"UnavailableMachines": [
{}
]
}
],
"UseGuidedFailureModeByDefault": true
}
]Get all of the information necessary for creating or editing a Snapshot for a Runbook
GET /api
Also reachable at /api, /api.
Path Parameters
gitrefstring (required)projectIdstring (required)
Project Id of the project containing the runbook.runbookIdstring (required)
ID of the Runbook.spaceIdstring (required)
Response
200 — Confirmation that a new Runbook Snapshot Template has been created, containing the template
GitResourcesarray of objectActionNamestring
Minimum length 1.DefaultBranchstring
Minimum length 1.FilePathFiltersarray of stringGitCredentialIdstringGitHubConnectionIdstringGitResourceSelectedLastReleaseobjectIsResolvablebooleanNamestringRepositoryUristring
Minimum length 1.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NextNameIncrementstringPackagesarray of objectActionNamestringFeedIdstringFeedNamestringFixedVersionstringIsResolvableboolean
Gets or sets a value indicating whether the PackageId or FeedId contain no references to other variables. Variables can be used to select different NuGet feeds or packages at deployment time, however, this means that it’s not possible to resolve which feed/package to search when creating a release.NuGetFeedIdstringNuGetFeedNamestringNuGetPackageIdstringPackageIdstringPackageReferenceNamestringProjectNamestringStepNamestringVersionSelectedLastReleasestring
RunbookIdstringRunbookProcessIdstring
Example Response
{
"GitResources": [
{
"ActionName": "string",
"DefaultBranch": "string",
"FilePathFilters": [
"string"
],
"GitCredentialId": "string",
"GitHubConnectionId": "string",
"GitResourceSelectedLastRelease": {
"GitCommit": "string",
"GitRef": "string"
},
"IsResolvable": true,
"Name": "string",
"RepositoryUri": "string"
}
],
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"NextNameIncrement": "string",
"Packages": [
{
"ActionName": "string",
"FeedId": "string",
"FeedName": "string",
"FixedVersion": "string",
"IsResolvable": true,
"NuGetFeedId": "string",
"NuGetFeedName": "string",
"NuGetPackageId": "string",
"PackageId": "string",
"PackageReferenceName": "string",
"ProjectName": "string",
"StepName": "string",
"VersionSelectedLastRelease": "string"
}
],
"RunbookId": "string",
"RunbookProcessId": "string"
}Get a list of Runbooks
GET /api
Also reachable at /api, /api.
Gets a paginated list of the Runbooks in the supplied Octopus Deploy Space (sorted by name).
Path Parameters
spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
idsarray of string
List of Runbook IDs which if specified, filters the result to only include Runbooks with matching IDs.partialNamestring
A partial or complete name to search on. This will perform a “contains” style match against the supplied name or name-fragment.skipinteger
Number of items to skip. Defaults to zero. Minimum0.takeinteger
Number of items to take. Defaults to 30. Minimum0.
Response
200 — A paginated list of the Runbooks in the supplied Octopus Deploy Space (sorted by name).
Idstring
Gets or sets a unique identifier for this resource.ItemTypestringItemsarray of objectCancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectDefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectRunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
ItemsPerPageintegerLastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastPageNumberintegerLinksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NumberOfPagesintegerTotalResultsinteger
Example Response
{
"Id": "string",
"ItemType": "string",
"Items": [
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}
],
"ItemsPerPage": 0,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastPageNumber": 0,
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"NumberOfPages": 0,
"TotalResults": 0
}Create a new Runbook or clone an existing Runbook
POST /api
Also reachable at /api, /api.
Path Parameters
spaceIdstring (required)
The ID of the space containing the resource(s).
Request Body
Clonestring
The ID of an existing database runbook to copy. Cloning brings across the source runbook’s settings, its process and steps, and any project triggers that target it. The source runbook’s tags come across too, unless you supply RunbookTags. Leave unset to create a runbook from scratch, which starts with an empty process.ConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
What a run does when a step fails. One of ‘EnvironmentDefault’ (follow the target environment’s setting), ‘Off’ (fail the run immediately, the default), or ‘On’ (pause the run and wait for someone to choose whether to retry, ignore or abort).
Allowed values:EnvironmentDefault,Off,On.Descriptionstring
The description of the Runbook to create.EnvironmentScopeenum
Which environments the runbook may be run in. One of ‘All’ (every environment in the space, the default), ‘Specified’ (only the environments listed in Environments), or ‘FromProjectLifecycles’ (only the environments used by the project’s lifecycles).
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of string
The environments the runbook may be run in. Only applies when EnvironmentScope is ‘Specified’; ignored otherwise.ForcePackageDownloadboolean
Re-download every package on each run instead of reusing the copy already cached on the deployment target.MultiTenancyModeenum
Whether the runbook can be run for tenants. One of ‘Untenanted’ (untenanted runs only, the default), ‘Tenanted’ (a tenant must be supplied for every run), or ‘TenantedOrUntenanted’ (either is allowed).
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.Namestring (required)
The name of the Runbook to create. Minimum length 1.ProjectIdstring (required)
The ID of the project to create the runbook in. Must be a project that stores its runbooks in the Octopus database.PublishedRunbookSnapshotIdstring
Leave unset. A snapshot can only be published after the runbook exists and has a process.RunRetentionPolicyobject (required)QuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstring
Leave unset. Octopus creates an empty runbook process for the new runbook and links it automatically.RunbookTagsarray of string
Tags to apply to the runbook, each written as “TagSet/Tag” using either the names or the IDs of the tag set and tag (for example “Ops/Nightly”). Call find_tag_sets to discover which tag sets apply to runbooks and what tags they contain.Slugstring
A short URL-friendly identifier for the runbook, unique within the project. Generated from the name when omitted.SpaceIdstring (required)
The ID of the space containing the resource(s).
Response
201 — Created
CancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Request
{
"Clone": "Runbooks-1",
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"ForcePackageDownload": true,
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "RunbookProcess-Runbooks-1",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Example Response
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Get a list of Runbooks
GET /api
Also reachable at /api, /api.
Lists all of the Runbooks in the supplied Space. The results will be sorted alphabetically by name.
Path Parameters
spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
idsarray of string
A list of Runbook resource ids used to filter a query.projectIdsarray of string
A list of Project ids used to filter a query.
Response
200 — Requested list of Runbooks
CancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Response
[
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}
]Get a Runbook by ID
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook to retrieve.spaceIdstring (required)
Query Parameters
projectIdstring
Response
200 — Returns a runbook
CancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Response
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Update an existing Runbook
PUT /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
The ID of the runbook to update, for example ‘Runbooks-123’.spaceIdstring (required)
Request Body
CancelQueuedTasksboolean
When a new run of this runbook is queued, automatically cancel earlier runs of it that are still queued and now superseded. This is a standing setting on the runbook, not an instruction to cancel anything right now. Omit to leave the current setting unchanged.CancelRunningTasksboolean
When a new run of this runbook is queued, automatically cancel an earlier run of it that is already executing and now superseded. This is a standing setting on the runbook, not an instruction to cancel anything right now. Omit to leave the current setting unchanged.ConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
What a run does when a step fails. One of ‘EnvironmentDefault’ (follow the target environment’s setting), ‘Off’ (fail the run immediately), or ‘On’ (pause the run and wait for someone to choose whether to retry, ignore or abort). Resets to ‘Off’ when omitted.
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Which environments the runbook may be run in. One of ‘All’ (every environment in the space), ‘Specified’ (only the environments listed in Environments), or ‘FromProjectLifecycles’ (only the environments used by the project’s lifecycles). Resets to ‘All’ when omitted.
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of string
The runbook’s complete environment list, used when EnvironmentScope is ‘Specified’. This replaces the current list, so resubmit the existing environments you want to keep. The update is rejected if it would remove an environment that a project trigger still runs this runbook in.FailTargetDiscoveryboolean
Fail a run when one of its target discovery steps finds no matching deployment targets, instead of letting the step succeed. Resets to false when omitted.ForcePackageDownloadboolean
Re-download every package on each run instead of reusing the copy already cached on the deployment target. Resets to false when omitted.Idstring (required)
The ID of the runbook to update, for example ‘Runbooks-123’.MultiTenancyModeenum
Whether the runbook can be run for tenants. One of ‘Untenanted’ (untenanted runs only), ‘Tenanted’ (a tenant must be supplied for every run), or ‘TenantedOrUntenanted’ (either is allowed). Resets to ‘Untenanted’ when omitted.
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.Namestring (required)
Minimum length 1.ProjectIdstring (required)
The ID of the project the runbook belongs to. Must be a project that stores its runbooks in the Octopus database.PublishedRunbookSnapshotIdstring
The ID of the runbook snapshot to publish. Setting this to a different snapshot publishes that snapshot, which is what subsequent runs execute. Resubmit the current value to leave the published snapshot alone.RunRetentionPolicyobject (required)QuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstring
Leave this as the value returned by get_runbook. Octopus manages the link between a runbook and its process.RunbookTagsarray of string
The runbook’s complete set of tags, each written as “TagSet/Tag” using either the names or the IDs of the tag set and tag (for example “Ops/Nightly”). This replaces the current tags, so resubmit the existing ones you want to keep. Call find_tag_sets to discover which tag sets apply to runbooks.Slugstring
A short URL-friendly identifier for the runbook, unique within the project. The current slug is kept when omitted.SpaceIdstring (required)
Response
200 — Confirmation that the Runbook has been modified, containing the updated Runbook
CancelQueuedTasksbooleanCancelRunningTasksbooleanConnectivityPolicyobjectAllowDeploymentsToNoTargetsbooleanExcludeUnhealthyTargetsbooleanSkipMachineBehaviorenum
Allowed values:None,SkipUnavailableMachines.TargetRolesarray of string
DefaultGuidedFailureModeenum
Allowed values:EnvironmentDefault,Off,On.DescriptionstringEnvironmentScopeenum
Allowed values:All,Specified,FromProjectLifecycles.Environmentsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MultiTenancyModeenum
Allowed values:Untenanted,TenantedOrUntenanted,Tenanted.NamestringProjectIdstringPublishedRunbookSnapshotIdstringRunRetentionPolicyobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
RunbookProcessIdstringRunbookTagsarray of string
List of tags assigned to this runbook.SlugstringSpaceIdstring
Example Request
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "Runbooks-1",
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Example Response
{
"CancelQueuedTasks": true,
"CancelRunningTasks": true,
"ConnectivityPolicy": {
"AllowDeploymentsToNoTargets": true,
"ExcludeUnhealthyTargets": true,
"SkipMachineBehavior": "None",
"TargetRoles": [
"string"
]
},
"DefaultGuidedFailureMode": "EnvironmentDefault",
"Description": "string",
"EnvironmentScope": "All",
"Environments": [
"Environments-1",
"..."
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"MultiTenancyMode": "Untenanted",
"Name": "string",
"ProjectId": "Projects-1",
"PublishedRunbookSnapshotId": "string",
"RunRetentionPolicy": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"RunbookProcessId": "string",
"RunbookTags": [
"string"
],
"Slug": "string",
"SpaceId": "Spaces-1"
}Delete an existing Runbook
DELETE /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook to delete.spaceIdstring (required)
Response
200 — Success
Get a list of environments a Runbook can be run within, based on its EnvironmentScope
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook.spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
projectIdstring
The ID of the project containing this resource. Will be inferred if not provided.
Response
200 — The requested list of Runbook Environments
AllowDynamicInfrastructureboolean
If set to true, deployments to this environment will be allowed to contain steps that manage infrastructure. This relies on DeploymentActionResource being set to allow managing resource for a step.Descriptionstring
Gets or sets a short description of this environment that can be used to explain the purpose of the environment to other users. This field may contain markdown.EnvironmentTagsarray of string
List of tags assigned to this environment.ExtensionSettingsarray of objectExtensionIdstringValuesstring
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of this environment. This should be short, preferably 5-20 characters.SlugstringSortOrderinteger
Gets or sets a number indicating the priority of this environment in sort order. Environments with a lower sort order will appear in the UI before items with a higher sort order.SpaceIdstringUseGuidedFailureboolean
If set to true, deployments will prompt for manual intervention (Fail/Retry/Ignore) when failures are encountered in activities that support it. May be overridden with the Octopus.UseGuidedFailure special variable.
Example Response
[
{
"AllowDynamicInfrastructure": true,
"Description": "string",
"EnvironmentTags": [
"string"
],
"ExtensionSettings": [
{
"ExtensionId": "string",
"Values": "string"
}
],
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"Slug": "string",
"SortOrder": 0,
"SpaceId": "Spaces-1",
"UseGuidedFailure": true
}
]Get all of the information necessary for creating or editing a Runbook Run for this Runbook (when you do not have a snapshot)
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook to get a Runbook Run Template for.spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
projectIdstring
ID of the project the runbook belongs to.
Response
200 — The requested Runbook Template
Idstring
Gets or sets a unique identifier for this resource.IsGitResourceModifiedbooleanIsLibraryVariableSetModifiedbooleanIsRunbookProcessModifiedbooleanIsVariableSetModifiedbooleanLastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.PromoteToarray of objectIdstringLinksobjectNamestring
TenantPromotionsarray of objectIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NamestringPromoteToarray of object
Example Response
{
"Id": "string",
"IsGitResourceModified": true,
"IsLibraryVariableSetModified": true,
"IsRunbookProcessModified": true,
"IsVariableSetModified": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"PromoteTo": [
{
"Id": "Environments-1",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string"
}
],
"TenantPromotions": [
{
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PromoteTo": [
{}
]
}
]
}Get a Runbook Run Preview for a Runbook
GET /api
Also reachable at /api, /api.
Gets a Runbook Run Preview that describes what steps will/won’t be run during a Runbook Run on a given environment (and tenant if supplied) for a Runbook.
Path Parameters
environmentstring (required)
ID of the Environment.idstring (required)
ID of the Runbook.spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
includeDisabledStepsboolean
Boolean to include/exclude disabled steps from response.projectIdstring
ID of the Project.tenantstring
ID of the Tenant.
Response
200 — Success
FormobjectElementsarray of object
Elements of the form.Valuesobject
Values supplied for the form elements.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.StepsToExecutearray of objectActionIdstringActionNamestringActionNumberstringAvailableTagSetsarray of objectCanBeSkippedbooleanExcludedMachinesarray of objectHasNoApplicableMachinesbooleanIsDisabledbooleanMachineNamesarray of stringMachinesarray of objectRolesarray of stringUnavailableMachinesarray of object
UseGuidedFailureModeByDefaultboolean
Example Response
{
"Form": {
"Elements": [
{
"Control": {},
"IsValueRequired": true,
"Name": "string"
}
],
"Values": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
},
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"StepsToExecute": [
{
"ActionId": "string",
"ActionName": "string",
"ActionNumber": "string",
"AvailableTagSets": [
{}
],
"CanBeSkipped": true,
"ExcludedMachines": [
{}
],
"HasNoApplicableMachines": true,
"IsDisabled": true,
"MachineNames": [
"string"
],
"Machines": [
{}
],
"Roles": [
"string"
],
"UnavailableMachines": [
{}
]
}
],
"UseGuidedFailureModeByDefault": true
}Get a Runbook Run Preview for a Runbook
GET /api
Also reachable at /api, /api.
Gets a Runbook Run Preview that describes what steps will/won’t be run during a Runbook Run on a given environment (and tenant if supplied) for a Runbook.
Path Parameters
environmentstring (required)
ID of the Environment.idstring (required)
ID of the Runbook.spaceIdstring (required)
The ID of the space containing the resource(s).tenantstring (required)
ID of the Tenant.
Query Parameters
includeDisabledStepsboolean
Boolean to include/exclude disabled steps from response.projectIdstring
ID of the Project.
Response
200 — Success
FormobjectElementsarray of object
Elements of the form.Valuesobject
Values supplied for the form elements.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.StepsToExecutearray of objectActionIdstringActionNamestringActionNumberstringAvailableTagSetsarray of objectCanBeSkippedbooleanExcludedMachinesarray of objectHasNoApplicableMachinesbooleanIsDisabledbooleanMachineNamesarray of stringMachinesarray of objectRolesarray of stringUnavailableMachinesarray of object
UseGuidedFailureModeByDefaultboolean
Example Response
{
"Form": {
"Elements": [
{
"Control": {},
"IsValueRequired": true,
"Name": "string"
}
],
"Values": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
},
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"StepsToExecute": [
{
"ActionId": "string",
"ActionName": "string",
"ActionNumber": "string",
"AvailableTagSets": [
{}
],
"CanBeSkipped": true,
"ExcludedMachines": [
{}
],
"HasNoApplicableMachines": true,
"IsDisabled": true,
"MachineNames": [
"string"
],
"Machines": [
{}
],
"Roles": [
"string"
],
"UnavailableMachines": [
{}
]
}
],
"UseGuidedFailureModeByDefault": true
}Run the published version of this Runbook
POST /api
Also reachable at /api, /api.
Path Parameters
runbookIdstring (required)
ID of the runbook to run.spaceIdstring (required)
The ID of the space containing the resource(s).
Request Body
ChangeRequestSettingsarray of object
Change Request Settings.Typeenum
Allowed values:ServiceNow,JiraServiceManagement.
Commentsstring
Any additional information/context.DebugModestring
If set to true contributes the OctopusPrintVariables and OctopusPrintEvaluatedVariables variables to the runbook run.EnvironmentIdstring
Legacy single-environment field; prefer EnvironmentIds. If set, this environment is added to the ones the runbook runs in. At least one of EnvironmentIds or EnvironmentId is required.EnvironmentIdsarray of string
The environments to run the runbook in — the preferred way to specify targets, one run per environment. At least one of EnvironmentIds or EnvironmentId is required.ExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the runbook run.ExcludedTargetTagIdsarray of string
A collection of target tag IDs that should be excluded from the deployment. Only deployment targets that have none of these tags will be deployed to. Tag IDs are in the format “TagSets-{id}/Tags-{id}”.FailTargetDiscoveryboolean
Whether to skip or fail cloud discovery steps with no matching target (default false).ForcePackageDownloadboolean
Whether to force downloading of already installed packages (flag, default false).FormValuesobject
Variables.PrioritystringProjectIdstring
ID of the project that the runbook belongs to.QueueTimestring
The time to execute the runbook run. Formatdate-time.QueueTimeExpirystring
The time at which the runbook run will timeout if it has not started executing. Formatdate-time.RunbookIdstring (required)
ID of the runbook to run.RunbookSnapshotNameOrIdstring
Name or ID of a specific snapshot to run. Leave unset to run the published snapshot; when you set this, also set UseDefaultSnapshot to false.SkipActionsarray of string
Actions that are to be skipped for this runbook.SpaceIdstring (required)
The ID of the space containing the resource(s).SpecificMachineIdsarray of string
A collection of machines in the target environment that the runbook should be run on. If the collection is empty, all enabled machines are used.SpecificTargetTagIdsarray of string
A collection of target tag IDs that should be included in the deployment. Only deployment targets that have at least one of these tags will be deployed to. Tag IDs are in the format “TagSets-{id}/Tags-{id}”.TenantIdstring
Legacy single-tenant field; prefer TenantIds. If set, this tenant is added to the ones the runbook runs for.TenantIdsarray of string
The tenants to run the runbook for — the preferred way to specify tenants, creating one run per environment/tenant combination. Leave empty for an untenanted run.TenantTagNamesarray of string
The tenant tags to filter tenants to run the runbook.UseDefaultSnapshotboolean
Whether to run the runbook’s published (default) snapshot. Leave true to run the published snapshot; set to false when you name a specific snapshot in RunbookSnapshotNameOrId.UseGuidedFailureboolean
If set to true, the runbook will prompt for manual intervention (Fail/Retry/Ignore) when failures are encountered in activities that support it. May be overridden with the Octopus.UseGuidedFailure special variable.
Response
200 — OK
Example Request
{
"ChangeRequestSettings": [
{
"Type": "ServiceNow"
}
],
"Comments": "string",
"DebugMode": "string",
"EnvironmentId": "Environments-1",
"EnvironmentIds": [
"Environments-1",
"..."
],
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Priority": "string",
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "Runbooks-1",
"RunbookSnapshotNameOrId": "string",
"SkipActions": [
"string"
],
"SpaceId": "Spaces-1",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TenantId": "Tenants-1",
"TenantIds": [
"Tenants-1",
"..."
],
"TenantTagNames": [
"string"
],
"UseDefaultSnapshot": true,
"UseGuidedFailure": true
}Get all of the information necessary for creating or editing a Snapshot for a Runbook
GET /api
Also reachable at /api, /api.
Path Parameters
runbookIdstring (required)
ID of the Runbook.spaceIdstring (required)
Query Parameters
projectIdstring
Project Id of the project containing the runbook.
Response
200 — Confirmation that a new Runbook Snapshot Template has been created, containing the template
GitResourcesarray of objectActionNamestring
Minimum length 1.DefaultBranchstring
Minimum length 1.FilePathFiltersarray of stringGitCredentialIdstringGitHubConnectionIdstringGitResourceSelectedLastReleaseobjectIsResolvablebooleanNamestringRepositoryUristring
Minimum length 1.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NextNameIncrementstringPackagesarray of objectActionNamestringFeedIdstringFeedNamestringFixedVersionstringIsResolvableboolean
Gets or sets a value indicating whether the PackageId or FeedId contain no references to other variables. Variables can be used to select different NuGet feeds or packages at deployment time, however, this means that it’s not possible to resolve which feed/package to search when creating a release.NuGetFeedIdstringNuGetFeedNamestringNuGetPackageIdstringPackageIdstringPackageReferenceNamestringProjectNamestringStepNamestringVersionSelectedLastReleasestring
RunbookIdstringRunbookProcessIdstring
Example Response
{
"GitResources": [
{
"ActionName": "string",
"DefaultBranch": "string",
"FilePathFilters": [
"string"
],
"GitCredentialId": "string",
"GitHubConnectionId": "string",
"GitResourceSelectedLastRelease": {
"GitCommit": "string",
"GitRef": "string"
},
"IsResolvable": true,
"Name": "string",
"RepositoryUri": "string"
}
],
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"NextNameIncrement": "string",
"Packages": [
{
"ActionName": "string",
"FeedId": "string",
"FeedName": "string",
"FixedVersion": "string",
"IsResolvable": true,
"NuGetFeedId": "string",
"NuGetFeedName": "string",
"NuGetPackageId": "string",
"PackageId": "string",
"PackageReferenceName": "string",
"ProjectName": "string",
"StepName": "string",
"VersionSelectedLastRelease": "string"
}
],
"RunbookId": "string",
"RunbookProcessId": "string"
}