# Get Team Hierarchy

Returns the full hierarchy of Teams (sub-teams nested to N levels) for selecting a parent Team within the requested scope.

Endpoint: GET /v1/teams/hierarchy
Version: 1.0
Security: x-api-key

## Header parameters:

  - `Harness-Account` (string)
    Identifier field of the account the resource is scoped to.

## Query parameters:

  - `scopes` (string)
    Filter entities on the scopes

  - `include_child_scopes` (boolean)
    Include Sub-Teams that are in the child scopes

  - `custom` (boolean)
    Filter only Custom User Groups

  - `page` (integer)
    Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page

  - `limit` (integer)
    Maximum number of items to return per page (1-100, default: 10)

  - `sort` (string)
    Parameter on the basis of which sorting is done.

  - `search_term` (string)
    This would be used to filter resources having attributes matching the search term.

## Response 200 fields (application/json):

  - `identifier` (string)

  - `entity_ref` (string)

  - `orgIdentifier` (string)

  - `org_name` (string)

  - `projectIdentifier` (string)

  - `project_name` (string)

  - `scope` (string)
    Enum: "ACCOUNT", "ORGANIZATION", "PROJECT"

  - `referenceType` (string)
    Enum: "INLINE", "GIT"

  - `created` (integer)

  - `updated` (integer)

  - `kind_identifier` (string)

  - `kind_icon` (string)

  - `type` (string)

  - `name` (string)

  - `description` (string)

  - `owner` (string)

  - `tags` (array)

  - `metadata` (object)

  - `spec` (object)

  - `relations` (object)

  - `decorator` (string)

  - `git_details` (object)
    Git Experience related details of the Entity.

  - `git_details.branch_name` (string)
    Name of the branch.

  - `git_details.file_path` (string)
    File path of the Entity in the repository.

  - `git_details.file_url` (string)
    File URL of the Entity.

  - `git_details.commit_message` (string)
    Commit message used for the merge commit.

  - `git_details.object_id` (string)
    Object identifier (for Github only).

  - `git_details.base_branch` (string)
    Name of the default branch (this checks out a new branch titled by branch_name).

  - `git_details.commit_id` (string)
    Commit identifier.

  - `git_details.connector_ref` (string)
    Identifier of the Harness Connector used for CRUD operations on the Entity.

  - `git_details.store_type` (string)
    Specifies whether the Entity is to be stored in Git or not.
    Enum: "INLINE", "REMOTE"

  - `git_details.repo_name` (string)
    Name of the repository.

  - `git_details.repo_url` (string)
    Repository URL of the Entity.

  - `git_details.is_harness_code_repo` (boolean)
    Is Git Experience repo harness code.

  - `children` (array)
    Direct sub-teams nested under this Team, recursively to N levels.


