Environments

Create a new environment.

post/{spaceId}/environments

Request

  • Base URL
    https://demo.octopus.app/api
  • URL
    https://demo.octopus.app/api/{spaceId}/environments
  • Auth
    • API key in header X-Octopus-ApiKey
    • or API key in query parameter ApiKey
    • or API key in header X-NuGet-ApiKey

Path parameters

spaceIdstring required

Request body

AllowDynamicInfrastructureboolean
Descriptionstring
EnvironmentTagsstring[]

Tags to apply to the environment, each written as "TagSet/Tag" using either the names or the IDs of the tag set and tag (for example "Regions/us-east"). Find the tag sets first to discover which ones apply to environments and what tags they contain.

Namestring required
Slugstring
SortOrderinteger

Position of the environment in the space's environment order. When empty, the position is the number of existing environments, which is usually but not always last.

SpaceIdstring required
UseGuidedFailureboolean

Example request

{
  "ExtensionSettings": [],
  "SpaceId": "Spaces-1"
}

Response

Created

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.

EnvironmentTagsstring[]

List of tags assigned to this environment

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 date-time

Gets or sets the date/time that this resource was last modified.

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.

Slugstring
SortOrderinteger

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.

SpaceIdstring
UseGuidedFailureboolean

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

{
  "ExtensionSettings": [],
  "Links": {
    "Self": "/api/..."
  },
  "SpaceId": "Spaces-1"
}

Changes

No recorded changes to this operation across all 13 revisions of this API.