Download OpenAPI specification:Download
Documentation and API specification GripMock.
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
}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
}
}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"
}