---
title: "Getting a list of stubs"
method: GET
path: "/stubs"
tags: ["stubs"]
---

# Getting a list of stubs

`GET /stubs`

The list of stubs is required to view all added stubs. Use source query param to filter by source.

## Query parameters

- `source` string
- `service` string
- `method` string
- `session` string
- `q` string
- `limit` integer
- `offset` integer
- `sort` string

## Response `200`

Successful operation

- Stub[]
  - `id` string, uuid
  - `service` string, required
  - `method` string, required
  - `priority` integer — Priority of the stub. Higher priority stubs are matched first.
  - `used` boolean — Response-only — whether the stub has matched at least once. Ignored on input.
  - `headers` StubHeaders
    - `equals` object
    - `contains` object
    - `matches` object
    - `anyOf` StubHeadersAnyOfElement[] — Alternative header matchers (OR logic)
      - `equals` object
      - `contains` object
      - `matches` object
  - `input` StubInput, required
    - `ignoreArrayOrder` boolean
    - `equals` object
    - `contains` object
    - `matches` object
    - `anyOf` StubInputAnyOfElement[] — Alternative input matchers (OR logic)
      - `ignoreArrayOrder` boolean
      - `equals` object
      - `contains` object
      - `matches` object
  - `inputs` StubInput[] — Inputs to match against. If multiple inputs are provided, the stub will be matched if any of the inputs match.
    - `ignoreArrayOrder` boolean
    - `equals` object
    - `contains` object
    - `matches` object
    - `anyOf` StubInputAnyOfElement[] — Alternative input matchers (OR logic)
      - `ignoreArrayOrder` boolean
      - `equals` object
      - `contains` object
      - `matches` object
  - `output` StubOutput, required
    - `data` unknown
    - `stream` unknown[]
      - unknown
    - `headers` object
    - `error` string
    - `code` integer
    - `details` object[] — gRPC status details packed into google.protobuf.Any (each item must contain type URL in `type`)
      - `type` string, required — Full Any type URL (for example, type.googleapis.com/google.rpc.ErrorInfo)
    - `delay` string — Delay before sending the response
  - `options` StubOptions — Optional behavior settings for a stub
    - `times` integer — Max number of matches; 0 = unlimited
  - `effects` StubEffect[] — Side effects applied after successful stub match
    - `action` 'upsert' | 'delete', required
    - `id` string — Stub UUID for delete action
    - `stub` object — Stub payload for upsert action
  - `source` string — Source of the stub (file, rest, mcp, proxy)

## Other responses

- `404` — No stubs found
- `500` — Internal Server Error

## Changes

- **2026-07-20** `e2b32002bad4` — 2 info
  - added the new optional `query` request parameter `q`
  - added the optional property `items/used` to the response with the `200` status
- **2026-06-13** `4003b62da452` — 2 breaking
  - the `items/output/data` response's property type changed from `object` to no type for status `200`
  - the `items/output/stream/items/` response's property type changed from `object` to no type for status `200`
- **2026-04-22** `9baafb13a873` — 4 info
  - added the optional property `items/effects` to the response with the `200` status
  - added the optional property `items/headers/anyOf` to the response with the `200` status
  - added the optional property `items/input/anyOf` to the response with the `200` status
  - added the optional property `items/inputs/items/anyOf` to the response with the `200` status
- **2026-04-20** `6abd62cfb278` — 8 info
  - added the new optional `query` request parameter `limit`
  - added the new optional `query` request parameter `method`
  - added the new optional `query` request parameter `offset`
  - added the new optional `query` request parameter `service`
  - …4 more
- **2026-03-07** `95a6a42172d8` — 1 info
  - added the optional property `items/output/details` to the response with the `200` status

[Full history](https://skmtc.dev/bavix/apis/gripmock-api-schema/changes/stubs/get.md)

---

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