Environments

List environments including Ephemeral

List Static, Parent and Ephemeral Environments in the supplied Octopus Deploy Space. The results will be sorted by the SortOrder field on each environment (which is set to a MaxValue integer for Ephemeral Environments).

get/spaces/{spaceIdentifier}/environments/v2

Request

  • Base URL
    https://demo.octopus.app/api
  • URL
    https://demo.octopus.app/api/spaces/{spaceIdentifier}/environments/v2
  • 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

spaceIdentifierstring required

Identifier (ID or slug) of the space

Query parameters

idsstring[]

Filter environments using ids

namestring

The exact name of an Environment to be matched

partialNamestring

Filters the documents using the specified partialName fragment

skipinteger required

Number of items to skip. Defaults to zero

takeinteger required

Number of items to skip. Defaults to zero

typestring[]

Filters the documents using the specified environment EnvironmentType

Response

Success

ItemsPerPageinteger
ItemTypestring

The type of item in this list

LastPageNumberinteger
NumberOfPagesinteger
TotalResultsinteger

Example response

{
  "Items": [
    {
      "Id": "Environments-1",
      "SpaceId": "Spaces-1"
    }
  ],
  "ItemsPerPage": 30,
  "ItemType": "BaseEnvironmentV2",
  "LastPageNumber": 1,
  "NumberOfPages": 2,
  "TotalResults": 42
}

Changes

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