---
title: "Get Contracts"
method: GET
path: "/workspaces/{workspace_id}/snapshots/{snapshot_id}/contracts"
tags: ["workspaces"]
---

# Get Contracts

`GET /workspaces/{workspace_id}/snapshots/{snapshot_id}/contracts`

Detected contracts (paged) and their matched links (filtered, not paged).

## Path parameters

- `workspace_id` string, required
- `snapshot_id` string, required

## Query parameters

- `contract_type` string, nullable — Filter: http, grpc, socket, topic, or data
- `repo` string, nullable — Filter by repo alias
- `role` string, nullable — Filter: provider or consumer
- `q` string, nullable — Search id, file, symbol, repo and service; every term must match.
- `linked` boolean, nullable — true: only contracts on a matched link; false: only those on none
- `include_links` boolean — false omits the link rows; total_links is still counted
- `limit` integer
- `offset` integer

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-24** `491affc1d3e7` — 3 info
  - added the new optional `query` request parameter `include_links`
  - added the new optional `query` request parameter `linked`
  - added the new optional `query` request parameter `q`
- **2026-09-23** `8c05b8b9a5c4` — 5 info
  - added the new optional `query` request parameter `contract_type`
  - added the new optional `query` request parameter `limit`
  - added the new optional `query` request parameter `offset`
  - added the new optional `query` request parameter `repo`
  - …1 more

[Change history](https://skmtc.dev/repowise/apis/repowise-hosted-api/changes/workspaces/:workspace_id/snapshots/:snapshot_id/contracts/get.md)

---

[API](https://skmtc.dev/repowise/apis/repowise-hosted-api.md) · [All operations](https://skmtc.dev/repowise/apis/repowise-hosted-api/llms.txt) · [OpenAPI document](https://skmtc.dev/repowise/apis/repowise-hosted-api/revisions/2a17b60b22d8?raw)
