Teams

Get a list of Teams

GET /api/{spaceId}/teams

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

Lists all of the Teams in the system or Octopus Deploy Space (if provided). The results will be sorted alphabetically by name.

Path Parameters

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

Query Parameters

  • ids array of string
    A list of Team IDs, to limit the matching of Teams to those with a particular ID. Example: [“Teams-1”, “Teams-2”].
  • name string
    The exact name of a Team to be matched.
  • partialName string
    A partial name, to limit the set of Teams to those with a name that includes the partial name.
  • 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 — Requested list of Teams

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • CanBeDeleted boolean
      Gets or sets a flag indicating whether the team can be deleted. The built-in teams provided by Octopus generally cannot be deleted.
    • CanBeRenamed boolean
      Gets or sets a flag indicating whether the team can be renamed. The built-in teams provided by Octopus generally cannot be renamed.
    • CanChangeMembers boolean
      Gets or sets a flag indicating whether the members of this team can be changed. The built-in Everyone team provided by Octopus cannot have its members changed, as it will always contain all users.
    • CanChangeRoles boolean
      Gets or sets a flag indicating whether the team’s roles can be changed. The built-in Octopus Administrators team provided by Octopus cannot have its roles modified; all other teams can.
    • Description string
    • ExternalSecurityGroups array of object
      The externally-managed security groups (e.g., Active Directory groups) who belong to the team.
    • 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.
    • MemberUserIds array of string
      The users who belong to the team.
    • Name string
      Gets or sets the name of this team.
    • Slug string
    • SpaceId string
  • 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": [
    {
      "CanBeDeleted": true,
      "CanBeRenamed": true,
      "CanChangeMembers": true,
      "CanChangeRoles": true,
      "Description": "string",
      "ExternalSecurityGroups": [
        {}
      ],
      "Id": "string",
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "MemberUserIds": [
        "string"
      ],
      "Name": "string",
      "Slug": "string",
      "SpaceId": "string"
    }
  ],
  "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 team

POST /api/{spaceId}/teams

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

Path Parameters

  • spaceId string (required)
    The space in which to create the team.

Request Body

  • Description string
    The description for the team.
  • ExternalSecurityGroups array of object (required)
    The externally-managed security groups (e.g., Active Directory groups) who will belong to the team.
    • DisplayIdAndName boolean
    • DisplayName string
    • Id string
  • MemberUserIds array of string (required)
    The users who will belong to the team.
  • Name string (required)
    The name of the team. Minimum length 1. Maximum length 200.
  • Slug string
    The slug of the team.
  • SpaceId string
    The space in which to create the team.

Response

201 — Created

  • CanBeDeleted boolean
    Gets or sets a flag indicating whether the team can be deleted. The built-in teams provided by Octopus generally cannot be deleted.
  • CanBeRenamed boolean
    Gets or sets a flag indicating whether the team can be renamed. The built-in teams provided by Octopus generally cannot be renamed.
  • CanChangeMembers boolean
    Gets or sets a flag indicating whether the members of this team can be changed. The built-in Everyone team provided by Octopus cannot have its members changed, as it will always contain all users.
  • CanChangeRoles boolean
    Gets or sets a flag indicating whether the team’s roles can be changed. The built-in Octopus Administrators team provided by Octopus cannot have its roles modified; all other teams can.
  • Description string
  • ExternalSecurityGroups array of object
    The externally-managed security groups (e.g., Active Directory groups) who belong to the team.
    • DisplayIdAndName boolean
    • DisplayName string
    • Id 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.
  • MemberUserIds array of string
    The users who belong to the team.
  • Name string
    Gets or sets the name of this team.
  • Slug string
  • SpaceId string

Example Request

JSON
{
  "Description": "string",
  "ExternalSecurityGroups": [
    {
      "DisplayIdAndName": true,
      "DisplayName": "string",
      "Id": "string"
    }
  ],
  "MemberUserIds": [
    "string"
  ],
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string"
}

Example Response

JSON
{
  "CanBeDeleted": true,
  "CanBeRenamed": true,
  "CanChangeMembers": true,
  "CanChangeRoles": true,
  "Description": "string",
  "ExternalSecurityGroups": [
    {
      "DisplayIdAndName": true,
      "DisplayName": "string",
      "Id": "string"
    }
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "MemberUserIds": [
    "string"
  ],
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string"
}

Get a list of Teams

GET /api/{spaceId}/teams/all

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

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

Path Parameters

  • spaceId string (required)

Response

200 — The requested list of Teams

  • CanBeDeleted boolean
    Gets or sets a flag indicating whether the team can be deleted. The built-in teams provided by Octopus generally cannot be deleted.
  • CanBeRenamed boolean
    Gets or sets a flag indicating whether the team can be renamed. The built-in teams provided by Octopus generally cannot be renamed.
  • CanChangeMembers boolean
    Gets or sets a flag indicating whether the members of this team can be changed. The built-in Everyone team provided by Octopus cannot have its members changed, as it will always contain all users.
  • CanChangeRoles boolean
    Gets or sets a flag indicating whether the team’s roles can be changed. The built-in Octopus Administrators team provided by Octopus cannot have its roles modified; all other teams can.
  • Description string
  • ExternalSecurityGroups array of object
    The externally-managed security groups (e.g., Active Directory groups) who belong to the team.
    • DisplayIdAndName boolean
    • DisplayName string
    • Id 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.
  • MemberUserIds array of string
    The users who belong to the team.
  • Name string
    Gets or sets the name of this team.
  • Slug string
  • SpaceId string

Example Response

JSON
[
  {
    "CanBeDeleted": true,
    "CanBeRenamed": true,
    "CanChangeMembers": true,
    "CanChangeRoles": true,
    "Description": "string",
    "ExternalSecurityGroups": [
      {
        "DisplayIdAndName": true,
        "DisplayName": "string",
        "Id": "string"
      }
    ],
    "Id": "string",
    "LastModifiedBy": "string",
    "LastModifiedOn": "2020-01-01T00:00:00.000Z",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "MemberUserIds": [
      "string"
    ],
    "Name": "string",
    "Slug": "string",
    "SpaceId": "string"
  }
]

Get a Team by ID

GET /api/{spaceId}/teams/{id}

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

Path Parameters

  • id string (required)
    The ID of the team.
  • spaceId string (required)
    The ID of the space containing the resources.

Response

200 — The requested Team

  • CanBeDeleted boolean
    Gets or sets a flag indicating whether the team can be deleted. The built-in teams provided by Octopus generally cannot be deleted.
  • CanBeRenamed boolean
    Gets or sets a flag indicating whether the team can be renamed. The built-in teams provided by Octopus generally cannot be renamed.
  • CanChangeMembers boolean
    Gets or sets a flag indicating whether the members of this team can be changed. The built-in Everyone team provided by Octopus cannot have its members changed, as it will always contain all users.
  • CanChangeRoles boolean
    Gets or sets a flag indicating whether the team’s roles can be changed. The built-in Octopus Administrators team provided by Octopus cannot have its roles modified; all other teams can.
  • Description string
  • ExternalSecurityGroups array of object
    The externally-managed security groups (e.g., Active Directory groups) who belong to the team.
    • DisplayIdAndName boolean
    • DisplayName string
    • Id 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.
  • MemberUserIds array of string
    The users who belong to the team.
  • Name string
    Gets or sets the name of this team.
  • Slug string
  • SpaceId string

Example Response

JSON
{
  "CanBeDeleted": true,
  "CanBeRenamed": true,
  "CanChangeMembers": true,
  "CanChangeRoles": true,
  "Description": "string",
  "ExternalSecurityGroups": [
    {
      "DisplayIdAndName": true,
      "DisplayName": "string",
      "Id": "string"
    }
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "MemberUserIds": [
    "string"
  ],
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string"
}

Modify an existing Team

PUT /api/{spaceId}/teams/{id}

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

The Everyone Team is treated as a special case and its members and external groups may not be changed.

Path Parameters

  • id string (required)
    Gets or sets a unique identifier for this resource.
  • spaceId string (required)

Request Body

  • Description string
  • ExternalSecurityGroups array of object
    The externally-managed security groups (e.g., Active Directory groups) who belong to the team.
    • DisplayIdAndName boolean
    • DisplayName string
    • Id string
  • Id string (required)
    Gets or sets a unique identifier for this resource.
  • MemberUserIds array of string
    The users who belong to the team.
  • Name string (required)
    Gets or sets the name of this team. Minimum length 1.
  • Slug string
  • SpaceId string

Response

200 — Indicates the team was modified, containing the updated Team

  • CanBeDeleted boolean
    Gets or sets a flag indicating whether the team can be deleted. The built-in teams provided by Octopus generally cannot be deleted.
  • CanBeRenamed boolean
    Gets or sets a flag indicating whether the team can be renamed. The built-in teams provided by Octopus generally cannot be renamed.
  • CanChangeMembers boolean
    Gets or sets a flag indicating whether the members of this team can be changed. The built-in Everyone team provided by Octopus cannot have its members changed, as it will always contain all users.
  • CanChangeRoles boolean
    Gets or sets a flag indicating whether the team’s roles can be changed. The built-in Octopus Administrators team provided by Octopus cannot have its roles modified; all other teams can.
  • Description string
  • ExternalSecurityGroups array of object
    The externally-managed security groups (e.g., Active Directory groups) who belong to the team.
    • DisplayIdAndName boolean
    • DisplayName string
    • Id 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.
  • MemberUserIds array of string
    The users who belong to the team.
  • Name string
    Gets or sets the name of this team.
  • Slug string
  • SpaceId string

Example Request

JSON
{
  "Description": "string",
  "ExternalSecurityGroups": [
    {
      "DisplayIdAndName": true,
      "DisplayName": "string",
      "Id": "string"
    }
  ],
  "Id": "string",
  "MemberUserIds": [
    "string"
  ],
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string"
}

Example Response

JSON
{
  "CanBeDeleted": true,
  "CanBeRenamed": true,
  "CanChangeMembers": true,
  "CanChangeRoles": true,
  "Description": "string",
  "ExternalSecurityGroups": [
    {
      "DisplayIdAndName": true,
      "DisplayName": "string",
      "Id": "string"
    }
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "MemberUserIds": [
    "string"
  ],
  "Name": "string",
  "Slug": "string",
  "SpaceId": "string"
}

Delete an existing Team

DELETE /api/{spaceId}/teams/{id}

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

Path Parameters

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

Response

200 — Success

Get a list of a Team’s Scoped User Roles

GET /api/{spaceId}/teams/{id}/scopeduserroles

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

List all the Scoped User Roles for the Team. Results will be sorted by Space Id with System Teams being sorted before Space Teams.

Path Parameters

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

Query Parameters

  • 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 requested list of Scoped User Roles

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • 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.
    • ProjectGroupIds array of string
    • ProjectIds array of string
    • SpaceId string
    • TeamId string
    • TenantIds array of string
    • UserRoleId string
  • 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": [
    {
      "EnvironmentIds": [
        "string"
      ],
      "Id": "string",
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectGroupIds": [
        "string"
      ],
      "ProjectIds": [
        "string"
      ],
      "SpaceId": "string",
      "TeamId": "string",
      "TenantIds": [
        "string"
      ],
      "UserRoleId": "string"
    }
  ],
  "ItemsPerPage": 0,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LastPageNumber": 0,
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "NumberOfPages": 0,
  "TotalResults": 0
}