---
title: "Stub storage search"
method: POST
path: "/stubs/search"
tags: ["stubs"]
---

# Stub storage search

`POST /stubs/search`

Performs a search for a stub by the given conditions

## Request body

- SearchRequest — A synthetic gRPC request. The server resolves it against the loaded stubs and returns the output of the winning stub, without performing the call.
  - `id` string, uuid — Stub identifier (UUID).
  - `service` string, required — Fully qualified gRPC service name.
  - `method` string, required — gRPC method name.
  - `headers` object — Request metadata to match against stub `headers`.
  - `data` object, required — Request body to match against stub `input`.

## Response `200`

Successful operation

- SearchResponse — Output of the stub that won the match.
  - `headers` object — Response metadata of the matched stub.
  - `data` object, required — Response body of the matched stub.
  - `error` string, required — gRPC status message, empty when the stub returns data.
  - `code` integer — gRPC status code.

## Other responses

- `400` — Invalid search criteria
- `413` — Payload Too Large
- `422` — Validation error
- `500` — Internal Server Error

---

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