/v1/mock-apis
get
post
Create a new mock API
get /v1/mock-apis
HTTP status code 200
List of all my mock APIs
Body
Type: application/json
Example:
{
"mockApis": [
{
"id": "414w8dwr",
"name": "My first mock API",
"domains": ["414w8dwr.wiremockapi.cloud", "my-custom-hostname.wiremockapi.cloud"],
"ownerId": "lw5r75vd"
},
{
"id": "ndzew",
"name": "Number two API",
"domains": ["ndzew.wiremockapi.cloud"],
"ownerId": "lw5r75vd"
}
]
}
post /v1/mock-apis
Create a new mock API
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 256
},
"hostname": {
"type": "string",
"pattern": "^[a-z0-9\\-]*$",
"maxLength": 256
}
},
"required": [
"name"
]
}
Example:
{
"name": "My first mock API",
"hostname": "my-custom-hostname"
}
HTTP status code 201
New mock API created
Body
Type: application/json
Example:
{
"id": "414w8dwr",
"name": "My first mock API",
"domains": ["414w8dwr.wiremockapi.cloud", "my-custom-hostname.wiremockapi.cloud"],
"ownerId": "lw5r75vd"
}
/v1/mock-apis/{apiId}
get
delete
get /v1/mock-apis/{apiId}
get
Get all collaborators for a mock API
post
Add a new collaborator to a mock API
get /v1/mock-apis/{apiId}/collaborators
Get all collaborators for a mock API
URI Parameters
- apiId: required (string)
HTTP status code 200
All collaborators for a single mock API
Body
Type: application/json
Example:
{
"mockApiCollaborators": [
{
"id": "vnldx",
"mockApiId": "9p84x",
"userId": "87dkb",
"username": "user-one"
},
{
"id": "1nwen",
"mockApiId": "9p84x",
"userId": "mnmex",
"username": "user-two"
}
]
}
post /v1/mock-apis/{apiId}/collaborators
Add a new collaborator to a mock API
URI Parameters
- apiId: required (string)
Body
Type: application/json
Example:
{
"mockApiCollaborator": {
"username": "new-user-three"
}
}
HTTP status code 201
New collaborator added
Body
Type: application/json
Example:
{
"mockApiCollaborator": {
"id": "gxzlp",
"mockApiId": "9p84x",
"userId": "nl9dn",
"username": "new-user-three"
}
}
HTTP status code 403
The authenticated user is not allowed to perform this operation on this API
HTTP status code 404
The mock API was not found
HTTP status code 422
User does not exist or is already a collaborator on this API
delete
Delete a collaborator from a mock API