GripMock API Schema (3.0.0)

Download OpenAPI specification:Download

Documentation and API specification GripMock.

stubs

Stubs storage management

Getting a list of used stubs

The list is needed to quickly find used stubs

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Getting a list of unused stubs

The list is needed to quickly find unused stubs

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Getting a list of stubs

The list of stubs is required to view all added stubs

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a new stub to the store

Creates a new stub or multiple stubs and adds them to the storage

Authorizations:
None
Request Body schema: application/json
required

Create a new stub in the store

One of
Array
id
string <uuid> (ID)
service
required
string
method
required
string
priority
integer
Default: 0

Priority of the stub. Higher priority stubs are matched first.

object (StubHeaders)
required
object (StubInput)
Array of objects (StubInput)

Inputs to match against. If multiple inputs are provided, the stub will be matched if any of the inputs match.

required
object (StubOutput)
object (StubOptions)

Optional behavior settings for a stub

Responses

Request samples

Content type
application/json
Example
[ ]

Response samples

Content type
application/json
[ ]

Remove all stubs

Completely clears the stub storage

Authorizations:
None

Responses

Deletes a batch of stubs by IDs

Takes IDs as input and deletes them

Authorizations:
None
Request Body schema: application/json
required

Delete stubs by their IDs

Array
string <uuid> (ID)

Responses

Request samples

Content type
application/json
[
  • "51c50050-ec27-4dae-a583-a32ca71a1dd5"
]

Get Stub by ID

Searches for Stub by ID

Authorizations:
None
path Parameters
uuid
required
string <uuid> (ID)
Example: 51c50050-ec27-4dae-a583-a32ca71a1dd5

ID of stub

Responses

Response samples

Content type
application/json
{
  • "id": "51c50050-ec27-4dae-a583-a32ca71a1dd5",
  • "service": "Gripmock",
  • "method": "SayHello",
  • "priority": 0,
  • "headers": {
    },
  • "input": {
    },
  • "inputs": [
    ],
  • "output": {
    },
  • "options": {
    }
}

Deletes stub by ID

The method removes the stub by ID

Authorizations:
None
path Parameters
uuid
required
string <uuid> (ID)
Example: 51c50050-ec27-4dae-a583-a32ca71a1dd5

ID of stub

Responses

Stub storage search

Performs a search for a stub by the given conditions

Authorizations:
None
Request Body schema: application/json
required

Search criteria including service, method, headers and data to match against stubs

id
string <uuid> (ID)
service
required
string
method
required
string
object
required
object

Responses

Request samples

Content type
application/json
{
  • "id": "51c50050-ec27-4dae-a583-a32ca71a1dd5",
  • "service": "Gripmock",
  • "method": "SayHello",
  • "headers": {
    },
  • "data": { }
}

Response samples

Content type
application/json
{
  • "headers": {
    },
  • "data": { },
  • "error": "Message not found",
  • "code": 3
}

services

Services reflection

Services

List of registered services

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Service methods

List of registered service methods

Authorizations:
None
path Parameters
serviceID
required
string

ID of service

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Remove service

Removes a service added via POST /descriptors. Services from startup (proto path) cannot be removed.

Authorizations:
None
path Parameters
serviceID
required
string

Full service name (e.g. helloworld.Greeter)

Responses

dashboard

Dashboard

healthcheck

Healthcheck

Liveness check

This endpoint indicates that the service is alive and ready to handle requests

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "time": "2019-08-24T14:15:22Z"
}

Readiness check

The test indicates readiness to receive traffic

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "time": "2019-08-24T14:15:22Z"
}

descriptors

Protocol Buffer descriptors (FileDescriptorSet)

List service IDs from REST-added descriptors

Returns service IDs (e.g. helloworld.Greeter) added via POST /descriptors. Use DELETE /services/{serviceID} to remove.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "serviceIDs": [
    ]
}

Upload FileDescriptorSet

Accepts binary Protocol Buffers FileDescriptorSet. Registers descriptors for dynamic service discovery. Returns service IDs for later removal via DELETE /services/{serviceID}.

Authorizations:
None
Request Body schema: application/octet-stream
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "time": "2019-08-24T14:15:22Z",
  • "serviceIDs": [
    ]
}

mcp

Model Context Protocol (MCP) integration

MCP transport metadata

Returns MCP server metadata, supported protocol versions and transport details.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "protocolVersion": "2024-11-05",
  • "serverName": "gripmock",
  • "serverVersion": "3.7.1",
  • "transport": {
    },
  • "methods": [
    ],
  • "tools": [
    ]
}

MCP JSON-RPC endpoint

Accepts MCP JSON-RPC requests (initialize, ping, tools/list, tools/call) and returns JSON-RPC responses.

Authorizations:
None
Request Body schema: application/json
required
jsonrpc
required
string
(string or null) or (integer or null) (McpID)
method
required
string
object

Responses

Request samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": 10,
  • "method": "tools/call",
  • "params": {
    }
}

Response samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": 10,
  • "result": {
    }
}

history

Get call history

Returns recorded gRPC calls (when history is enabled)

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

verify

Verify call counts

Asserts that a method was called a specified number of times

Authorizations:
None
Request Body schema: application/json
required
service
required
string
method
required
string
expectedCount
required
integer >= 0

Responses

Request samples

Content type
application/json
{
  • "service": "string",
  • "method": "string",
  • "expectedCount": 0
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "time": "2019-08-24T14:15:22Z"
}