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

# list_dependencies

> List everything that references a quota, data table, group, group dimension, plan or report — the impact analysis to read before changing or deleting it.

Answer "what breaks if I change or delete this?" for one resource.

The tool returns everything that references the resource — compensations and
their plans, reports, dashboards, saved views, variables, lookup fields, plan
simulation pipelines — each as a uniform row naming the dependent, the object it
lives inside, and the sandbox it belongs to (null on live). Reach for it before
advising on a change to a quota, data table, group, group dimension, plan or
report, and to answer "is this still used?".

One call returns every dependent — there is no pagination and no cap, because a
partial impact analysis is worse than none. `counts_by_type` rolls the same rows
up per nature so you can read the shape of the impact at a glance, and a `total`
of 0 means nothing references the resource, so changing or deleting it breaks
nothing.

Dependents are reported in full even when you could not open one yourself:
withholding one would read as "nothing uses this", which is the wrong conclusion
to act on. Each dependent carries only its id and name, never its contents.

## Permissions

Reading a resource's dependents needs **full read access** to that kind of
resource — a resource merely shared with you does not admit you, since the
question exists to be asked before changing or deleting it. The tool is visible
as soon as your role can read *any* of the six resource types, but each call is
checked against the permission the `resource_type` argument selects: you can
only analyze the kinds you may read. Analyzing a `report` additionally requires
the reporting feature to be enabled for your company. This tool is read-only: it
says what *would* break and changes nothing.

## Parameters

<Accordion title="Body" defaultOpen>
  <ParamField body="resource_type" type="string" required>
    What kind of resource `resource_id` names. One of: `quota`, `data_table`,
    `group`, `group_dimension`, `plan`, `report`. Each kind is read under its
    own permission, so you can analyze only the kinds you may read.
  </ParamField>

  <ParamField body="resource_id" type="string" required>
    Id of the resource to analyze — the id the matching list tool returns
    (list\_quotas, list\_data\_tables, list\_groups, list\_group\_dimensions,
    list\_plans, list\_reports). An id, never a name.
  </ParamField>
</Accordion>

## Response

<Accordion title="Body" defaultOpen>
  <ResponseField name="resource_type" type="string">
    The kind of resource that was analyzed. One of: `quota`, `data_table`,
    `group`, `group_dimension`, `plan`, `report`.
  </ResponseField>

  <ResponseField name="resource" type="object">
    The resource whose dependents were analyzed.

    <Expandable title="object properties">
      <ResponseField name="id" type="string" />

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

      <ResponseField name="resource_url" type="string">
        Link to this resource's page in the Qobra web app, stamped with its
        sandbox when it lives in one. Null for a group dimension, which is
        managed inside the users page and has no page of its own.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="total" type="integer">
    Total dependents across every nature — the length of `dependencies`. Zero
    means nothing references this resource, so changing or deleting it breaks
    nothing.
  </ResponseField>

  <ResponseField name="counts_by_type" type="object[]">
    Per-nature rollup of `dependencies`, to read the shape of the impact at a
    glance. Natures with no dependent are omitted.

    <Expandable title="object properties">
      <ResponseField name="type" type="string" />

      <ResponseField name="count" type="integer">
        Dependents of this nature. A nature absent from the list has none.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="dependencies" type="object[]">
    Every dependent, ordered by nature then name. The whole set, never a page
    and never capped — `total` is always its length.

    <Expandable title="object properties">
      <ResponseField name="type" type="string">
        The nature of the dependency — how the dependent uses the analyzed
        resource. `compensation`: a commission rule reads it.
        `compensation_used_as_scope`: a compensation consumed as another one's
        scope. `dashboard` / `report`: a reporting object renders it. `table`: a
        data table matches users on it. `group`: a group belonging to the
        dimension, which blocks deleting it. `scope`: a compensation's scope.
        `lookup_field`: a field looking it up on another table.
        `scope_variable` / `statement_variable` / `sync_variable`: a variable
        computing from it. `commission_letter`: a letter campaign.
        `object_view` / `quota_view` / `statement_view` / `request_view`: a
        saved view filtering on it. `public_api`: the public API matches users
        on it. `plan_simulation_pipelines`: a plan's simulation pipeline.
        `record_report_dependency`: a record report tracks it.
      </ResponseField>

      <ResponseField name="resource" type="object">
        The dependent object itself. Null for the two natures that name no
        object — `public_api` and `record_report_dependency`, where the
        dependency is the mechanism rather than a row you can open.

        <Expandable title="object properties">
          <ResponseField name="id" type="string" />

          <ResponseField name="name" type="string" />
        </Expandable>
      </ResponseField>

      <ResponseField name="parent" type="object">
        The object the dependent lives inside, when its nature has one: the plan
        for a compensation or a simulation pipeline, the data table for an
        object view or a lookup field, the quota for a quota view. Null when the
        dependent stands alone.

        <Expandable title="object properties">
          <ResponseField name="id" type="string" />

          <ResponseField name="name" type="string" />
        </Expandable>
      </ResponseField>

      <ResponseField name="sandbox_id" type="string">
        The sandbox this dependent lives in, or null when it lives in the live
        environment. A dependent in a sandbox does not affect live compensation.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Accordion>
