---
title: "Preview a component relationship change"
method: POST
path: "/components/relationships/preview"
tags: ["Components"]
---

# Preview a component relationship change

`POST /components/relationships/preview`

Preview descendant-scoped notification and automation impact for a topology change.

## Request body

- object
  - `projectId` string, uuid — Project containing the component topology. Auto-filled from CLI and SDK context when omitted.
  - `sourceComponentId` string, uuid, required — Child or dependency-source component ID.
  - `targetComponentId` string, uuid, required — Parent or dependency-target component ID.
  - `relationshipType` 'part_of' | 'depends_on', required — Relationship semantics: part_of is an acyclic child-to-parent edge; depends_on may be cyclic.
  - `action` 'add' | 'remove', required — Topology mutation to preview without changing the graph.

## Response `200`

OK

- object
  - `preview` object, required
    - `sourceComponentId` string, uuid, required — Child or dependency-source component ID.
    - `targetComponentId` string, uuid, required — Parent or dependency-target component ID.
    - `relationshipType` 'part_of' | 'depends_on', required — Relationship semantics: part_of is an acyclic child-to-parent edge; depends_on may be cyclic.
    - `action` 'add' | 'remove', required
    - `organizationId` string, required
    - `projectId` string, uuid, required
    - `relationshipId` string, uuid, nullable, required
    - `componentRevisions` object, required
    - `policyImpact` object, required
      - `notificationRules` object[], required
        - `ruleId` string, uuid, required
        - `ruleGroupId` string, uuid, nullable, required
        - `ownerComponentId` string, uuid, required
        - `destinationIds` string[], required
        - `beforeComponentIds` string[], required
        - `afterComponentIds` string[], required
      - `automationBindings` object[], required
        - `bindingId` string, uuid, required
        - `automationId` string, uuid, required
        - `ownerComponentId` string, uuid, required
        - `beforeComponentIds` string[], required
        - `afterComponentIds` string[], required
    - `confirmationRequired` boolean, required

---

[API](https://skmtc.dev/sazabi/apis/sazabi-public-api.md) · [All operations](https://skmtc.dev/sazabi/apis/sazabi-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sazabi/sazabi-public-api/revisions/1d12b71c735a/schema)
