# Get resource change filter counts

Get the count beside every filter option, across every dimension, in one request.

Unlike get-resource-change-counts, which returns fixed whole-snapshot badge totals, these counts are
selection-aware: each one answers how many rows the list would hold if the caller also picked that
option, so they move as the caller filters. Both endpoints stay — badges read the totals, the filter
panel reads these.

Every dimension is counted with the other dimensions' filters applied but not its own. That is what
lets a caller widen a selection: were they all counted under one shared predicate, selecting a
single provider would make every other provider read zero.

The category filter accepts more than one value here even though the list endpoint takes a single
category in its path, so a caller can scope the counts to the categories its tab shows.

Only committed snapshots are visible; an unindexed or incomplete stage is a 404.

Endpoint: GET /iacm/api/orgs/{org}/projects/{project}/executions/{pipeline_execution_id}/{pipeline_stage_id}/resource-changes/filter-counts
Version: 1.0
Security: x-api-key

## Query parameters:

  - `category` (array)
    Restrict to these categories. Repeat the parameter to select more than one; omit it for all.
    Enum: "planned_changes", "drift_changes", "resources", "outputs"

  - `change` (array)
    Restrict to these change types. Repeat the parameter to select more than one; omit it for all. Only meaningful for the planned_changes and drift_changes categories, whose rows are the only ones carrying a change type.
    Enum: "added", "changed", "deleted", "replaced", "unchanged", "removed", "imported"

  - `provider` (array)
    Restrict to these providers. Repeat the parameter to select more than one; omit it for all.
    Example: ["registry.opentofu.org/hashicorp/aws"]

  - `type` (array)
    Restrict to these provider resource types. Repeat the parameter to select more than one; omit it for all.
    Example: ["aws_instance"]

  - `module` (array)
    Restrict to these modules. Repeat the parameter to select more than one; omit it for all.
    Example: ["root"]

  - `search` (string)
    Case-insensitive substring match against the resource address and name.
    Example: "app_bucket"

## Path parameters:

  - `org` (string, required)
    Org is the organisation identifier.
    Example: "bw"

  - `project` (string, required)
    Project is the project identifier.
    Example: "mah"

  - `pipeline_execution_id` (string, required)
    Pipeline execution ID
    Example: "248"

  - `pipeline_stage_id` (string, required)
    Pipeline execution stage ID
    Example: "r"

## Header parameters:

  - `Harness-Account` (string, required)
    Account is the internal customer account ID.
    Example: "or"

## Response 200 fields (application/json):

  - `categories` (object, required)
    Row count per category, with every other dimension's filters applied but not the category filter.
    Example: {"drift_changes":0,"outputs":0,"planned_changes":131,"resources":0}

  - `change_types` (object, required)
    Row count per change type, with every other dimension's filters applied but not the change-type filter. Empty for categories that have no change type. These are the numbers on the cards above the table.
    Example: {"added":130,"changed":0,"deleted":1,"imported":0,"removed":0,"unchanged":0}

  - `modules` (object, required)
    Row count per module, with every other dimension's filters applied but not the module filter.
    Example: {"root":131}

  - `providers` (object, required)
    Row count per provider, with every other dimension's filters applied but not the provider filter.
    Example: {"registry.opentofu.org/hashicorp/aws":131}

  - `types` (object, required)
    Row count per provider resource type, with every other dimension's filters applied but not the type filter.
    Example: {"aws_default_vpc":1,"aws_instance":130}

## Response 400 fields (application/vnd.goa.error):

  - `fault` (boolean, required)
    Is the error a server-side fault?
    Example: true

  - `id` (string, required)
    ID is a unique identifier for this particular occurrence of the problem.
    Example: "123abc"

  - `message` (string, required)
    Message is a human-readable explanation specific to this occurrence of the problem.
    Example: "parameter 'p' must be an integer"

  - `name` (string, required)
    Name is the name of this class of errors.
    Example: "bad_request"

  - `temporary` (boolean, required)
    Is the error temporary?
    Example: true

  - `timeout` (boolean, required)
    Is the error a timeout?


