Number of APIs: 7
GET {{baseUrl}}/mocks/{{mockId}}
Gets information about a mock server.
POST {{baseUrl}}/mocks
Creates a mock server in a collection. Include a You can include the following optional properties in the request body: Note: You cannot create mocks for collections added to an API definition.mock
object in the request body that contains following properties:
collection
— A string value that contains the collection UID.
environment
— A string value that contains the environment UID to associate with the mock server.name
— A string value that contains the the mock server's name.private
— A boolean value that, if true, sets the mock server as private. By default, mock servers are public and can receive requests from anyone and anywhere.
GET {{baseUrl}}/mocks
Gets all mock servers. By default, this endpoint returns only mock servers you created across all workspaces. Note: If you pass both the teamId
and workspace
query parameters, this endpoint only accepts the workspace
query.
DELETE {{baseUrl}}/mocks/{{mockId}}
Deletes a mock server.
DELETE {{baseUrl}}/mocks/{{mockId}}/unpublish
Unpublishes a mock server. Unpublishing a mock server sets its Access Control configuration setting to private.
POST {{baseUrl}}/mocks/{{mockId}}/publish
Publishes a mock server. Publishing a mock server sets its Access Control configuration setting to public.
PUT {{baseUrl}}/mocks/{{mockId}}
Updates a mock server. Include the mock
object in the request body with one or more of the following properties:
name
— A string value that contains the mock server's name.environment
— A string value that contains the environment UID.private
— A boolean value that, if true, sets the mock server as private. By default, mock servers are public and can receive requests from anyone and anywhere.versionTag
— A string value that contains the API's version tag ID.config
— An object that contains the following properties:
serverResponseId
— A string value that contains the server response ID. This sets the given server response as the default response for each request.
ENDPOINTS