# List resource change rows

List one page of resource-change rows for an execution stage.

Served entirely from the indexed snapshot: every column the response carries is a scalar, so a
list request reads no attribute data. Attribute documents are fetched one row at a time from
get-resource-change-detail.

Pages are numbered and randomly addressable, because the table's page picker lets a caller jump
straight to page 5 rather than walking there. Unfiltered, a page is a bare ordinal range over an
index — ordinals are dense within a category — so page 40 costs what page 1 costs. Once a filter
or search is applied ordinals stop being contiguous and the page has to be counted into, but by
then the result set has narrowed to the point where there is little to count past.

Rows come back in stored order: change-type priority (deleted, added, changed, unchanged, removed,
imported) then name. There is no sort parameter, because the columns filter rather than sort — the
ordering is fixed at write time and identical for every caller.

Only committed snapshots are visible. A stage whose upload never completed, or that predates
indexing, is a 404 and the caller should fall back to list-resource-changes.

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

## Query parameters:

  - `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"

  - `limit` (integer)
    Rows per page.
    Example: 25

  - `page` (integer)
    1-indexed page number to fetch.
    Example: 1

## Path parameters:

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

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

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

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

  - `category` (string, required)
    Category to list rows from. One per tab in the table view.
    Enum: "planned_changes", "drift_changes", "resources", "outputs"

## Header parameters:

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

## Response 200 fields (application/json):

  - `page` (integer, required)
    1-indexed page number returned.
    Example: 1

  - `pageSize` (integer, required)
    Maximum rows this page could hold.
    Example: 25

  - `rows` (array, required)
    Example: [{"category":"planned_changes","change":"added","change_count":3,"detail_bytes":2048,"drift":false,"mode":"resource","module":"root","name":"app_bucket","ordinal":17,"provider":"AWS","resource_address":"module.app.aws_s3_bucket.app_bucket","resource_id":"arn:aws:s3:::my-bucket","sensitive":false,"type":"aws_s3_bucket","value":"i-0abc123"},{"category":"planned_changes","change":"added","change_count":3,"detail_bytes":2048,"drift":false,"mode":"resource","module":"root","name":"app_bucket","ordinal":17,"provider":"AWS","resource_address":"module.app.aws_s3_bucket.app_bucket","resource_id":"arn:aws:s3:::my-bucket","sensitive":false,"type":"aws_s3_bucket","value":"i-0abc123"},{"category":"planned_changes","change":"added","change_count":3,"detail_bytes":2048,"drift":false,"mode":"resource","module":"root","name":"app_bucket","ordinal":17,"provider":"AWS","resource_address":"module.app.aws_s3_bucket.app_bucket","resource_id":"arn:aws:s3:::my-bucket","sensitive":false,"type":"aws_s3_bucket","value":"i-0abc123"}]

  - `rows.category` (string, required)
    Category this row belongs to.
    Enum: "planned_changes", "drift_changes", "resources", "outputs"

  - `rows.change` (string)
    Change made to this resource. Populated for planned_changes and drift_changes rows.
    Enum: "added", "changed", "deleted", "replaced", "unchanged", "imported", "removed"

  - `rows.change_count` (integer)
    Count of changed attributes on this resource. Populated for planned_changes and drift_changes rows.
    Example: 3

  - `rows.detail_bytes` (integer)
    Uncompressed size in bytes of this row's attribute document, so a client can decide whether to fetch it. Zero for outputs rows, which carry their value inline.
    Example: 2048

  - `rows.drift` (boolean)
    Whether this row came from drift detection rather than a plan. True exactly when category is drift_changes.

  - `rows.mode` (string)
    Whether the row is a managed resource or a data source. Populated for resources rows.
    Enum: "resource", "data"

  - `rows.module` (string, required)
    Module associated with the resource.
    Example: "root"

  - `rows.name` (string, required)
    Name associated with the resource, or the output name for outputs rows.
    Example: "app_bucket"

  - `rows.ordinal` (integer, required)
    Zero-based position of this row within its category. Ordinals are per-category and stable for the life of the snapshot, which is what makes them safe to address the detail endpoint with.
    Example: 17

  - `rows.provider` (string, required)
    Cloud provider associated with the resource.
    Example: "AWS"

  - `rows.resource_address` (string, required)
    Fully qualified address of the resource, module path included.
    Example: "module.app.aws_s3_bucket.app_bucket"

  - `rows.resource_id` (string)
    Identifier for the resource from the cloud provider. Populated for resources rows.
    Example: "arn:aws:s3:::my-bucket"

  - `rows.sensitive` (boolean)
    Whether this row's value is sensitive. Populated for outputs rows.

  - `rows.type` (string, required)
    Provider resource type.
    Example: "aws_s3_bucket"

  - `rows.value` (string)
    Output value. Populated for outputs rows, whose values are stored inline rather than behind a detail read.
    Example: "i-0abc123"

  - `totalItems` (integer, required)
    Total rows matching these filters, ignoring paging.
    Example: 131

  - `totalPages` (integer, required)
    Total pages matching these filters, so a client need not derive it.
    Example: 6

## 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?


