DeploymentTargets

List machines sorted by health status

List all of the registered machines in the supplied Octopus Deploy Space, from all environments. The results are sorted by health status, healthiest first, then alphabetically by name.

get/machines/v2

Request

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

Query parameters

commStylesstring[]

List of communication styles which if specified, filters the result to only include Deployment Targets with matching communication styles.

deploymentTargetTypesstring[]

List of deployment target types which if specified, filters the result to only include Deployment Targets with matching types.

environmentIdsstring[]

List of Environment IDs which if specified, filters the result to only include Deployment Targets with matching Environment IDs.

healthStatusesstring[]

List of health statuses which if specified, filters the result to only include Deployment Targets with matching health statuses.

idsstring[]

List of Deployment Target IDs which if specified, filters the result to only include Deployment Targets with matching IDs.

isDisabledboolean

A filter to return only disabled/enabled Deployment Targets

namestring

The exact name of a deployment target to be matched

operatingSystemNamesstring[]

List of operating system names which if specified, filters the result to only include Deployment Targets with matching operating systems.

partialNamestring

A partial or complete name to search on. This will perform a "contains" style match against the supplied name or name-fragment

rolesstring[]

List of roles which if specified, filters the result to only include Deployment Targets with matching roles.

shellNamesstring[]

List of shell names which if specified, filters the result to only include Deployment Targets with matching shells.

skipinteger

Number of items to skip. Defaults to zero

takeinteger

Number of items to take. Defaults to 30

targetTagsstring[]

List of Target Tags which if specified, filters the result to only include Deployment Targets with matching Target Tags.

tenantIdsstring[]

List of Tenant IDs which if specified, filters the result to only include Deployment Targets with matching Tenant IDs.

tenantTagsstring[]

List of Tenant Tags which if specified, filters the result to only include Deployment Targets with matching Tenant Tags.

Response

The list of alphabetically sorted deployment targets that matched the request.

TargetCountPerHealthStatusobject required

Example response

{
  "DeploymentTargets": {
    "Items": [
      {
        "Endpoint": {
          "Links": {
            "Self": "/api/..."
          }
        },
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ],
        "Links": {
          "Self": "/api/..."
        },
        "SpaceId": "Spaces-1",
        "TenantIds": [
          "Tenants-1",
          "..."
        ]
      }
    ],
    "ItemsPerPage": 30,
    "ItemType": "Machine",
    "LastPageNumber": 1,
    "NumberOfPages": 2,
    "TotalResults": 42
  }
}

Changes

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