GripMock API Schema (3.0.0)

Download OpenAPI specification:

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)

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": {
    }
}

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
[
  • {
    }
]

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"
}