# Get Entities Groups

Retrieves entities organized in hierarchical groups based on account, organization,  and project. This endpoint is useful for displaying entities in a structured UI view where entities need to be presented in their organizational context. The response contains both grouped and ungrouped entities at each level.

Endpoint: GET /v1/entities/groups
Version: 1.0
Security: x-api-key

## Header parameters:

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

## Query parameters:

  - `search_on_entities` (string)
    Filter entities by a search term across entity attributes

  - `search_on_groups` (string)
    Filter groups by a search term across group attributes

  - `scopes` (string)
    Filter entities by specific scopes (account.\, account, account.org, account.org.project, account.orgId, account.orgId.projectId, account.orgId.\)

  - `kind` (string)
    Filter entities by their kind (e.g., component, api, resource, user, workflow)

  - `owned_by_me` (boolean)
    When true, returns only entities owned by the current user and their groups

  - `favorites` (boolean)
    When true, returns only entities marked as favorites by the current user

  - `type` (string)
    Filter entities by their type

  - `owner` (string)
    Filter entities by their owner references

  - `lifecycle` (string)
    Filter entities by their lifecycle stage

  - `tags` (string)
    Filter entities by their associated tags

## Response 200 fields (application/json):

  - `data` (object)
    Grouped entity data

  - `data.account` (object)
    Account-level entities

  - `data.account.with_group` (array)
    Account-level entities organized into groups

  - `data.account.with_group.org_identifier` (string)
    Unique identifier of the organization

  - `data.account.with_group.org_name` (string)
    Display name of the organization

  - `data.account.with_group.project_identifier` (string)
    Unique identifier of the project

  - `data.account.with_group.project_name` (string)
    Display name of the project

  - `data.account.with_group.group_identifier` (string)
    Unique identifier of the group

  - `data.account.with_group.group_name` (string)
    Display name of the group

  - `data.account.with_group.group_description` (string)
    Description of the group

  - `data.account.with_group.group_icon` (string)
    Icon URL representing the group

  - `data.account.with_group.order` (integer)
    Display order for the group

  - `data.account.with_group.workflows` (array)
    Workflows associated with the group

  - `data.account.with_group.total` (integer)
    Total number of entities in the group

  - `data.account.with_group.entities` (array)
    Entities belonging to the group

  - `data.account.with_group.entities.identifier` (string, required)
    Unique identifier of the entity within its scope and kind

  - `data.account.with_group.entities.entity_ref` (string, required)
    Full entity reference in the format scope/kind/identifier

  - `data.account.with_group.entities.orgIdentifier` (string)
    Identifier of the organization that the entity belongs to

  - `data.account.with_group.entities.org_name` (string)
    Display name of the organization that the entity belongs to

  - `data.account.with_group.entities.projectIdentifier` (string)
    Identifier of the project that the entity belongs to

  - `data.account.with_group.entities.project_name` (string)
    Display name of the project that the entity belongs to

  - `data.account.with_group.entities.scope` (string, required)
    Scope of the entity (account, organization, or project level)
    Enum: "ACCOUNT", "ORGANIZATION", "PROJECT"

  - `data.account.with_group.entities.referenceType` (string, required)
    Type of reference for the entity (inline definition or Git-sourced)
    Enum: "INLINE", "GIT"

  - `data.account.with_group.entities.kind` (string, required)
    Kind of the entity (defines its core purpose)
    Enum: "api", "component", "group", "resource", "user", "workflow"

  - `data.account.with_group.entities.kind_identifier` (string)

  - `data.account.with_group.entities.kind_icon` (string)

  - `data.account.with_group.entities.type` (string)
    Type of the entity within its kind (e.g., Service, Website)

  - `data.account.with_group.entities.name` (string)
    Display name of the entity

  - `data.account.with_group.entities.description` (string)
    Descriptive text about the entity

  - `data.account.with_group.entities.owner` (string)
    Owner reference for the entity (user or group)

  - `data.account.with_group.entities.tags` (array)
    Tags associated with the entity for categorization

  - `data.account.with_group.entities.lifecycle` (string)
    Lifecycle stage of the entity (e.g., experimental, production)

  - `data.account.with_group.entities.metadata` (object)
    Additional metadata associated with the entity

  - `data.account.with_group.entities.git_details` (object)
    Git Experience related details of the Entity.

  - `data.account.with_group.entities.git_details.branch_name` (string)
    Name of the branch.

  - `data.account.with_group.entities.git_details.file_path` (string)
    File path of the Entity in the repository.

  - `data.account.with_group.entities.git_details.file_url` (string)
    File URL of the Entity.

  - `data.account.with_group.entities.git_details.commit_message` (string)
    Commit message used for the merge commit.

  - `data.account.with_group.entities.git_details.object_id` (string)
    Object identifier (for Github only).

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

  - `data.account.with_group.entities.git_details.commit_id` (string)
    Commit identifier.

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

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

  - `data.account.with_group.entities.git_details.repo_name` (string)
    Name of the repository.

  - `data.account.with_group.entities.git_details.repo_url` (string)
    Repository URL of the Entity.

  - `data.account.with_group.entities.git_details.is_harness_code_repo` (boolean)
    Is Git Experience repo harness code.

  - `data.account.with_group.entities.cache_response_data` (object)

  - `data.account.with_group.entities.cache_response_data.cache_state` (string)
    Tells the state of cache.
    Enum: "VALID_CACHE", "STALE_CACHE", "UNKNOWN"

  - `data.account.with_group.entities.cache_response_data.ttl_left` (integer)
    Time left till cache expriry.

  - `data.account.with_group.entities.cache_response_data.last_updated_at` (integer)
    Time when the cache was last updated at.

  - `data.account.with_group.entities.cache_response_data.is_sync_enabled` (boolean)

  - `data.account.with_group.entities.entity_validity_details` (object)

  - `data.account.with_group.entities.entity_validity_details.is_valid` (boolean)

  - `data.account.with_group.entities.entity_validity_details.error_messages` (array)

  - `data.account.with_group.entities.scorecards` (object)
    Scorecard information for the entity

  - `data.account.with_group.entities.scorecards.average` (number)
    Average score across all scorecards

  - `data.account.with_group.entities.scorecards.scores` (array)

  - `data.account.with_group.entities.scorecards.scores.scorecard` (string)
    Name of the scorecard

  - `data.account.with_group.entities.scorecards.scores.score` (number)
    Numeric score (typically 0-100)

  - `data.account.with_group.entities.scorecards.scores.total_checks` (number)
    Total number of checks in the scorecard

  - `data.account.with_group.entities.scorecards.scores.passed_checks` (number)
    Number of checks that passed

  - `data.account.with_group.entities.yaml` (string, required)
    Complete entity YAML definition

  - `data.account.with_group.entities.starred` (boolean)
    Whether the entity is marked as a favorite by the current user

  - `data.account.with_group.entities.status` (array)
    Status information for the entity

  - `data.account.with_group.entities.status.type` (string)
    Type of status information

  - `data.account.with_group.entities.status.level` (string)
    Severity level (info, warning, error)

  - `data.account.with_group.entities.status.message` (string)
    Status message text

  - `data.account.with_group.entities.groups` (array)
    Groups that the entity belongs to

  - `data.account.with_group.entities.groups.org_identifier` (string)
    Organization identifier

  - `data.account.with_group.entities.groups.org_name` (string)
    Organization name

  - `data.account.with_group.entities.groups.project_identifier` (string)
    Project identifier

  - `data.account.with_group.entities.groups.project_name` (string)
    Project name

  - `data.account.with_group.entities.groups.scope` (string)
    Scope level
    Enum: "ACCOUNT", "ORGANIZATION", "PROJECT"

  - `data.account.with_group.entities.groups.group_identifier` (string)
    Group identifier

  - `data.account.with_group.entities.groups.group_name` (string)
    Group display name

  - `data.account.with_group.entities.groups.group_description` (string)
    Group description

  - `data.account.with_group.entities.groups.group_icon` (string)
    Group icon URL

  - `data.account.without_group` (array)
    Account-level entities not associated with any group

  - `data.org` (object)
    Organization-level entities

  - `data.org.with_group` (array)
    Organization-level entities organized into groups

  - `data.org.without_group` (array)
    Organization-level entities not associated with any group

  - `data.project` (object)
    Project-level entities

  - `data.project.with_group` (array)
    Project-level entities organized into groups

  - `data.project.without_group` (array)
    Project-level entities not associated with any group

  - `count` (object)
    Count information for entities by scope and group

  - `count.total` (integer)
    Total number of entities across all scopes

  - `count.total_owned` (integer)
    Total number of entities owned by the current user or their groups

  - `count.total_starred` (integer)
    Total number of entities marked as favorites by the current user

  - `count.account` (array)
    Entity counts at the account level by group

  - `count.org` (array)
    Entity counts at the organization level

  - `count.org.org_identifier` (string)
    Organization identifier

  - `count.org.org_name` (string)
    Organization name

  - `count.org.groups` (array)
    Entity counts by group within the organization

  - `count.project` (array)
    Entity counts at the project level

  - `count.project.org_identifier` (string)
    Organization identifier

  - `count.project.org_name` (string)
    Organization name

  - `count.project.project_identifier` (string)
    Project identifier

  - `count.project.project_name` (string)
    Project name

  - `count.project.groups` (array)
    Entity counts by group within the project


