Documentation

Video tutorial!

What is Mock Maker?

Mock Maker is a tool designed to help developers create mockable APIs quickly and easily. It solves the problem of needing to test and develop against APIs that may not yet be available or fully developed. With Mock Maker, you can simulate API responses and create various scenarios to ensure your application behaves as expected under different conditions.

How You Can Use Mock Maker (SECRET)

To use Mock Maker, you need to obtain an SECRET. This key authenticates your requests and allows you to access the features of Mock Maker. Heres how you can get started:

  1. Sign up for an account on the Mock Maker website.
  2. Navigate to your account settings to find your SECRET.
  3. Use the SECRET in your requests to authenticate with Mock Maker.

Example of using the SECRET in a request:


fetch('https://api.mockmaker.com/YOU_ENDPOINT', {
    method: 'GET',
    headers: {
        'scenario': 'YOUR_SCENARIO',
        'secret': 'YOUR_SECRET',
        'team_identification': 'THE_TEAM_THAT_ENDPOINT_IS_ASSOCIATED'
    }
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
                        

Team Section

The Team section allows you to manage your team members and their permissions. You can add new members, assign roles, and control access to different parts of Mock Maker. This is particularly useful for collaborative projects where multiple developers need to work with mock APIs.

Features of the Team section:

  • Add Members: Invite new members to your team by sending an email invitation.
  • Assign Roles: Assign roles such as Admin, Developer, or Viewer to control access levels.
  • Visibility: All team members can view your endpoints.

Partner Section

The Partner section is designed for managing partnerships with other organizations or teams. This section allows you to share your mock APIs with partners, collaborate on shared projects, and manage access permissions. It is ideal for scenarios where you need to integrate with external teams or clients.

Features of the Partner section:

  • Share APIs: Share specific mock APIs with partners for collaboration.
  • Manage Access: Control which partners have access to your APIs and what they can do with them.
  • Collaboration Tools: Use built-in tools to collaborate on API development and testing.

Endpoint Scenario

The Endpoint Scenario feature allows you to create and manage different scenarios for your mock APIs. This is useful for testing how your application responds to various conditions, such as different types of data, error states, and performance issues.

How to use Endpoint Scenarios:

  • Create Scenarios: Define different scenarios for your endpoints, such as success responses, error responses, and timeouts.
  • Configure Responses: Customize the responses for each scenario, including the status code, headers, and body.
  • Test and Debug: Use these scenarios to test and debug your application, ensuring it handles all possible API responses correctly.