Get a list of Runbook Runs
GET /api
Also reachable at /api, /api.
Lists all of the runbookRuns in the supplied Octopus Deploy Space, from projects, snapshots and environments accessible by the current user. The results will be sorted from most recent to least recent runbookRun.
Path Parameters
projectIdstring (required)spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
environmentsarray of string
Environment Ids to filter results to only Runbook Runs with the given Environment Ids.idsarray of string
Runbook Run Ids to filter results to only Runbook Runs with the given Ids.partialNamestring
A partial name, to limit the set of Runbook Runs to those with a name that includes the partial name.projectsarray of string
Project Ids to filter results to only Runbook Runs with the given Project Ids.runbooksarray of string
Runbook Ids to filter results to only Runbooks with the given Ids.skipinteger
Number of items to skip. Defaults to zero. Minimum0.takeinteger
Number of items to take. Defaults to 30. Minimum0.taskStateenum
Task State to filter results to only Deployments with the given Task State.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.tenantsarray of string
Tenant Ids to filter results to only Runbook Runs with the given Tenant Ids.
Response
200 — The requested list of Runbook Runs
Idstring
Gets or sets a unique identifier for this resource.ItemTypestringItemsarray of objectChangeRequestSettingsarray of objectCommentsstringCreatedstring
Formatdate-time.DebugModestringDeployedBystringDeployedByIdstringDeployedToMachineIdsarray of stringEnvironmentIdstringExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the deployment.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}”.ExecutionPlanLogContextobjectFailTargetDiscoverybooleanFailureEncounteredbooleanForcePackageDownloadbooleanFormValuesobjectFrozenRunbookProcessIdstringIdstring
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.ManifestVariableSetIdstringNamestringPrioritystringProjectIdstringQueueTimestring
If set this time will be the used to schedule the deployment to a later time, null is assumed to mean the time will be executed immediately. Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring
Minimum length 1.RunbookNamestringRunbookSnapshotIdstring
Minimum length 1.SkipActionsarray of stringSpaceIdstringSpecificMachineIdsarray of string
A collection of machines in the target environment that should be deployed to. If the collection is empty, all enabled machines are deployed.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}”.TaskIdstringTenantIdstringTentacleRetentionPeriodobjectUseGuidedFailureboolean
If set to true, the deployment 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.
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": [
{
"ChangeRequestSettings": [
{}
],
"Comments": "string",
"Created": "2020-01-01T00:00:00.000Z",
"DebugMode": "string",
"DeployedBy": "string",
"DeployedById": "string",
"DeployedToMachineIds": [
"string"
],
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"ExecutionPlanLogContext": {
"Steps": [
{}
]
},
"FailTargetDiscovery": true,
"FailureEncountered": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"FrozenRunbookProcessId": "string",
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ManifestVariableSetId": "string",
"Name": "string",
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookName": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TaskId": "string",
"TenantId": "string",
"TentacleRetentionPeriod": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"UseGuidedFailure": true
}
],
"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 Run
POST /api
Also reachable at /api, /api.
Path Parameters
projectIdstring (required)spaceIdstring (required)
Request Body
ChangeRequestSettingsarray of objectTypeenum
Allowed values:ServiceNow,JiraServiceManagement.
CommentsstringDebugModestringEnvironmentIdstring (required)ExcludedMachineIdsarray of stringExcludedTargetTagIdsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanFormValuesobjectPrioritystringProjectIdstringQueueTimestring
Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring (required)RunbookSnapshotIdstring (required)SkipActionsarray of stringSpaceIdstring (required)SpecificMachineIdsarray of stringSpecificTargetTagIdsarray of stringTenantIdstringUseGuidedFailureboolean
Response
201 — Created
ChangeRequestSettingsarray of objectTypeenum
Allowed values:ServiceNow,JiraServiceManagement.
CommentsstringCreatedstring
Formatdate-time.DebugModestringDeployedBystringDeployedByIdstringDeployedToMachineIdsarray of stringEnvironmentIdstringExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the deployment.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}”.ExecutionPlanLogContextobjectStepsarray of object
FailTargetDiscoverybooleanFailureEncounteredbooleanForcePackageDownloadbooleanFormValuesobjectFrozenRunbookProcessIdstringIdstring
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.ManifestVariableSetIdstringNamestringPrioritystringProjectIdstringQueueTimestring
If set this time will be the used to schedule the deployment to a later time, null is assumed to mean the time will be executed immediately. Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring
Minimum length 1.RunbookNamestringRunbookSnapshotIdstring
Minimum length 1.SkipActionsarray of stringSpaceIdstringSpecificMachineIdsarray of string
A collection of machines in the target environment that should be deployed to. If the collection is empty, all enabled machines are deployed.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}”.TaskIdstringTenantIdstringTentacleRetentionPeriodobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
UseGuidedFailureboolean
If set to true, the deployment 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 Request
{
"ChangeRequestSettings": [
{
"Type": "ServiceNow"
}
],
"Comments": "string",
"DebugMode": "string",
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TenantId": "string",
"UseGuidedFailure": true
}Example Response
{
"ChangeRequestSettings": [
{
"Type": "ServiceNow"
}
],
"Comments": "string",
"Created": "2020-01-01T00:00:00.000Z",
"DebugMode": "string",
"DeployedBy": "string",
"DeployedById": "string",
"DeployedToMachineIds": [
"string"
],
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"ExecutionPlanLogContext": {
"Steps": [
{
"CorrelationId": "string",
"Slug": "string"
}
]
},
"FailTargetDiscovery": true,
"FailureEncountered": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"FrozenRunbookProcessId": "string",
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ManifestVariableSetId": "string",
"Name": "string",
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookName": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TaskId": "string",
"TenantId": "string",
"TentacleRetentionPeriod": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"UseGuidedFailure": true
}Get a Runbook Run by ID
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook Run to load.projectIdstring (required)
ID of the Project to which the Runbook Run belongs.spaceIdstring (required)
ID of the Space to which the Runbook Run belongs.
Response
200 — The requested Runbook Run
ChangeRequestSettingsarray of objectTypeenum
Allowed values:ServiceNow,JiraServiceManagement.
CommentsstringCreatedstring
Formatdate-time.DebugModestringDeployedBystringDeployedByIdstringDeployedToMachineIdsarray of stringEnvironmentIdstringExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the deployment.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}”.ExecutionPlanLogContextobjectStepsarray of object
FailTargetDiscoverybooleanFailureEncounteredbooleanForcePackageDownloadbooleanFormValuesobjectFrozenRunbookProcessIdstringIdstring
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.ManifestVariableSetIdstringNamestringPrioritystringProjectIdstringQueueTimestring
If set this time will be the used to schedule the deployment to a later time, null is assumed to mean the time will be executed immediately. Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring
Minimum length 1.RunbookNamestringRunbookSnapshotIdstring
Minimum length 1.SkipActionsarray of stringSpaceIdstringSpecificMachineIdsarray of string
A collection of machines in the target environment that should be deployed to. If the collection is empty, all enabled machines are deployed.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}”.TaskIdstringTenantIdstringTentacleRetentionPeriodobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
UseGuidedFailureboolean
If set to true, the deployment 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
{
"ChangeRequestSettings": [
{
"Type": "ServiceNow"
}
],
"Comments": "string",
"Created": "2020-01-01T00:00:00.000Z",
"DebugMode": "string",
"DeployedBy": "string",
"DeployedById": "string",
"DeployedToMachineIds": [
"string"
],
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"ExecutionPlanLogContext": {
"Steps": [
{
"CorrelationId": "string",
"Slug": "string"
}
]
},
"FailTargetDiscovery": true,
"FailureEncountered": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"FrozenRunbookProcessId": "string",
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ManifestVariableSetId": "string",
"Name": "string",
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookName": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TaskId": "string",
"TenantId": "string",
"TentacleRetentionPeriod": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"UseGuidedFailure": true
}Delete an existing Runbook Run
DELETE /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook Run to delete.projectIdstring (required)
ID of the Project to which the Runbook Run belongs.spaceIdstring (required)
ID of the Space to which the Runbook Run belongs.
Response
200 — Success
Create a new Runbook run based on an existing runbook run
POST /api
Also reachable at /api, /api.
Path Parameters
projectIdstring (required)runbookRunIdstring (required)spaceIdstring (required)
Response
200 — Runbook run that was retried
ResourceobjectChangeRequestSettingsarray of objectCommentsstringCreatedstring
Formatdate-time.DebugModestringDeployedBystringDeployedByIdstringDeployedToMachineIdsarray of stringEnvironmentIdstringExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the deployment.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}”.ExecutionPlanLogContextobjectFailTargetDiscoverybooleanFailureEncounteredbooleanForcePackageDownloadbooleanFormValuesobjectFrozenRunbookProcessIdstringIdstring
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.ManifestVariableSetIdstringNamestringPrioritystringProjectIdstringQueueTimestring
If set this time will be the used to schedule the deployment to a later time, null is assumed to mean the time will be executed immediately. Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring
Minimum length 1.RunbookNamestringRunbookSnapshotIdstring
Minimum length 1.SkipActionsarray of stringSpaceIdstringSpecificMachineIdsarray of string
A collection of machines in the target environment that should be deployed to. If the collection is empty, all enabled machines are deployed.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}”.TaskIdstringTenantIdstringTentacleRetentionPeriodobjectUseGuidedFailureboolean
If set to true, the deployment 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
{
"Resource": {
"ChangeRequestSettings": [
{
"Type": "ServiceNow"
}
],
"Comments": "string",
"Created": "2020-01-01T00:00:00.000Z",
"DebugMode": "string",
"DeployedBy": "string",
"DeployedById": "string",
"DeployedToMachineIds": [
"string"
],
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"ExecutionPlanLogContext": {
"Steps": [
{}
]
},
"FailTargetDiscovery": true,
"FailureEncountered": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"FrozenRunbookProcessId": "string",
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ManifestVariableSetId": "string",
"Name": "string",
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookName": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TaskId": "string",
"TenantId": "string",
"TentacleRetentionPeriod": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"UseGuidedFailure": true
}
}Create a new Runbook Run
POST /api
Also reachable at /api, /api.
Path Parameters
gitRefstring (required)projectIdstring (required)runbookIdstring (required)spaceIdstring (required)
Request Body
GitRefstring (required)NotesstringProjectIdstring (required)RunbookIdstring (required)Runsarray of object (required)ChangeRequestSettingsarray of objectCommentsstringDebugModestringEnvironmentIdstring (required)ExcludedMachineIdsarray of stringExcludedTargetTagIdsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanFormValuesobjectPrioritystringQueueTimestring
Formatdate-time.QueueTimeExpirystring
Formatdate-time.SkipActionsarray of stringSpecificMachineIdsarray of stringSpecificTargetTagIdsarray of stringTenantIdstringUseGuidedFailureboolean
SelectedGitResourcesarray of objectActionNamestring (required)
Minimum length 1.GitReferenceResourceobject (required)GitResourceReferenceNamestring
SelectedPackagesarray of objectActionNamestringPackageReferenceNamestringStepNamestringVersionstring
SpaceIdstring (required)
Response
200 — The newly-created Runbook run
Resourcesarray of objectChangeRequestSettingsarray of objectCommentsstringCreatedstring
Formatdate-time.DebugModestringDeployedBystringDeployedByIdstringDeployedToMachineIdsarray of stringEnvironmentIdstringExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the deployment.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}”.ExecutionPlanLogContextobjectFailTargetDiscoverybooleanFailureEncounteredbooleanForcePackageDownloadbooleanFormValuesobjectFrozenRunbookProcessIdstringIdstring
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.ManifestVariableSetIdstringNamestringPrioritystringProjectIdstringQueueTimestring
If set this time will be the used to schedule the deployment to a later time, null is assumed to mean the time will be executed immediately. Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring
Minimum length 1.RunbookNamestringRunbookSnapshotIdstring
Minimum length 1.SkipActionsarray of stringSpaceIdstringSpecificMachineIdsarray of string
A collection of machines in the target environment that should be deployed to. If the collection is empty, all enabled machines are deployed.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}”.TaskIdstringTenantIdstringTentacleRetentionPeriodobjectUseGuidedFailureboolean
If set to true, the deployment 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 Request
{
"GitRef": "string",
"Notes": "string",
"ProjectId": "string",
"RunbookId": "string",
"Runs": [
{
"ChangeRequestSettings": [
{}
],
"Comments": "string",
"DebugMode": "string",
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Priority": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"SkipActions": [
"string"
],
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TenantId": "string",
"UseGuidedFailure": true
}
],
"SelectedGitResources": [
{
"ActionName": "string",
"GitReferenceResource": {
"GitCommit": "string",
"GitRef": "string"
},
"GitResourceReferenceName": "string"
}
],
"SelectedPackages": [
{
"ActionName": "string",
"PackageReferenceName": "string",
"StepName": "string",
"Version": "string"
}
],
"SpaceId": "string"
}Example Response
{
"Resources": [
{
"ChangeRequestSettings": [
{}
],
"Comments": "string",
"Created": "2020-01-01T00:00:00.000Z",
"DebugMode": "string",
"DeployedBy": "string",
"DeployedById": "string",
"DeployedToMachineIds": [
"string"
],
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"ExecutionPlanLogContext": {
"Steps": [
{}
]
},
"FailTargetDiscovery": true,
"FailureEncountered": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"FrozenRunbookProcessId": "string",
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ManifestVariableSetId": "string",
"Name": "string",
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookName": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TaskId": "string",
"TenantId": "string",
"TentacleRetentionPeriod": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"UseGuidedFailure": true
}
]
}Create a new runbook run
POST /api
Also reachable at /api, /api.
Path Parameters
spaceIdstring (required)
Request Body
DebugModestring
Contributes the OctopusPrintVariables and OctopusPrintEvaluatedVariables variables to the execution. One of “None”, “Log” or “Debug”; leave unset for the default of “None”.DeploymentFreezeNamesarray of string
Active deployment freezes to override so this execution can proceed despite them. Overriding a freeze bypasses a deliberate block on deploying, so only set this when explicitly asked to. Requires DeploymentFreezeOverrideReason.DeploymentFreezeOverrideReasonstring
Required, and must not be blank, whenever DeploymentFreezeNames is non-empty. Recorded against the override.EnvironmentNamesarray of string (required)ExcludedMachineNamesarray of string
A collection of machines in the target environment that should be excluded from the deployment.ExcludedTargetTagNamesarray of string
A collection of deployment target tags (canonical names in format TagSetName/TagName) that should be excluded from the deployment.ForcePackageDownloadboolean
Whether to force downloading of already installed packages (flag, default false).NoRunAfterstring
Time at which a scheduled execution should expire if it has not started, specified as any valid DateTimeOffset format, and assuming the time zone is the current local time zone. Only meaningful alongside RunAt. Formatdate-time.Prioritystring
Whether this execution jumps the task queue ahead of other queued tasks. One of “LifecycleDefault” (use the lifecycle’s configured setting), “On” or “Off”.ProjectNamestring (required)RunAtstring
Time at which the execution should start (scheduling it for later), specified as any valid DateTimeOffset format, and assuming the time zone is the current local time zone. Formatdate-time.RunbookNamestring (required)SkipStepNamesarray of string
Steps that are to be skipped for this execution. A name that matches no step is logged as a warning rather than failing the command, so check the step name carefully.Snapshotstring
Name or ID of the snapshot to run. If not supplied, the command will attempt to use the published snapshot.SpaceIdstring (required)SpaceIdOrNamestring (required)
Both this and SpaceId are required, and normally hold the same space ID; set both.SpecificMachineNamesarray of string
A collection of machines in the target environment that should be deployed to. If the collection is empty, all enabled machines are deployed. A name that matches no machine fails the command.SpecificTargetTagNamesarray of string
A collection of deployment target tags (canonical names in format TagSetName/TagName) that should be included in the deployment.TenantTagsarray of string
The tenant tags to filter tenants to deploy.Tenantsarray of string
The tenants to deploy.UseGuidedFailureboolean
If set to true, the deployment 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.Variablesobject
Name/value pairs for prompted variables. A prompted variable that is required and has no value supplied here fails the command, naming the variable.
Response
200 — Server tasks associated with the newly-created Runbook Run
RunbookRunServerTasksarray of objectRunbookRunIdstringServerTaskIdstring
Example Request
{
"DebugMode": "string",
"DeploymentFreezeNames": [
"string"
],
"DeploymentFreezeOverrideReason": "string",
"EnvironmentNames": [
"string"
],
"ExcludedMachineNames": [
"string"
],
"ExcludedTargetTagNames": [
"string"
],
"ForcePackageDownload": true,
"NoRunAfter": "2020-01-01T00:00:00.000Z",
"Priority": "string",
"ProjectName": "string",
"RunAt": "2020-01-01T00:00:00.000Z",
"RunbookName": "string",
"SkipStepNames": [
"string"
],
"Snapshot": "string",
"SpaceId": "string",
"SpaceIdOrName": "string",
"SpecificMachineNames": [
"string"
],
"SpecificTargetTagNames": [
"string"
],
"TenantTags": [
"string"
],
"Tenants": [
"string"
],
"UseGuidedFailure": true,
"Variables": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}Example Response
{
"RunbookRunServerTasks": [
{
"RunbookRunId": "string",
"ServerTaskId": "string"
}
]
}Get a list of Runbook Runs
GET /api
Also reachable at /api, /api.
Lists all of the runbookRuns in the supplied Octopus Deploy Space, from projects, snapshots and environments accessible by the current user. The results will be sorted from most recent to least recent runbookRun.
Path Parameters
spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
environmentsarray of string
Environment Ids to filter results to only Runbook Runs with the given Environment Ids.idsarray of string
Runbook Run Ids to filter results to only Runbook Runs with the given Ids.partialNamestring
A partial name, to limit the set of Runbook Runs to those with a name that includes the partial name.projectsarray of string
Project Ids to filter results to only Runbook Runs with the given Project Ids.runbooksarray of string
Runbook Ids to filter results to only Runbooks with the given Ids.skipinteger
Number of items to skip. Defaults to zero. Minimum0.takeinteger
Number of items to take. Defaults to 30. Minimum0.taskStateenum
Task State to filter results to only Deployments with the given Task State.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.tenantsarray of string
Tenant Ids to filter results to only Runbook Runs with the given Tenant Ids.
Response
200 — The requested list of Runbook Runs
Idstring
Gets or sets a unique identifier for this resource.ItemTypestringItemsarray of objectChangeRequestSettingsarray of objectCommentsstringCreatedstring
Formatdate-time.DebugModestringDeployedBystringDeployedByIdstringDeployedToMachineIdsarray of stringEnvironmentIdstringExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the deployment.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}”.ExecutionPlanLogContextobjectFailTargetDiscoverybooleanFailureEncounteredbooleanForcePackageDownloadbooleanFormValuesobjectFrozenRunbookProcessIdstringIdstring
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.ManifestVariableSetIdstringNamestringPrioritystringProjectIdstringQueueTimestring
If set this time will be the used to schedule the deployment to a later time, null is assumed to mean the time will be executed immediately. Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring
Minimum length 1.RunbookNamestringRunbookSnapshotIdstring
Minimum length 1.SkipActionsarray of stringSpaceIdstringSpecificMachineIdsarray of string
A collection of machines in the target environment that should be deployed to. If the collection is empty, all enabled machines are deployed.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}”.TaskIdstringTenantIdstringTentacleRetentionPeriodobjectUseGuidedFailureboolean
If set to true, the deployment 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.
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": [
{
"ChangeRequestSettings": [
{}
],
"Comments": "string",
"Created": "2020-01-01T00:00:00.000Z",
"DebugMode": "string",
"DeployedBy": "string",
"DeployedById": "string",
"DeployedToMachineIds": [
"string"
],
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"ExecutionPlanLogContext": {
"Steps": [
{}
]
},
"FailTargetDiscovery": true,
"FailureEncountered": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"FrozenRunbookProcessId": "string",
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ManifestVariableSetId": "string",
"Name": "string",
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookName": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TaskId": "string",
"TenantId": "string",
"TentacleRetentionPeriod": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"UseGuidedFailure": true
}
],
"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 Run
POST /api
Also reachable at /api, /api.
Path Parameters
spaceIdstring (required)
Request Body
ChangeRequestSettingsarray of objectTypeenum
Allowed values:ServiceNow,JiraServiceManagement.
CommentsstringDebugModestringEnvironmentIdstring (required)ExcludedMachineIdsarray of stringExcludedTargetTagIdsarray of stringFailTargetDiscoverybooleanForcePackageDownloadbooleanFormValuesobjectPrioritystringProjectIdstringQueueTimestring
Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring (required)RunbookSnapshotIdstring (required)SkipActionsarray of stringSpaceIdstring (required)SpecificMachineIdsarray of stringSpecificTargetTagIdsarray of stringTenantIdstringUseGuidedFailureboolean
Response
201 — Created
ChangeRequestSettingsarray of objectTypeenum
Allowed values:ServiceNow,JiraServiceManagement.
CommentsstringCreatedstring
Formatdate-time.DebugModestringDeployedBystringDeployedByIdstringDeployedToMachineIdsarray of stringEnvironmentIdstringExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the deployment.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}”.ExecutionPlanLogContextobjectStepsarray of object
FailTargetDiscoverybooleanFailureEncounteredbooleanForcePackageDownloadbooleanFormValuesobjectFrozenRunbookProcessIdstringIdstring
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.ManifestVariableSetIdstringNamestringPrioritystringProjectIdstringQueueTimestring
If set this time will be the used to schedule the deployment to a later time, null is assumed to mean the time will be executed immediately. Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring
Minimum length 1.RunbookNamestringRunbookSnapshotIdstring
Minimum length 1.SkipActionsarray of stringSpaceIdstringSpecificMachineIdsarray of string
A collection of machines in the target environment that should be deployed to. If the collection is empty, all enabled machines are deployed.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}”.TaskIdstringTenantIdstringTentacleRetentionPeriodobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
UseGuidedFailureboolean
If set to true, the deployment 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 Request
{
"ChangeRequestSettings": [
{
"Type": "ServiceNow"
}
],
"Comments": "string",
"DebugMode": "string",
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"FailTargetDiscovery": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TenantId": "string",
"UseGuidedFailure": true
}Example Response
{
"ChangeRequestSettings": [
{
"Type": "ServiceNow"
}
],
"Comments": "string",
"Created": "2020-01-01T00:00:00.000Z",
"DebugMode": "string",
"DeployedBy": "string",
"DeployedById": "string",
"DeployedToMachineIds": [
"string"
],
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"ExecutionPlanLogContext": {
"Steps": [
{
"CorrelationId": "string",
"Slug": "string"
}
]
},
"FailTargetDiscovery": true,
"FailureEncountered": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"FrozenRunbookProcessId": "string",
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ManifestVariableSetId": "string",
"Name": "string",
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookName": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TaskId": "string",
"TenantId": "string",
"TentacleRetentionPeriod": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"UseGuidedFailure": true
}Get a Runbook Run by ID
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook Run to load.spaceIdstring (required)
ID of the Space to which the Runbook Run belongs.
Query Parameters
projectIdstring
ID of the Project to which the Runbook Run belongs.
Response
200 — The requested Runbook Run
ChangeRequestSettingsarray of objectTypeenum
Allowed values:ServiceNow,JiraServiceManagement.
CommentsstringCreatedstring
Formatdate-time.DebugModestringDeployedBystringDeployedByIdstringDeployedToMachineIdsarray of stringEnvironmentIdstringExcludedMachineIdsarray of string
A collection of machines in the target environment that should be excluded from the deployment.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}”.ExecutionPlanLogContextobjectStepsarray of object
FailTargetDiscoverybooleanFailureEncounteredbooleanForcePackageDownloadbooleanFormValuesobjectFrozenRunbookProcessIdstringIdstring
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.ManifestVariableSetIdstringNamestringPrioritystringProjectIdstringQueueTimestring
If set this time will be the used to schedule the deployment to a later time, null is assumed to mean the time will be executed immediately. Formatdate-time.QueueTimeExpirystring
Formatdate-time.RunbookIdstring
Minimum length 1.RunbookNamestringRunbookSnapshotIdstring
Minimum length 1.SkipActionsarray of stringSpaceIdstringSpecificMachineIdsarray of string
A collection of machines in the target environment that should be deployed to. If the collection is empty, all enabled machines are deployed.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}”.TaskIdstringTenantIdstringTentacleRetentionPeriodobjectQuantityToKeepintegerShouldKeepForeverbooleanStrategystringUnitenum
Allowed values:Days,Items.
UseGuidedFailureboolean
If set to true, the deployment 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
{
"ChangeRequestSettings": [
{
"Type": "ServiceNow"
}
],
"Comments": "string",
"Created": "2020-01-01T00:00:00.000Z",
"DebugMode": "string",
"DeployedBy": "string",
"DeployedById": "string",
"DeployedToMachineIds": [
"string"
],
"EnvironmentId": "string",
"ExcludedMachineIds": [
"string"
],
"ExcludedTargetTagIds": [
"string"
],
"ExecutionPlanLogContext": {
"Steps": [
{
"CorrelationId": "string",
"Slug": "string"
}
]
},
"FailTargetDiscovery": true,
"FailureEncountered": true,
"ForcePackageDownload": true,
"FormValues": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"FrozenRunbookProcessId": "string",
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ManifestVariableSetId": "string",
"Name": "string",
"Priority": "string",
"ProjectId": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"RunbookId": "string",
"RunbookName": "string",
"RunbookSnapshotId": "string",
"SkipActions": [
"string"
],
"SpaceId": "string",
"SpecificMachineIds": [
"string"
],
"SpecificTargetTagIds": [
"string"
],
"TaskId": "string",
"TenantId": "string",
"TentacleRetentionPeriod": {
"QuantityToKeep": 0,
"ShouldKeepForever": true,
"Strategy": "string",
"Unit": "Days"
},
"UseGuidedFailure": true
}Delete an existing Runbook Run
DELETE /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Runbook Run to delete.spaceIdstring (required)
ID of the Space to which the Runbook Run belongs.
Response
200 — Success