teams
Creates, updates, deletes, gets or lists a teams resource.
Overview
| Name | teams |
| Type | Resource |
| Id | digitalocean.account.teams |
Fields
The following fields are returned by SELECT queries:
- organizations_list_teams
The response will be a JSON object with a teams key. This will be set to an array of team objects belonging to the organization.
| Name | Datatype | Description |
|---|---|---|
id | integer (uint64) | A unique identifier for the team. |
name | string | The human-readable name for the team. (example: production) |
company | string | The company name associated with the team, if set. (example: DigitalOcean) |
email | string (email) | The email address associated with the team. (example: sammy@example.com) |
joined_organization_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the team joined the organization. (example: 2024-06-12T15:04:05Z) |
member_count | integer (uint64) | The number of members on the team. |
status | string | The team's membership status within the organization. (joined, pending) (example: joined) |
uuid | string (uuid) | A unique universal identifier for the team. (example: 4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
organizations_list_teams | select | To list all teams in an organization, send a GET request to/v2/organizations/teams.This endpoint must be called in an organization context. | ||
organizations_create_team | insert | name | To create a new team within an organization, send a POST request to/v2/organizations/team.This endpoint must be called in an organization context. Optionally include invitations to invite users to the new team. The owner role cannot beassigned via invitation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|
SELECT examples
- organizations_list_teams
To list all teams in an organization, send a GET request to/v2/organizations/teams.
This endpoint must be called in an organization context.
SELECT
id,
name,
company,
email,
joined_organization_at,
member_count,
status,
uuid
FROM digitalocean.account.teams
;
INSERT examples
- organizations_create_team
- Manifest
To create a new team within an organization, send a POST request to/v2/organizations/team.
This endpoint must be called in an organization context. Optionally includeinvitations to invite users to the new team. The owner role cannot be
assigned via invitation.
INSERT INTO digitalocean.account.teams (
name,
invitations
)
SELECT
'{{ name }}' /* required */,
'{{ invitations }}'
RETURNING
invitations,
team
;
# Description fields are for documentation purposes
- name: teams
props:
- name: name
value: "{{ name }}"
description: |
The human-readable name for the team to create.
- name: invitations
description: |
Optional invitations to send when creating the team. Each invitation includes an email address and a role. The `owner` role cannot be assigned via invitation.
value:
- email: "{{ email }}"
role: "{{ role }}"