Mock management

Create Mock

POST /api/mimock/v1/mocks

Creates a mock as per the given data in multi-part form.

ColumnTypeDescription
namestring (required)Uniquely identifiable name for the mimock
descriptionstring (required)Custom Description of the Mock
routestring (required)Route of the mock
httpMethodstring (required)Name of the HTTP Method
statusCodeinteger($int32)(required)Expected status code of the mock
responseContentTypestringName of the Response Content Type
queryParamsstringAssociated query params of the mock
requestHeaderstringRequest headers for the mock
shouldDoExactHeaderMatchingbooleanDecides whether request headers need to be matched strictly or loosely
responseHeadersstringResponse headers to be sent after invoking the mock endpoint
requestBodystringRequest body for the mock
requestBodyTypestringRequest body type
expectedTextResponsestringRepresents the expected textual response
binaryFilestring($binary)Binary file
headerMatchingSetToStrictbooleanHeaders 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.

ColumnTypeDescription
mockIdstring (required)Unique mock identifier
namestring (required)Uniquely identifiable name for the mimock
descriptionstring (required)Custom Description of the Mock
routestring (required)Route of the mock
httpMethodstring (required)Name of the HTTP Method
statusCodeinteger($int32)(required)Expected status code of the mock
responseContentTypestringName of the Response Content Type
queryParamsstringAssociated query params of the mock
requestHeaderstringRequest headers for the mock
shouldDoExactHeaderMatchingbooleanDecides whether request headers need to be matched strictly or loosely
responseHeadersstringResponse headers to be sent after invoking the mock endpoint
requestBodystringRequest body for the mock
requestBodyTypestringRequest body type
expectedTextResponsestringRepresents the expected textual response
binaryFilestring($binary)Binary file
headerMatchingSetToStrictbooleanHeaders 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.