Mock management
Create Mock
POST /api/mimock/v1/mocks
Creates a mock as per the given data in multi-part form.
Column | Type | Description |
---|---|---|
name | string (required) | Uniquely identifiable name for the mimock |
description | string (required) | Custom Description of the Mock |
route | string (required) | Route of the mock |
httpMethod | string (required) | Name of the HTTP Method |
statusCode | integer($int32)(required) | Expected status code of the mock |
responseContentType | string | Name of the Response Content Type |
queryParams | string | Associated query params of the mock |
requestHeader | string | Request headers for the mock |
shouldDoExactHeaderMatching | boolean | Decides whether request headers need to be matched strictly or loosely |
responseHeaders | string | Response headers to be sent after invoking the mock endpoint |
requestBody | string | Request body for the mock |
requestBodyType | string | Request body type |
expectedTextResponse | string | Represents the expected textual response |
binaryFile | string($binary) | Binary file |
headerMatchingSetToStrict | boolean | Headers match exact or not |
Update Mock
PUT /api/mimock/v1/mocks/{mockId}
Updates mock for the given mockId using the data in multi-part form.
Column | Type | Description |
---|---|---|
mockId | string (required) | Unique mock identifier |
name | string (required) | Uniquely identifiable name for the mimock |
description | string (required) | Custom Description of the Mock |
route | string (required) | Route of the mock |
httpMethod | string (required) | Name of the HTTP Method |
statusCode | integer($int32)(required) | Expected status code of the mock |
responseContentType | string | Name of the Response Content Type |
queryParams | string | Associated query params of the mock |
requestHeader | string | Request headers for the mock |
shouldDoExactHeaderMatching | boolean | Decides whether request headers need to be matched strictly or loosely |
responseHeaders | string | Response headers to be sent after invoking the mock endpoint |
requestBody | string | Request body for the mock |
requestBodyType | string | Request body type |
expectedTextResponse | string | Represents the expected textual response |
binaryFile | string($binary) | Binary file |
headerMatchingSetToStrict | boolean | Headers match exact or not |
Get Mock
GET /api/mimock/v1/mocks/{mockId}
Get mock based on the given mockId.
Delete Mock
DELETE /api/mimock/v1/mocks/{mockId}
Performs soft delete on mock based on the given mockId.
Delete Mocks
DELETE /api/mimock/v1/mocks
Delete all mocks in the mimock platform.
Force delete mock
DELETE /api/mimock/v1/mocks/{mockId}:forceDelete
Performs hard delete on mock based on the given mockId.
List Mocks
GET /api/mimock/v1/mocks
Returns all mocks in the mimock platform.
List Mocks as Pageable
GET /api/mimock/v1/mocks/filter
List all mocks in pageable format and filter based on the filter if provided.
Archive Mock
POST /api/mimock/v1/mocks/{mockId}:archive
Archives a mock based on the given mockId.
Unarchive Mock
POST /api/mimock/v1/mocks/{mockId}:unarchive
Unarchives a mock based on the given mockId.
Export Mocks
GET /api/mimock/v1/mocks/csv/export
Exports the mocks in CSV file format.
Export Mock CSV template
GET /api/mimock/v1/mocks/csv/template/export
Exports the mock template CSV file which can used while import operation.