Sign in Start for free

Deployments

Get a list of Deployments

GET /api/{spaceId}/deployments

Also reachable at /api/deployments, /api/spaces/{spaceIdentifier}/deployments.

Lists all of the Deployments in the supplied Space. The results will be sorted from most recent to least recent deployment.

Path Parameters

  • spaceId string (required)
    ID of the Space to which the Deployments belong.

Query Parameters

  • channels array of string
    Channel Ids to filter results to only Deployments with the given Channel Ids.
  • environments array of string
    Environment Ids to filter results to only Deployments with the given Environment Ids.
  • ids array of string
    Deployment Ids to filter results to only Deployments with the given Ids.
  • partialName string
    A partial name, to limit the set of Deployments to those with a name that includes the partial name.
  • projects array of string
    Project Ids to filter results to only Deployments with the given Project Ids.
  • skip integer
    Number of items to skip. Defaults to zero. Minimum 0.
  • take integer
    Number of items to take. Defaults to 30. Minimum 0.
  • taskState enum
    Task State to filter results to only Deployments with the given Task State.
    Allowed values: Queued, Executing, Failed, Canceled, TimedOut, Success, Cancelling.
  • tenants array of string
    Tenant Ids to filter results to only Deployments with the given Tenant Ids.

Response

200 — The requested Deployments

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • ChangeRequestSettings array of object
    • Changes array of object
    • ChangesMarkdown string
    • ChannelId string
    • Comments string
    • Created string
      Format date-time.
    • DebugMode string
    • DeployedBy string
    • DeployedById string
    • DeployedToMachineIds array of string
    • DeploymentProcessId string
    • EnvironmentId string
    • ExcludedMachineIds array of string
      A collection of machines in the target environment that should be excluded from the deployment.
    • ExcludedTargetTagIds array 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}”.
    • ExecutionPlanLogContext object
    • FailTargetDiscovery boolean
    • FailureEncountered boolean
    • ForcePackageDownload boolean
    • ForcePackageRedeployment boolean
    • FormValues object
    • Id string
      Gets or sets a unique identifier for this resource.
    • LastModifiedBy string
      Gets or sets the username of the user who last modified this resource.
    • LastModifiedOn string
      Gets or sets the date/time that this resource was last modified. Format date-time.
    • Links object
      Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
    • ManifestVariableSetId string
    • Name string
    • Priority string
    • ProjectId string
    • QueueTime string
      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. Format date-time.
    • QueueTimeExpiry string
      Format date-time.
    • ReleaseId string
    • SkipActions array of string
    • SpaceId string
    • SpecificMachineIds array 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.
    • SpecificTargetTagIds array 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}”.
    • TaskId string
    • TenantId string
    • TentacleRetentionPeriod object
    • UseGuidedFailure boolean
      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.
  • ItemsPerPage integer
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LastPageNumber integer
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • NumberOfPages integer
  • TotalResults integer

Example Response

JSON
{
  "Id": "string",
  "ItemType": "string",
  "Items": [
    {
      "ChangeRequestSettings": [
        {}
      ],
      "Changes": [
        {}
      ],
      "ChangesMarkdown": "string",
      "ChannelId": "Channels-1",
      "Comments": "string",
      "Created": "2020-01-01T00:00:00.000Z",
      "DebugMode": "string",
      "DeployedBy": "string",
      "DeployedById": "string",
      "DeployedToMachineIds": [
        "string"
      ],
      "DeploymentProcessId": "string",
      "EnvironmentId": "Environments-1",
      "ExcludedMachineIds": [
        "string"
      ],
      "ExcludedTargetTagIds": [
        "string"
      ],
      "ExecutionPlanLogContext": {
        "Steps": [
          {}
        ]
      },
      "FailTargetDiscovery": true,
      "FailureEncountered": true,
      "ForcePackageDownload": true,
      "ForcePackageRedeployment": true,
      "FormValues": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Id": "Deployments-1",
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ManifestVariableSetId": "string",
      "Name": "string",
      "Priority": "string",
      "ProjectId": "Projects-1",
      "QueueTime": "2020-01-01T00:00:00.000Z",
      "QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
      "ReleaseId": "Releases-1",
      "SkipActions": [
        "string"
      ],
      "SpaceId": "Spaces-1",
      "SpecificMachineIds": [
        "string"
      ],
      "SpecificTargetTagIds": [
        "string"
      ],
      "TaskId": "ServerTasks-1",
      "TenantId": "Tenants-1",
      "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 Deployment

POST /api/{spaceId}/deployments

Also reachable at /api/deployments, /api/spaces/{spaceIdentifier}/deployments.

Path Parameters

  • spaceId string (required)

Request Body

  • ChangeRequestSettings array of object
    • Type enum
      Allowed values: ServiceNow, JiraServiceManagement.
  • Changes array of object
    • BuildInformation array of object
    • Commits array of object
      Aggregate of distinct commits from all VersionMetadata.
    • ReleaseNotes string
    • Version string
    • WorkItems array of object
      Aggregate of distinct work items from all VersionMetadata.
  • ChangesMarkdown string
  • ChannelId string
  • Comments string
  • Created string
    Format date-time.
  • DebugMode string
  • DeployedBy string
  • DeployedById string
  • DeployedToMachineIds array of string
  • DeploymentProcessId string
  • EnvironmentId string (required)
  • ExcludedMachineIds array of string
    A collection of machines in the target environment that should be excluded from the deployment.
  • ExcludedTargetTagIds array 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}”.
  • ExecutionPlanLogContext object
    • Steps array of object (required)
  • FailTargetDiscovery boolean
  • FailureEncountered boolean
  • ForcePackageDownload boolean
  • ForcePackageRedeployment boolean
  • FormValues object
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • ManifestVariableSetId string
  • Name string
  • Priority string
  • ProjectId string
  • QueueTime string
    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. Format date-time.
  • QueueTimeExpiry string
    Format date-time.
  • ReleaseId string (required)
  • SkipActions array of string
  • SpaceId string
  • SpecificMachineIds array 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.
  • SpecificTargetTagIds array 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}”.
  • TaskId string
  • TenantId string
  • TentacleRetentionPeriod object
    • QuantityToKeep integer
    • ShouldKeepForever boolean
    • Strategy string
    • Unit enum
      Allowed values: Days, Items.
  • UseGuidedFailure boolean
    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.

Response

201 — Created

  • ChangeRequestSettings array of object
    • Type enum
      Allowed values: ServiceNow, JiraServiceManagement.
  • Changes array of object
    • BuildInformation array of object
    • Commits array of object
      Aggregate of distinct commits from all VersionMetadata.
    • ReleaseNotes string
    • Version string
    • WorkItems array of object
      Aggregate of distinct work items from all VersionMetadata.
  • ChangesMarkdown string
  • ChannelId string
  • Comments string
  • Created string
    Format date-time.
  • DebugMode string
  • DeployedBy string
  • DeployedById string
  • DeployedToMachineIds array of string
  • DeploymentProcessId string
  • EnvironmentId string
  • ExcludedMachineIds array of string
    A collection of machines in the target environment that should be excluded from the deployment.
  • ExcludedTargetTagIds array 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}”.
  • ExecutionPlanLogContext object
    • Steps array of object
  • FailTargetDiscovery boolean
  • FailureEncountered boolean
  • ForcePackageDownload boolean
  • ForcePackageRedeployment boolean
  • FormValues object
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • ManifestVariableSetId string
  • Name string
  • Priority string
  • ProjectId string
  • QueueTime string
    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. Format date-time.
  • QueueTimeExpiry string
    Format date-time.
  • ReleaseId string
  • SkipActions array of string
  • SpaceId string
  • SpecificMachineIds array 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.
  • SpecificTargetTagIds array 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}”.
  • TaskId string
  • TenantId string
  • TentacleRetentionPeriod object
    • QuantityToKeep integer
    • ShouldKeepForever boolean
    • Strategy string
    • Unit enum
      Allowed values: Days, Items.
  • UseGuidedFailure boolean
    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

JSON
{
  "ChangeRequestSettings": [
    {
      "Type": "ServiceNow"
    }
  ],
  "Changes": [
    {
      "BuildInformation": [
        {}
      ],
      "Commits": [
        {}
      ],
      "ReleaseNotes": "string",
      "Version": "string",
      "WorkItems": [
        {}
      ]
    }
  ],
  "ChangesMarkdown": "string",
  "ChannelId": "Channels-1",
  "Comments": "string",
  "Created": "2020-01-01T00:00:00.000Z",
  "DebugMode": "string",
  "DeployedBy": "string",
  "DeployedById": "string",
  "DeployedToMachineIds": [
    "string"
  ],
  "DeploymentProcessId": "string",
  "EnvironmentId": "Environments-1",
  "ExcludedMachineIds": [
    "string"
  ],
  "ExcludedTargetTagIds": [
    "string"
  ],
  "ExecutionPlanLogContext": {
    "Steps": [
      {
        "CorrelationId": "0c5a872485ac4b10857939a92d082e67",
        "Slug": "string"
      }
    ]
  },
  "FailTargetDiscovery": true,
  "FailureEncountered": true,
  "ForcePackageDownload": true,
  "ForcePackageRedeployment": true,
  "FormValues": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Id": "Deployments-1",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ManifestVariableSetId": "string",
  "Name": "string",
  "Priority": "string",
  "ProjectId": "Projects-1",
  "QueueTime": "2020-01-01T00:00:00.000Z",
  "QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
  "ReleaseId": "Releases-1",
  "SkipActions": [
    "string"
  ],
  "SpaceId": "Spaces-1",
  "SpecificMachineIds": [
    "string"
  ],
  "SpecificTargetTagIds": [
    "string"
  ],
  "TaskId": "ServerTasks-1",
  "TenantId": "Tenants-1",
  "TentacleRetentionPeriod": {
    "QuantityToKeep": 0,
    "ShouldKeepForever": true,
    "Strategy": "string",
    "Unit": "Days"
  },
  "UseGuidedFailure": true
}

Example Response

JSON
{
  "ChangeRequestSettings": [
    {
      "Type": "ServiceNow"
    }
  ],
  "Changes": [
    {
      "BuildInformation": [
        {}
      ],
      "Commits": [
        {}
      ],
      "ReleaseNotes": "string",
      "Version": "string",
      "WorkItems": [
        {}
      ]
    }
  ],
  "ChangesMarkdown": "string",
  "ChannelId": "Channels-1",
  "Comments": "string",
  "Created": "2020-01-01T00:00:00.000Z",
  "DebugMode": "string",
  "DeployedBy": "string",
  "DeployedById": "string",
  "DeployedToMachineIds": [
    "string"
  ],
  "DeploymentProcessId": "string",
  "EnvironmentId": "Environments-1",
  "ExcludedMachineIds": [
    "string"
  ],
  "ExcludedTargetTagIds": [
    "string"
  ],
  "ExecutionPlanLogContext": {
    "Steps": [
      {
        "CorrelationId": "0c5a872485ac4b10857939a92d082e67",
        "Slug": "string"
      }
    ]
  },
  "FailTargetDiscovery": true,
  "FailureEncountered": true,
  "ForcePackageDownload": true,
  "ForcePackageRedeployment": true,
  "FormValues": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Id": "Deployments-1",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ManifestVariableSetId": "string",
  "Name": "string",
  "Priority": "string",
  "ProjectId": "Projects-1",
  "QueueTime": "2020-01-01T00:00:00.000Z",
  "QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
  "ReleaseId": "Releases-1",
  "SkipActions": [
    "string"
  ],
  "SpaceId": "Spaces-1",
  "SpecificMachineIds": [
    "string"
  ],
  "SpecificTargetTagIds": [
    "string"
  ],
  "TaskId": "ServerTasks-1",
  "TenantId": "Tenants-1",
  "TentacleRetentionPeriod": {
    "QuantityToKeep": 0,
    "ShouldKeepForever": true,
    "Strategy": "string",
    "Unit": "Days"
  },
  "UseGuidedFailure": true
}

Create a new tenanted deployment

POST /api/{spaceId}/deployments/create/tenanted/v1

Also reachable at /api/spaces/{spaceIdentifier}/deployments/create/tenanted/v1.

Path Parameters

  • spaceId string (required)

Request Body

  • DebugMode string
    Contributes the OctopusPrintVariables and OctopusPrintEvaluatedVariables variables to the execution. One of “None”, “Log” or “Debug”; leave unset for the default of “None”.
  • DeploymentFreezeNames array 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.
  • DeploymentFreezeOverrideReason string
    Required, and must not be blank, whenever DeploymentFreezeNames is non-empty. Recorded against the override.
  • EnvironmentName string (required)
    A single environment. To deploy to several, call the command once per environment.
  • ExcludedMachineNames array of string
    A collection of machines in the target environment that should be excluded from the deployment.
  • ExcludedTargetTagNames array of string
    A collection of deployment target tags (canonical names in format TagSetName/TagName) that should be excluded from the deployment.
  • ForcePackageDownload boolean
    Whether to force downloading of already installed packages (flag, default false).
  • ForcePackageRedeployment boolean
    If a project is configured to skip packages with already-installed versions, override this setting to force re-deployment (flag, default false).
  • NoRunAfter string
    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. Format date-time.
  • Priority string
    Whether this execution jumps the task queue ahead of other queued tasks. One of “LifecycleDefault” (use the lifecycle’s configured setting), “On” or “Off”.
  • ProjectName string (required)
  • ReleaseVersion string (required)
    The version of an existing release, for example “1.2.3” — not a release ID. Minimum length 1.
  • RunAt string
    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. Format date-time.
  • SkipStepNames array 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.
  • SpaceId string (required)
  • SpaceIdOrName string (required)
    Both this and SpaceId are required, and normally hold the same space ID; set both.
  • SpecificMachineNames array 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.
  • SpecificTargetTagNames array of string
    A collection of deployment target tags (canonical names in format TagSetName/TagName) that should be included in the deployment.
  • TenantTags array of string
    Tenant tags, in canonical “TagSetName/TagName” form, selecting the tenants to deploy for. Set this or Tenants — with both empty nothing is deployed and no error is raised.
  • Tenants array of string
    The tenants to deploy for; one deployment is created per tenant. Set this or TenantTags — with both empty nothing is deployed and no error is raised. The single entry “*” means every tenant that can be deployed to this environment, which may be a very large number — only use it when explicitly asked to deploy to all tenants.
  • UpdateVariableSnapshot boolean
    If set to true, the release’s variable set snapshot is updated from the project’s current variables before the deployment. This mutates the release itself, so it affects later deployments of it too — leave it unset unless refreshed variables were asked for.
  • UseGuidedFailure boolean
    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.
  • Variables object
    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 Deployment

  • DeploymentServerTasks array of object
    • DeploymentId string
    • ServerTaskId string

Example Request

JSON
{
  "DebugMode": "string",
  "DeploymentFreezeNames": [
    "string"
  ],
  "DeploymentFreezeOverrideReason": "string",
  "EnvironmentName": "string",
  "ExcludedMachineNames": [
    "string"
  ],
  "ExcludedTargetTagNames": [
    "string"
  ],
  "ForcePackageDownload": true,
  "ForcePackageRedeployment": true,
  "NoRunAfter": "2020-01-01T00:00:00.000Z",
  "Priority": "string",
  "ProjectName": "string",
  "ReleaseVersion": "string",
  "RunAt": "2020-01-01T00:00:00.000Z",
  "SkipStepNames": [
    "string"
  ],
  "SpaceId": "Spaces-1",
  "SpaceIdOrName": "string",
  "SpecificMachineNames": [
    "string"
  ],
  "SpecificTargetTagNames": [
    "string"
  ],
  "TenantTags": [
    "string"
  ],
  "Tenants": [
    "string"
  ],
  "UpdateVariableSnapshot": true,
  "UseGuidedFailure": true,
  "Variables": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}

Example Response

JSON
{
  "DeploymentServerTasks": [
    {
      "DeploymentId": "Deployments-1",
      "ServerTaskId": "ServerTasks-1"
    }
  ]
}

Create a new untenanted deployment

POST /api/{spaceId}/deployments/create/untenanted/v1

Also reachable at /api/spaces/{spaceIdentifier}/deployments/create/untenanted/v1.

Path Parameters

  • spaceId string (required)

Request Body

  • DebugMode string
    Contributes the OctopusPrintVariables and OctopusPrintEvaluatedVariables variables to the execution. One of “None”, “Log” or “Debug”; leave unset for the default of “None”.
  • DeploymentFreezeNames array 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.
  • DeploymentFreezeOverrideReason string
    Required, and must not be blank, whenever DeploymentFreezeNames is non-empty. Recorded against the override.
  • EnvironmentNames array of string (required)
    One deployment is created per environment. Always name at least one: an empty list is not rejected, it simply deploys nothing and returns an empty list of deployments.
  • ExcludedMachineNames array of string
    A collection of machines in the target environment that should be excluded from the deployment.
  • ExcludedTargetTagNames array of string
    A collection of deployment target tags (canonical names in format TagSetName/TagName) that should be excluded from the deployment.
  • ForcePackageDownload boolean
    Whether to force downloading of already installed packages (flag, default false).
  • ForcePackageRedeployment boolean
    If a project is configured to skip packages with already-installed versions, override this setting to force re-deployment (flag, default false).
  • NoRunAfter string
    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. Format date-time.
  • Priority string
    Whether this execution jumps the task queue ahead of other queued tasks. One of “LifecycleDefault” (use the lifecycle’s configured setting), “On” or “Off”.
  • ProjectName string (required)
  • ReleaseVersion string (required)
    The version of an existing release, for example “1.2.3” — not a release ID. Minimum length 1.
  • RunAt string
    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. Format date-time.
  • SkipStepNames array 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.
  • SpaceId string (required)
  • SpaceIdOrName string (required)
    Both this and SpaceId are required, and normally hold the same space ID; set both.
  • SpecificMachineNames array 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.
  • SpecificTargetTagNames array of string
    A collection of deployment target tags (canonical names in format TagSetName/TagName) that should be included in the deployment.
  • UpdateVariableSnapshot boolean
    If set to true, the release’s variable set snapshot is updated from the project’s current variables before the deployment. This mutates the release itself, so it affects later deployments of it too — leave it unset unless refreshed variables were asked for.
  • UseGuidedFailure boolean
    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.
  • Variables object
    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 Deployment

  • DeploymentServerTasks array of object
    • DeploymentId string
    • ServerTaskId string

Example Request

JSON
{
  "DebugMode": "string",
  "DeploymentFreezeNames": [
    "string"
  ],
  "DeploymentFreezeOverrideReason": "string",
  "EnvironmentNames": [
    "string"
  ],
  "ExcludedMachineNames": [
    "string"
  ],
  "ExcludedTargetTagNames": [
    "string"
  ],
  "ForcePackageDownload": true,
  "ForcePackageRedeployment": true,
  "NoRunAfter": "2020-01-01T00:00:00.000Z",
  "Priority": "string",
  "ProjectName": "string",
  "ReleaseVersion": "string",
  "RunAt": "2020-01-01T00:00:00.000Z",
  "SkipStepNames": [
    "string"
  ],
  "SpaceId": "Spaces-1",
  "SpaceIdOrName": "string",
  "SpecificMachineNames": [
    "string"
  ],
  "SpecificTargetTagNames": [
    "string"
  ],
  "UpdateVariableSnapshot": true,
  "UseGuidedFailure": true,
  "Variables": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}

Example Response

JSON
{
  "DeploymentServerTasks": [
    {
      "DeploymentId": "Deployments-1",
      "ServerTaskId": "ServerTasks-1"
    }
  ]
}

Create a Deployment

POST /api/{spaceId}/deployments/v1

Also reachable at /api/deployments/v1, /api/spaces/{spaceIdentifier}/deployments/v1.

Path Parameters

  • spaceId string (required)

Request Body

  • ChangeRequestSettings array of object
    • Type enum
      Allowed values: ServiceNow, JiraServiceManagement.
  • Changes array of object
    • BuildInformation array of object
    • Commits array of object
      Aggregate of distinct commits from all VersionMetadata.
    • ReleaseNotes string
    • Version string
    • WorkItems array of object
      Aggregate of distinct work items from all VersionMetadata.
  • ChangesMarkdown string
  • ChannelId string
  • Comments string
  • Created string
    Format date-time.
  • DebugMode string
  • DeployedBy string
  • DeployedById string
  • DeployedToMachineIds array of string
  • DeploymentProcessId string
  • EnvironmentId string (required)
  • ExcludedMachineIds array of string
    A collection of machines in the target environment that should be excluded from the deployment.
  • ExcludedTargetTagIds array 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}”.
  • ExecutionPlanLogContext object
    • Steps array of object (required)
  • FailTargetDiscovery boolean
  • FailureEncountered boolean
  • ForcePackageDownload boolean
  • ForcePackageRedeployment boolean
  • FormValues object
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • ManifestVariableSetId string
  • Name string
  • Priority string
  • ProjectId string
  • QueueTime string
    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. Format date-time.
  • QueueTimeExpiry string
    Format date-time.
  • ReleaseId string (required)
  • SkipActions array of string
  • SpaceId string
  • SpecificMachineIds array 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.
  • SpecificTargetTagIds array 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}”.
  • TaskId string
  • TenantId string
  • TentacleRetentionPeriod object
    • QuantityToKeep integer
    • ShouldKeepForever boolean
    • Strategy string
    • Unit enum
      Allowed values: Days, Items.
  • UseGuidedFailure boolean
    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.

Response

201 — Created

  • Deployment object
    • ChangeRequestSettings array of object
    • Changes array of object
    • ChangesMarkdown string
    • ChannelId string
    • Comments string
    • Created string
      Format date-time.
    • DebugMode string
    • DeployedBy string
    • DeployedById string
    • DeployedToMachineIds array of string
    • DeploymentProcessId string
    • EnvironmentId string
    • ExcludedMachineIds array of string
      A collection of machines in the target environment that should be excluded from the deployment.
    • ExcludedTargetTagIds array 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}”.
    • ExecutionPlanLogContext object
    • FailTargetDiscovery boolean
    • FailureEncountered boolean
    • ForcePackageDownload boolean
    • ForcePackageRedeployment boolean
    • FormValues object
    • Id string
      Gets or sets a unique identifier for this resource.
    • LastModifiedBy string
      Gets or sets the username of the user who last modified this resource.
    • LastModifiedOn string
      Gets or sets the date/time that this resource was last modified. Format date-time.
    • Links object
      Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
    • ManifestVariableSetId string
    • Name string
    • Priority string
    • ProjectId string
    • QueueTime string
      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. Format date-time.
    • QueueTimeExpiry string
      Format date-time.
    • ReleaseId string
    • SkipActions array of string
    • SpaceId string
    • SpecificMachineIds array 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.
    • SpecificTargetTagIds array 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}”.
    • TaskId string
    • TenantId string
    • TentacleRetentionPeriod object
    • UseGuidedFailure boolean
      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

JSON
{
  "ChangeRequestSettings": [
    {
      "Type": "ServiceNow"
    }
  ],
  "Changes": [
    {
      "BuildInformation": [
        {}
      ],
      "Commits": [
        {}
      ],
      "ReleaseNotes": "string",
      "Version": "string",
      "WorkItems": [
        {}
      ]
    }
  ],
  "ChangesMarkdown": "string",
  "ChannelId": "Channels-1",
  "Comments": "string",
  "Created": "2020-01-01T00:00:00.000Z",
  "DebugMode": "string",
  "DeployedBy": "string",
  "DeployedById": "string",
  "DeployedToMachineIds": [
    "string"
  ],
  "DeploymentProcessId": "string",
  "EnvironmentId": "Environments-1",
  "ExcludedMachineIds": [
    "string"
  ],
  "ExcludedTargetTagIds": [
    "string"
  ],
  "ExecutionPlanLogContext": {
    "Steps": [
      {
        "CorrelationId": "0c5a872485ac4b10857939a92d082e67",
        "Slug": "string"
      }
    ]
  },
  "FailTargetDiscovery": true,
  "FailureEncountered": true,
  "ForcePackageDownload": true,
  "ForcePackageRedeployment": true,
  "FormValues": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Id": "Deployments-1",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ManifestVariableSetId": "string",
  "Name": "string",
  "Priority": "string",
  "ProjectId": "Projects-1",
  "QueueTime": "2020-01-01T00:00:00.000Z",
  "QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
  "ReleaseId": "Releases-1",
  "SkipActions": [
    "string"
  ],
  "SpaceId": "Spaces-1",
  "SpecificMachineIds": [
    "string"
  ],
  "SpecificTargetTagIds": [
    "string"
  ],
  "TaskId": "ServerTasks-1",
  "TenantId": "Tenants-1",
  "TentacleRetentionPeriod": {
    "QuantityToKeep": 0,
    "ShouldKeepForever": true,
    "Strategy": "string",
    "Unit": "Days"
  },
  "UseGuidedFailure": true
}

Example Response

JSON
{
  "Deployment": {
    "ChangeRequestSettings": [
      {
        "Type": "ServiceNow"
      }
    ],
    "Changes": [
      {
        "BuildInformation": [
          {}
        ],
        "Commits": [
          {}
        ],
        "ReleaseNotes": "string",
        "Version": "string",
        "WorkItems": [
          {}
        ]
      }
    ],
    "ChangesMarkdown": "string",
    "ChannelId": "Channels-1",
    "Comments": "string",
    "Created": "2020-01-01T00:00:00.000Z",
    "DebugMode": "string",
    "DeployedBy": "string",
    "DeployedById": "string",
    "DeployedToMachineIds": [
      "string"
    ],
    "DeploymentProcessId": "string",
    "EnvironmentId": "Environments-1",
    "ExcludedMachineIds": [
      "string"
    ],
    "ExcludedTargetTagIds": [
      "string"
    ],
    "ExecutionPlanLogContext": {
      "Steps": [
        {}
      ]
    },
    "FailTargetDiscovery": true,
    "FailureEncountered": true,
    "ForcePackageDownload": true,
    "ForcePackageRedeployment": true,
    "FormValues": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "Id": "Deployments-1",
    "LastModifiedBy": "string",
    "LastModifiedOn": "2020-01-01T00:00:00.000Z",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "ManifestVariableSetId": "string",
    "Name": "string",
    "Priority": "string",
    "ProjectId": "Projects-1",
    "QueueTime": "2020-01-01T00:00:00.000Z",
    "QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
    "ReleaseId": "Releases-1",
    "SkipActions": [
      "string"
    ],
    "SpaceId": "Spaces-1",
    "SpecificMachineIds": [
      "string"
    ],
    "SpecificTargetTagIds": [
      "string"
    ],
    "TaskId": "ServerTasks-1",
    "TenantId": "Tenants-1",
    "TentacleRetentionPeriod": {
      "QuantityToKeep": 0,
      "ShouldKeepForever": true,
      "Strategy": "string",
      "Unit": "Days"
    },
    "UseGuidedFailure": true
  }
}

Get a Deployment by ID

GET /api/{spaceId}/deployments/{id}

Also reachable at /api/deployments/{id}, /api/spaces/{spaceIdentifier}/deployments/{id}.

Path Parameters

  • id string (required)
    ID of the Deployment to load.
  • spaceId string (required)

Response

200 — The requested Deployment.

  • ChangeRequestSettings array of object
    • Type enum
      Allowed values: ServiceNow, JiraServiceManagement.
  • Changes array of object
    • BuildInformation array of object
    • Commits array of object
      Aggregate of distinct commits from all VersionMetadata.
    • ReleaseNotes string
    • Version string
    • WorkItems array of object
      Aggregate of distinct work items from all VersionMetadata.
  • ChangesMarkdown string
  • ChannelId string
  • Comments string
  • Created string
    Format date-time.
  • DebugMode string
  • DeployedBy string
  • DeployedById string
  • DeployedToMachineIds array of string
  • DeploymentProcessId string
  • EnvironmentId string
  • ExcludedMachineIds array of string
    A collection of machines in the target environment that should be excluded from the deployment.
  • ExcludedTargetTagIds array 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}”.
  • ExecutionPlanLogContext object
    • Steps array of object
  • FailTargetDiscovery boolean
  • FailureEncountered boolean
  • ForcePackageDownload boolean
  • ForcePackageRedeployment boolean
  • FormValues object
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • ManifestVariableSetId string
  • Name string
  • Priority string
  • ProjectId string
  • QueueTime string
    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. Format date-time.
  • QueueTimeExpiry string
    Format date-time.
  • ReleaseId string
  • SkipActions array of string
  • SpaceId string
  • SpecificMachineIds array 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.
  • SpecificTargetTagIds array 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}”.
  • TaskId string
  • TenantId string
  • TentacleRetentionPeriod object
    • QuantityToKeep integer
    • ShouldKeepForever boolean
    • Strategy string
    • Unit enum
      Allowed values: Days, Items.
  • UseGuidedFailure boolean
    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

JSON
{
  "ChangeRequestSettings": [
    {
      "Type": "ServiceNow"
    }
  ],
  "Changes": [
    {
      "BuildInformation": [
        {}
      ],
      "Commits": [
        {}
      ],
      "ReleaseNotes": "string",
      "Version": "string",
      "WorkItems": [
        {}
      ]
    }
  ],
  "ChangesMarkdown": "string",
  "ChannelId": "Channels-1",
  "Comments": "string",
  "Created": "2020-01-01T00:00:00.000Z",
  "DebugMode": "string",
  "DeployedBy": "string",
  "DeployedById": "string",
  "DeployedToMachineIds": [
    "string"
  ],
  "DeploymentProcessId": "string",
  "EnvironmentId": "Environments-1",
  "ExcludedMachineIds": [
    "string"
  ],
  "ExcludedTargetTagIds": [
    "string"
  ],
  "ExecutionPlanLogContext": {
    "Steps": [
      {
        "CorrelationId": "0c5a872485ac4b10857939a92d082e67",
        "Slug": "string"
      }
    ]
  },
  "FailTargetDiscovery": true,
  "FailureEncountered": true,
  "ForcePackageDownload": true,
  "ForcePackageRedeployment": true,
  "FormValues": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Id": "Deployments-1",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ManifestVariableSetId": "string",
  "Name": "string",
  "Priority": "string",
  "ProjectId": "Projects-1",
  "QueueTime": "2020-01-01T00:00:00.000Z",
  "QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
  "ReleaseId": "Releases-1",
  "SkipActions": [
    "string"
  ],
  "SpaceId": "Spaces-1",
  "SpecificMachineIds": [
    "string"
  ],
  "SpecificTargetTagIds": [
    "string"
  ],
  "TaskId": "ServerTasks-1",
  "TenantId": "Tenants-1",
  "TentacleRetentionPeriod": {
    "QuantityToKeep": 0,
    "ShouldKeepForever": true,
    "Strategy": "string",
    "Unit": "Days"
  },
  "UseGuidedFailure": true
}

Delete an existing Deployment

DELETE /api/{spaceId}/deployments/{id}

Also reachable at /api/deployments/{id}, /api/spaces/{spaceIdentifier}/deployments/{id}.

Path Parameters

  • id string (required)
    ID of the Deployment to delete.
  • spaceId string (required)

Response

200 — Success