Download OpenAPI specification:Download
Documentation and API specification GripMock.
Returns combined dashboard counters, runtime metadata, and process state in one response.
{- "appName": "string",
- "version": "string",
- "goVersion": "string",
- "compiler": "string",
- "goos": "string",
- "goarch": "string",
- "numCPU": 1,
- "startedAt": "2019-08-24T14:15:22Z",
- "uptimeSeconds": 0,
- "ready": true,
- "historyEnabled": true,
- "totalServices": 0,
- "totalStubs": 0,
- "usedStubs": 0,
- "unusedStubs": 0,
- "totalSessions": 0,
- "runtimeDescriptors": 0,
- "totalHistory": 0,
- "historyErrors": 0
}Returns lightweight aggregate counters for admin UI dashboard.
{- "totalServices": 0,
- "totalStubs": 0,
- "usedStubs": 0,
- "unusedStubs": 0,
- "totalSessions": 0,
- "runtimeDescriptors": 0,
- "totalHistory": 0,
- "historyErrors": 0
}Returns GripMock build metadata and current runtime process information.
{- "appName": "string",
- "version": "string",
- "goVersion": "string",
- "compiler": "string",
- "goos": "string",
- "goarch": "string",
- "numCPU": 1,
- "startedAt": "2019-08-24T14:15:22Z",
- "uptimeSeconds": 0,
- "ready": true,
- "historyEnabled": true,
- "totalServices": 0,
- "totalStubs": 0,
- "totalSessions": 0,
- "runtimeDescriptors": 0
}[- {
- "id": "string",
- "package": "string",
- "name": "string",
- "methods": [
- {
- "id": "string",
- "name": "string",
- "methodType": "unary",
- "requestType": "string",
- "responseType": "string",
- "requestSchema": {
- "typeName": "string",
- "recursiveRef": true,
- "fields": [
- {
- "name": "string",
- "jsonName": "string",
- "number": 1,
- "kind": "string",
- "cardinality": "optional",
- "typeName": "string",
- "oneof": "string",
- "enumValues": [
- "string"
], - "map": true,
- "mapKeyKind": "string",
- "mapValueKind": "string",
- "mapValueTypeName": "string",
- "message": { },
- "mapValueMessage": { }
}
]
}, - "responseSchema": {
- "typeName": "string",
- "recursiveRef": true,
- "fields": [
- {
- "name": "string",
- "jsonName": "string",
- "number": 1,
- "kind": "string",
- "cardinality": "optional",
- "typeName": "string",
- "oneof": "string",
- "enumValues": [
- "string"
], - "map": true,
- "mapKeyKind": "string",
- "mapValueKind": "string",
- "mapValueTypeName": "string",
- "message": { },
- "mapValueMessage": { }
}
]
}, - "clientStreaming": true,
- "serverStreaming": true
}
]
}
]List of registered service methods
| serviceID required | string ID of service |
[- {
- "id": "string",
- "name": "string",
- "methodType": "unary",
- "requestType": "string",
- "responseType": "string",
- "requestSchema": {
- "typeName": "string",
- "recursiveRef": true,
- "fields": [
- {
- "name": "string",
- "jsonName": "string",
- "number": 1,
- "kind": "string",
- "cardinality": "optional",
- "typeName": "string",
- "oneof": "string",
- "enumValues": [
- "string"
], - "map": true,
- "mapKeyKind": "string",
- "mapValueKind": "string",
- "mapValueTypeName": "string",
- "message": { },
- "mapValueMessage": { }
}
]
}, - "responseSchema": {
- "typeName": "string",
- "recursiveRef": true,
- "fields": [
- {
- "name": "string",
- "jsonName": "string",
- "number": 1,
- "kind": "string",
- "cardinality": "optional",
- "typeName": "string",
- "oneof": "string",
- "enumValues": [
- "string"
], - "map": true,
- "mapKeyKind": "string",
- "mapValueKind": "string",
- "mapValueTypeName": "string",
- "message": { },
- "mapValueMessage": { }
}
]
}, - "clientStreaming": true,
- "serverStreaming": true
}
]Returns exact metadata for one method (by short name or full method id).
| serviceID required | string Full service name (e.g. helloworld.Greeter) |
| methodID required | string Method short name (e.g. SayHello) or full id (e.g. helloworld.Greeter/SayHello) |
{- "id": "string",
- "name": "string",
- "methodType": "unary",
- "requestType": "string",
- "responseType": "string",
- "requestSchema": {
- "typeName": "string",
- "recursiveRef": true,
- "fields": [
- {
- "name": "string",
- "jsonName": "string",
- "number": 1,
- "kind": "string",
- "cardinality": "optional",
- "typeName": "string",
- "oneof": "string",
- "enumValues": [
- "string"
], - "map": true,
- "mapKeyKind": "string",
- "mapValueKind": "string",
- "mapValueTypeName": "string",
- "message": { },
- "mapValueMessage": { }
}
]
}, - "responseSchema": {
- "typeName": "string",
- "recursiveRef": true,
- "fields": [
- {
- "name": "string",
- "jsonName": "string",
- "number": 1,
- "kind": "string",
- "cardinality": "optional",
- "typeName": "string",
- "oneof": "string",
- "enumValues": [
- "string"
], - "map": true,
- "mapKeyKind": "string",
- "mapValueKind": "string",
- "mapValueTypeName": "string",
- "message": { },
- "mapValueMessage": { }
}
]
}, - "clientStreaming": true,
- "serverStreaming": true
}Returns exact metadata for one service including all methods and streaming capabilities.
| serviceID required | string Full service name (e.g. helloworld.Greeter) |
{- "id": "string",
- "package": "string",
- "name": "string",
- "methods": [
- {
- "id": "string",
- "name": "string",
- "methodType": "unary",
- "requestType": "string",
- "responseType": "string",
- "requestSchema": {
- "typeName": "string",
- "recursiveRef": true,
- "fields": [
- {
- "name": "string",
- "jsonName": "string",
- "number": 1,
- "kind": "string",
- "cardinality": "optional",
- "typeName": "string",
- "oneof": "string",
- "enumValues": [
- "string"
], - "map": true,
- "mapKeyKind": "string",
- "mapValueKind": "string",
- "mapValueTypeName": "string",
- "message": { },
- "mapValueMessage": { }
}
]
}, - "responseSchema": {
- "typeName": "string",
- "recursiveRef": true,
- "fields": [
- {
- "name": "string",
- "jsonName": "string",
- "number": 1,
- "kind": "string",
- "cardinality": "optional",
- "typeName": "string",
- "oneof": "string",
- "enumValues": [
- "string"
], - "map": true,
- "mapKeyKind": "string",
- "mapValueKind": "string",
- "mapValueTypeName": "string",
- "message": { },
- "mapValueMessage": { }
}
]
}, - "clientStreaming": true,
- "serverStreaming": true
}
]
}The list is needed to quickly find used stubs
[- {
- "id": "51c50050-ec27-4dae-a583-a32ca71a1dd5",
- "service": "Gripmock",
- "method": "SayHello",
- "priority": 0,
- "headers": {
- "equals": {
- "property1": "string",
- "property2": "string"
}, - "contains": {
- "property1": "string",
- "property2": "string"
}, - "matches": {
- "property1": "string",
- "property2": "string"
}
}, - "input": {
- "ignoreArrayOrder": false,
- "equals": { },
- "contains": { },
- "matches": { }
}, - "inputs": [
- {
- "ignoreArrayOrder": false,
- "equals": { },
- "contains": { },
- "matches": { }
}
], - "output": {
- "data": { },
- "stream": [
- { }
], - "headers": {
- "property1": "string",
- "property2": "string"
}, - "error": "Message not found",
- "code": 3,
- "details": [
- {
- "type": "string"
}
], - "delay": "1s"
}, - "options": {
- "times": 0
}
}
]The list is needed to quickly find unused stubs
[- {
- "id": "51c50050-ec27-4dae-a583-a32ca71a1dd5",
- "service": "Gripmock",
- "method": "SayHello",
- "priority": 0,
- "headers": {
- "equals": {
- "property1": "string",
- "property2": "string"
}, - "contains": {
- "property1": "string",
- "property2": "string"
}, - "matches": {
- "property1": "string",
- "property2": "string"
}
}, - "input": {
- "ignoreArrayOrder": false,
- "equals": { },
- "contains": { },
- "matches": { }
}, - "inputs": [
- {
- "ignoreArrayOrder": false,
- "equals": { },
- "contains": { },
- "matches": { }
}
], - "output": {
- "data": { },
- "stream": [
- { }
], - "headers": {
- "property1": "string",
- "property2": "string"
}, - "error": "Message not found",
- "code": 3,
- "details": [
- {
- "type": "string"
}
], - "delay": "1s"
}, - "options": {
- "times": 0
}
}
]The list of stubs is required to view all added stubs
[- {
- "id": "51c50050-ec27-4dae-a583-a32ca71a1dd5",
- "service": "Gripmock",
- "method": "SayHello",
- "priority": 0,
- "headers": {
- "equals": {
- "property1": "string",
- "property2": "string"
}, - "contains": {
- "property1": "string",
- "property2": "string"
}, - "matches": {
- "property1": "string",
- "property2": "string"
}
}, - "input": {
- "ignoreArrayOrder": false,
- "equals": { },
- "contains": { },
- "matches": { }
}, - "inputs": [
- {
- "ignoreArrayOrder": false,
- "equals": { },
- "contains": { },
- "matches": { }
}
], - "output": {
- "data": { },
- "stream": [
- { }
], - "headers": {
- "property1": "string",
- "property2": "string"
}, - "error": "Message not found",
- "code": 3,
- "details": [
- {
- "type": "string"
}
], - "delay": "1s"
}, - "options": {
- "times": 0
}
}
]Creates a new stub or multiple stubs and adds them to the storage
Create a new stub in the store
| 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 |
[ ][ ]Searches for Stub by ID
| uuid required | string <uuid> (ID) Example: 51c50050-ec27-4dae-a583-a32ca71a1dd5 ID of stub |
{- "id": "51c50050-ec27-4dae-a583-a32ca71a1dd5",
- "service": "Gripmock",
- "method": "SayHello",
- "priority": 0,
- "headers": {
- "equals": {
- "property1": "string",
- "property2": "string"
}, - "contains": {
- "property1": "string",
- "property2": "string"
}, - "matches": {
- "property1": "string",
- "property2": "string"
}
}, - "input": {
- "ignoreArrayOrder": false,
- "equals": { },
- "contains": { },
- "matches": { }
}, - "inputs": [
- {
- "ignoreArrayOrder": false,
- "equals": { },
- "contains": { },
- "matches": { }
}
], - "output": {
- "data": { },
- "stream": [
- { }
], - "headers": {
- "property1": "string",
- "property2": "string"
}, - "error": "Message not found",
- "code": 3,
- "details": [
- {
- "type": "string"
}
], - "delay": "1s"
}, - "options": {
- "times": 0
}
}Performs a search for a stub by the given conditions
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 |
{- "id": "51c50050-ec27-4dae-a583-a32ca71a1dd5",
- "service": "Gripmock",
- "method": "SayHello",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "data": { }
}{- "headers": {
- "property1": "string",
- "property2": "string"
}, - "data": { },
- "error": "Message not found",
- "code": 3
}Returns detailed matching stages/candidates for a query without consuming stub times.
Inspect criteria including service, method, optional headers/session and input messages
| id | string <uuid> (ID) |
| service required | string |
| method required | string |
| session | string |
object | |
Array of objects |
{- "id": "51c50050-ec27-4dae-a583-a32ca71a1dd5",
- "service": "string",
- "method": "string",
- "session": "string",
- "headers": { },
- "input": [
- { }
]
}{- "service": "string",
- "method": "string",
- "session": "string",
- "matchedStubId": "string",
- "similarStubId": "string",
- "fallbackToMethod": true,
- "error": "string",
- "stages": [
- {
- "name": "string",
- "before": 0,
- "after": 0,
- "removed": 0
}
], - "candidates": [
- {
- "id": "string",
- "service": "string",
- "method": "string",
- "session": "string",
- "priority": 0,
- "times": 0,
- "used": 0,
- "specificity": 0,
- "score": 0.1,
- "visibleBySession": true,
- "withinTimes": true,
- "headersMatched": true,
- "inputMatched": true,
- "matched": true,
- "excludedBy": [
- "string"
], - "events": [
- {
- "stage": "string",
- "result": "string",
- "reason": "string"
}
]
}
]
}Asserts that a method was called a specified number of times
| service required | string |
| method required | string |
| expectedCount required | integer >= 0 |
{- "service": "string",
- "method": "string",
- "expectedCount": 0
}{- "message": "string",
- "time": "2019-08-24T14:15:22Z"
}Accepts binary Protocol Buffers FileDescriptorSet. Registers descriptors for dynamic service discovery. Returns service IDs for later removal via DELETE /services/{serviceID}.
{- "message": "string",
- "time": "2019-08-24T14:15:22Z",
- "serviceIDs": [
- "string"
]
}Returns MCP server metadata, supported protocol versions and transport details.
{- "protocolVersion": "2024-11-05",
- "serverName": "gripmock",
- "serverVersion": "3.7.1",
- "transport": {
- "path": "/api/mcp",
- "methods": [
- "GET",
- "POST"
]
}, - "methods": [
- "initialize",
- "ping",
- "tools/list",
- "tools/call"
], - "tools": [
- {
- "name": "stubs.upsert",
- "description": "Create or update one or many stubs",
- "inputSchema": {
- "type": "object",
- "required": [
- "stubs"
], - "properties": {
- "stubs": {
- "oneOf": [
- {
- "type": "object"
}, - {
- "type": "array"
}
]
}
}
}
}, - {
- "name": "schema.stub",
- "description": "Return JSON Schema URL for stubs payload",
- "inputSchema": {
- "type": "object"
}
}
]
}Accepts MCP JSON-RPC requests (initialize, ping, tools/list, tools/call) and returns JSON-RPC responses.
| jsonrpc required | string |
(string or null) or (integer or null) (McpID) | |
| method required | string |
object |
{- "jsonrpc": "2.0",
- "id": 10,
- "method": "tools/call",
- "params": {
- "name": "stubs.upsert",
- "arguments": {
- "stubs": {
- "service": "unitconverter.v1.UnitConversionService",
- "method": "ConvertWeight",
- "input": {
- "equals": {
- "value": 1,
- "from_unit": "POUNDS",
- "to_unit": "KILOGRAMS"
}
}, - "output": {
- "data": {
- "converted_value": 0.453592
}
}
}
}
}
}{- "jsonrpc": "2.0",
- "id": 10,
- "result": {
- "content": [
- {
- "type": "text",
- "text": "OK"
}
], - "structuredContent": {
- "ids": [
- "fc800277-9bbb-4e0b-988e-4cf01b525085"
]
}, - "isError": false
}
}