---
title: "Get relationship rules for a given workspace"
method: GET
path: "/v1/workspaces/{workspaceId}/relationship-rules"
---

# Get relationship rules for a given workspace

`GET /v1/workspaces/{workspaceId}/relationship-rules`

Returns all relationship rules for the specified workspace.

## Path parameters

- `workspaceId` string, required

## Query parameters

- `offset` integer
- `limit` integer

## Response `200`

Paginated list of items

- object
  - `items` RelationshipRule[], required
    - `description` string
    - `fromSelector` union
      - JsonSelector
        - `json` object, required
      - CelSelector
        - `cel` string, required
    - `fromType` 'deployment' | 'environment' | 'resource', required
    - `id` string, required
    - `matcher` union, required
      - CelMatcher
        - `cel` string, required
      - PropertiesMatcher
        - `properties` PropertyMatcher[], required
          - `fromProperty` string[], required
          - `operator` 'equals' | 'notEquals' | 'contains' | 'startsWith' | 'endsWith' | 'regex', required
          - `toProperty` string[], required
    - `metadata` object, required
    - `name` string, required
    - `reference` string, required
    - `relationshipType` string, required
    - `toSelector` union
      - JsonSelector
        - `json` object, required
      - CelSelector
        - `cel` string, required
    - `toType` 'deployment' | 'environment' | 'resource', required
    - `workspaceId` string, required
  - `limit` integer, required — Maximum number of items returned
  - `offset` integer, required — Number of items skipped
  - `total` integer, required — Total number of items available

## Other responses

- `400` — Invalid request
- `404` — Resource not found

## Changes

- **2026-02-11** `3924e3b154f6` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ctrlplanedev/apis/workspace-engine-api/changes/v1/workspaces/:workspaceId/relationship-rules/get.md)

---

[API](https://skmtc.dev/ctrlplanedev/apis/workspace-engine-api.md) · [All operations](https://skmtc.dev/ctrlplanedev/apis/workspace-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ctrlplanedev/workspace-engine-api/revisions/3924e3b154f6/schema)
