Sign in Start for free

Accounts

Get a list of accounts

GET /api/{spaceId}/accounts

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

Lists accounts in the supplied Octopus Deploy Space in pages. The results will be sorted alphabetically by name.

Path Parameters

  • spaceId string (required)

Query Parameters

  • accountType array of string
    The type of accounts to return.
  • name string
    The exact name of an Account to be matched.
  • partialName string
    A partial account name used for a sub-string search.
  • skip integer
    Number of items to skip. Defaults to zero. Minimum 0.
  • take integer
    Number of items to take. Defaults to 30. Minimum 0.

Response

200 — The list of Accounts

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • AccountType enum
      Allowed values: AmazonWebServicesAccount, AmazonWebServicesOidcAccount, AzureOidc, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, GoogleCloudAccount, GoogleCloudOidcAccount, None, SshKeyPair, Token, UsernamePassword.
    • Description string
    • EnvironmentIds array of string
    • 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.
    • Name string
    • Slug string
    • SpaceId string
    • TenantIds array of string
    • TenantTags array of string
    • TenantedDeploymentParticipation enum
      Allowed values: Untenanted, TenantedOrUntenanted, Tenanted.
  • 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": [
    {
      "AccountType": "AmazonWebServicesAccount",
      "Description": "string",
      "EnvironmentIds": [
        "string"
      ],
      "Id": "string",
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Name": "string",
      "Slug": "string",
      "SpaceId": "string",
      "TenantIds": [
        "string"
      ],
      "TenantTags": [
        "string"
      ],
      "TenantedDeploymentParticipation": "Untenanted"
    }
  ],
  "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 account - of the type defined by body content

POST /api/{spaceId}/accounts

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

Path Parameters

  • spaceId string (required)

Request Body

  • Description string
  • Details object (required)
    • AccountType string
  • EnvironmentIds array of string
  • Name string (required)
    Minimum length 1.
  • Slug string
  • SpaceId string (required)
  • TenantIds array of string
  • TenantTags array of string
  • TenantedDeploymentParticipation string

Response

201 — Created

  • AccountType enum
    Allowed values: AmazonWebServicesAccount, AmazonWebServicesOidcAccount, AzureOidc, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, GoogleCloudAccount, GoogleCloudOidcAccount, None, SshKeyPair, Token, UsernamePassword.
  • Description string
  • EnvironmentIds array of string
  • 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.
  • Name string
  • Slug string
  • SpaceId string
  • TenantIds array of string
  • TenantTags array of string
  • TenantedDeploymentParticipation enum
    Allowed values: Untenanted, TenantedOrUntenanted, Tenanted.

Example Request

JSON
{
  "Description": "string",
  "Details": {
    "AccountType": "string"
  },
  "EnvironmentIds": [
    "string"
  ],
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string",
  "TenantIds": [
    "string"
  ],
  "TenantTags": [
    "string"
  ],
  "TenantedDeploymentParticipation": "string"
}

Example Response

JSON
{
  "AccountType": "AmazonWebServicesAccount",
  "Description": "string",
  "EnvironmentIds": [
    "string"
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string",
  "TenantIds": [
    "string"
  ],
  "TenantTags": [
    "string"
  ],
  "TenantedDeploymentParticipation": "Untenanted"
}

Get a list of Accounts

GET /api/{spaceId}/accounts/all

Also reachable at /api/accounts/all, /api/spaces/{spaceIdentifier}/accounts/all.

Lists all of the accounts in the supplied Octopus Deploy Space. The results will be sorted alphabetically by name.

Path Parameters

  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — The requested list of Accounts

  • AccountType enum
    Allowed values: AmazonWebServicesAccount, AmazonWebServicesOidcAccount, AzureOidc, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, GoogleCloudAccount, GoogleCloudOidcAccount, None, SshKeyPair, Token, UsernamePassword.
  • Description string
  • EnvironmentIds array of string
  • 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.
  • Name string
  • Slug string
  • SpaceId string
  • TenantIds array of string
  • TenantTags array of string
  • TenantedDeploymentParticipation enum
    Allowed values: Untenanted, TenantedOrUntenanted, Tenanted.

Example Response

JSON
[
  {
    "AccountType": "AmazonWebServicesAccount",
    "Description": "string",
    "EnvironmentIds": [
      "string"
    ],
    "Id": "string",
    "LastModifiedBy": "string",
    "LastModifiedOn": "2020-01-01T00:00:00.000Z",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "Name": "string",
    "Slug": "string",
    "SpaceId": "string",
    "TenantIds": [
      "string"
    ],
    "TenantTags": [
      "string"
    ],
    "TenantedDeploymentParticipation": "Untenanted"
  }
]

List the Azure Environments provided by the SDK

GET /api/accounts/azureenvironments

List the Azure Environments provided by the SDK

Response

200 — OK

Modify the account identified by the accoutId

PUT /api/{spaceId}/accounts/{accountId}

Also reachable at /api/accounts/{accountId}, /api/spaces/{spaceIdentifier}/accounts/{accountId}.

Path Parameters

  • accountId string (required)
  • spaceId string (required)

Request Body

  • AccountId string (required)
  • Description string
  • Details object (required)
    • AccountType string
  • EnvironmentIds array of string
  • Name string (required)
    Minimum length 1.
  • Slug string
  • SpaceId string (required)
  • TenantIds array of string
  • TenantTags array of string
  • TenantedDeploymentParticipation string

Response

200 — The resource returned from modifying an account

  • AccountType enum
    Allowed values: AmazonWebServicesAccount, AmazonWebServicesOidcAccount, AzureOidc, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, GoogleCloudAccount, GoogleCloudOidcAccount, None, SshKeyPair, Token, UsernamePassword.
  • Description string
  • EnvironmentIds array of string
  • 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.
  • Name string
  • Slug string
  • SpaceId string
  • TenantIds array of string
  • TenantTags array of string
  • TenantedDeploymentParticipation enum
    Allowed values: Untenanted, TenantedOrUntenanted, Tenanted.

Example Request

JSON
{
  "AccountId": "string",
  "Description": "string",
  "Details": {
    "AccountType": "string"
  },
  "EnvironmentIds": [
    "string"
  ],
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string",
  "TenantIds": [
    "string"
  ],
  "TenantTags": [
    "string"
  ],
  "TenantedDeploymentParticipation": "string"
}

Example Response

JSON
{
  "AccountType": "AmazonWebServicesAccount",
  "Description": "string",
  "EnvironmentIds": [
    "string"
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string",
  "TenantIds": [
    "string"
  ],
  "TenantTags": [
    "string"
  ],
  "TenantedDeploymentParticipation": "Untenanted"
}

Get an Account by ID

GET /api/{spaceId}/accounts/{id}

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

Path Parameters

  • id string (required)
    Id of the account.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — The requested Account

  • AccountType enum
    Allowed values: AmazonWebServicesAccount, AmazonWebServicesOidcAccount, AzureOidc, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, GoogleCloudAccount, GoogleCloudOidcAccount, None, SshKeyPair, Token, UsernamePassword.
  • Description string
  • EnvironmentIds array of string
  • 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.
  • Name string
  • Slug string
  • SpaceId string
  • TenantIds array of string
  • TenantTags array of string
  • TenantedDeploymentParticipation enum
    Allowed values: Untenanted, TenantedOrUntenanted, Tenanted.

Example Response

JSON
{
  "AccountType": "AmazonWebServicesAccount",
  "Description": "string",
  "EnvironmentIds": [
    "string"
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string",
  "TenantIds": [
    "string"
  ],
  "TenantTags": [
    "string"
  ],
  "TenantedDeploymentParticipation": "Untenanted"
}

Delete an existing Account

DELETE /api/{spaceId}/accounts/{id}

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

Path Parameters

  • id string (required)
    ID of the Account to delete.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — Success

Retrieve the public key portion of the account’s associated certificate, if present

GET /api/{spaceId}/accounts/{id}/pk

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

Path Parameters

  • id string (required)
    Id of the account.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — Success

Example Response

JSON
"string"

List the Resource Groups associated with an Azure account

GET /api/{spaceId}/accounts/{id}/resourceGroups

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

List the Resource Groups associated with an Azure account.

Path Parameters

  • id string (required)
  • spaceId string (required)

Response

200 — OK

List the storage accounts associated with an Azure account

GET /api/{spaceId}/accounts/{id}/storageAccounts

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

List the storage accounts associated with an Azure account.

Path Parameters

  • id string (required)
  • spaceId string (required)

Response

200 — OK

List projects and deployments which are using an account

GET /api/{spaceId}/accounts/{id}/usages

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

Path Parameters

  • id string (required)
    Id of the account.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — The projects and deployments which are using an account.

  • CommonTenantVariables array of object
    • LibraryVariableSets array of object
    • TenantId string
  • DeploymentProcesses array of object
    • ProjectId string
    • ProjectName string
    • ProjectSlug string
    • Steps array of 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.
  • LibraryVariableSets array of object
    • LibraryVariableSetId string
    • LibraryVariableSetName string
  • 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.
  • ProjectTenantVariables array of object
    • Projects array of object
    • TenantId string
  • ProjectVariableSets array of object
    • IsCurrentlyBeingUsedInProject boolean
    • ProjectId string
    • ProjectName string
    • ProjectSlug string
    • Releases array of object
    • RunbookSnapshots array of object
  • Releases array of object
    • ProjectId string
    • ProjectName string
    • Releases array of object
  • RunbookProcesses array of object
    • ProcessId string
    • ProjectId string
    • ProjectName string
    • ProjectSlug string
    • RunbookId string
    • RunbookName string
    • Steps array of object
  • RunbookSnapshots array of object
    • ProjectId string
    • ProjectName string
    • RunbookId string
    • RunbookName string
    • Snapshots array of object
  • Targets array of object
    • TargetId string
    • TargetName string

Example Response

JSON
{
  "CommonTenantVariables": [
    {
      "LibraryVariableSets": [
        {}
      ],
      "TenantId": "string"
    }
  ],
  "DeploymentProcesses": [
    {
      "ProjectId": "string",
      "ProjectName": "string",
      "ProjectSlug": "string",
      "Steps": [
        {}
      ]
    }
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LibraryVariableSets": [
    {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string"
    }
  ],
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ProjectTenantVariables": [
    {
      "Projects": [
        {}
      ],
      "TenantId": "string"
    }
  ],
  "ProjectVariableSets": [
    {
      "IsCurrentlyBeingUsedInProject": true,
      "ProjectId": "string",
      "ProjectName": "string",
      "ProjectSlug": "string",
      "Releases": [
        {}
      ],
      "RunbookSnapshots": [
        {}
      ]
    }
  ],
  "Releases": [
    {
      "ProjectId": "string",
      "ProjectName": "string",
      "Releases": [
        {}
      ]
    }
  ],
  "RunbookProcesses": [
    {
      "ProcessId": "string",
      "ProjectId": "string",
      "ProjectName": "string",
      "ProjectSlug": "string",
      "RunbookId": "string",
      "RunbookName": "string",
      "Steps": [
        {}
      ]
    }
  ],
  "RunbookSnapshots": [
    {
      "ProjectId": "string",
      "ProjectName": "string",
      "RunbookId": "string",
      "RunbookName": "string",
      "Snapshots": [
        {}
      ]
    }
  ],
  "Targets": [
    {
      "TargetId": "string",
      "TargetName": "string"
    }
  ]
}

Delete an existing Account

DELETE /api/{spaceId}/accounts/{id}/v1

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

Path Parameters

  • id string (required)
    ID of the Account to delete.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — Confirmation that the Account was deleted

Example Response

JSON
{}

List the websites associated with an Azure account

GET /api/{spaceId}/accounts/{id}/websites

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

List the websites associated with an Azure account.

Path Parameters

  • id string (required)
  • spaceId string (required)

Response

200 — OK

List the slots associated with an Azure Web Site

GET /api/{spaceId}/accounts/{id}/{resourceGroupName}/websites/{webSiteName}/slots

Also reachable at /api/accounts/{id}/{resourceGroupName}/websites/{webSiteName}/slots, /api/spaces/{spaceIdentifier}/accounts/{id}/{resourceGroupName}/websites/{webSiteName}/slots.

List the slots associated with an Azure Web Site.

Path Parameters

  • id string (required)
  • resourceGroupName string (required)
  • spaceId string (required)
  • webSiteName string (required)

Response

200 — OK

Get the account types this Octopus Server supports

GET /api/accounttypes

Lists the account types contributed by the extensions installed on this Server, sorted by name.

Response

200 — The account types this Octopus Server supports

  • AccountTypes array of string
    The supported account types, sorted by name. Each value is what an Account’s AccountType is set to, and what the AccountType filter when listing accounts accepts.

Example Response

JSON
{
  "AccountTypes": [
    "string"
  ]
}