> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a Team

> Get a team by ID or fully qualified name

# Retrieve a Team

Get a single team by its unique ID or fully qualified name.

## Get by ID

<ParamField path="id" type="string" required>
  UUID of the team to retrieve.
</ParamField>

<ParamField query="fields" type="string">
  Comma-separated list of fields to include (e.g., `users,parents,children,policies,domains,owners`).
</ParamField>

<ParamField query="include" type="string" default="non-deleted">
  Include `all`, `deleted`, or `non-deleted` entities.
</ParamField>

## Get by Fully Qualified Name

Use `GET /v1/teams/name/{fqn}` to retrieve by fully qualified name.

<ParamField path="fqn" type="string" required>
  Fully qualified name of the team (e.g., `Accounting`).
</ParamField>

<ParamField query="fields" type="string">
  Comma-separated list of fields to include: `users`, `parents`, `children`, `policies`, `domains`, `owners`.
</ParamField>

<ParamField query="include" type="string" default="non-deleted">
  Include `all`, `deleted`, or `non-deleted` entities.
</ParamField>

<RequestExample dropdown>
  ```python GET /v1/teams/{id} theme={null}
  from metadata.sdk import configure
  from metadata.sdk.entities import Teams

  configure(
      host="https://your-company.open-metadata.org/api",
      jwt_token="your-jwt-token"
  )

  # Get by ID
  team = Teams.retrieve("449b5f25-4cbb-42db-8f71-3be2c5cd888a")
  print(f"{team.fullyQualifiedName}: {team.teamType}")

  # Get by ID with fields
  team = Teams.retrieve(
      "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
      fields=["users", "parents", "policies"]
  )

  # Get by fully qualified name
  team = Teams.retrieve_by_name("Accounting")

  # Get by name with fields
  team = Teams.retrieve_by_name(
      "Accounting",
      fields=["users", "parents", "children"]
  )
  ```

  ```java GET /v1/teams/{id} theme={null}
  import static org.openmetadata.sdk.fluent.Teams.*;

  // Get by ID
  var team = Teams.retrieve("449b5f25-4cbb-42db-8f71-3be2c5cd888a");

  // Get by ID with fields
  var team = Teams.retrieve(
      "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
      "users,parents,policies"
  );

  // Get by fully qualified name
  var team = Teams.retrieveByName("Accounting");

  // Get by name with fields
  var team = Teams.retrieveByName(
      "Accounting",
      "users,parents,children"
  );
  ```

  ```bash GET /v1/teams/{id} theme={null}
  # Get by ID
  curl "{base_url}/api/v1/teams/449b5f25-4cbb-42db-8f71-3be2c5cd888a" \
    -H "Authorization: Bearer {access_token}"

  # Get by ID with fields
  curl "{base_url}/api/v1/teams/449b5f25-4cbb-42db-8f71-3be2c5cd888a?fields=users,parents,policies" \
    -H "Authorization: Bearer {access_token}"

  # Get by fully qualified name
  curl "{base_url}/api/v1/teams/name/Accounting" \
    -H "Authorization: Bearer {access_token}"

  # Get by name with fields
  curl "{base_url}/api/v1/teams/name/Accounting?fields=users,parents,children" \
    -H "Authorization: Bearer {access_token}"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
    "teamType": "Group",
    "name": "Accounting",
    "fullyQualifiedName": "Accounting",
    "version": 0.1,
    "updatedAt": 1769982623753,
    "updatedBy": "admin",
    "href": "http://localhost:8585/api/v1/teams/449b5f25-4cbb-42db-8f71-3be2c5cd888a",
    "parents": [
      {
        "id": "4f87a3ea-d798-4509-8c64-5b11f8a96f89",
        "type": "team",
        "name": "Finance",
        "fullyQualifiedName": "Finance",
        "displayName": "Finance",
        "deleted": false
      }
    ],
    "users": [
      {
        "id": "2c4036a5-27d5-4d47-949f-3e8666e9d371",
        "type": "user",
        "name": "andrew_jennings3",
        "fullyQualifiedName": "andrew_jennings3",
        "displayName": "Andrew Jennings",
        "deleted": false
      }
    ],
    "deleted": false,
    "owners": [],
    "domains": [],
    "children": [],
    "policies": []
  }
  ```
</ResponseExample>

***

## Returns

Returns a team object with all requested fields populated.

## Response

<ResponseField name="id" type="string">
  Unique identifier for the team (UUID format).
</ResponseField>

<ResponseField name="name" type="string">
  Team name.
</ResponseField>

<ResponseField name="fullyQualifiedName" type="string">
  Fully qualified name (same as name for teams).
</ResponseField>

<ResponseField name="displayName" type="string">
  Human-readable display name.
</ResponseField>

<ResponseField name="teamType" type="string">
  Type of team (`Group`, `Department`, `Division`, `BusinessUnit`, `Organization`).
</ResponseField>

<ResponseField name="description" type="string">
  Description of the team in Markdown format.
</ResponseField>

<ResponseField name="parents" type="array" optional>
  Parent team references. Only included when `fields` contains `parents`.

  <Expandable title="properties">
    <ResponseField name="id" type="string">
      UUID of the parent team.
    </ResponseField>

    <ResponseField name="type" type="string">
      Type of entity (always `team`).
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the parent team.
    </ResponseField>

    <ResponseField name="fullyQualifiedName" type="string">
      Fully qualified name of the parent team.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="users" type="array" optional>
  Users belonging to this team. Only included when `fields` contains `users`.
</ResponseField>

<ResponseField name="children" type="array" optional>
  Child team references. Only included when `fields` contains `children`.
</ResponseField>

<ResponseField name="policies" type="array" optional>
  Policy references. Only included when `fields` contains `policies`.
</ResponseField>

<ResponseField name="owners" type="array" optional>
  List of owners. Only included when `fields` contains `owners`.
</ResponseField>

<ResponseField name="domains" type="array" optional>
  Domain assignments. Only included when `fields` contains `domains`.
</ResponseField>

<ResponseField name="version" type="number">
  Version number for the entity.
</ResponseField>

***

## Error Handling

| Code  | Error Type     | Description                              |
| ----- | -------------- | ---------------------------------------- |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token  |
| `403` | `FORBIDDEN`    | User lacks permission to view this team  |
| `404` | `NOT_FOUND`    | Team with given ID or FQN does not exist |
