stubs

Stub storage search

Changed on

Performs a search for a stub by the given conditions

post/stubs/search

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/stubs/search
  • Auth
    none required

Request body

idstring uuid

Stub identifier (UUID).

servicestring required

Fully qualified gRPC service name.

methodstring required

gRPC method name.

headersobject

Request metadata to match against stub headers.

dataobject required

Request body to match against stub input.

Example request

{
  "id": "51c50050-ec27-4dae-a583-a32ca71a1dd5",
  "service": "Gripmock",
  "method": "SayHello"
}

Response

Successful operation

headersobject

Response metadata of the matched stub.

dataobject required

Response body of the matched stub.

errorstring required

gRPC status message, empty when the stub returns data.

codeinteger

gRPC status code.

Example response

{
  "error": "Message not found",
  "code": 3
}

Changes