apic docs
  • About APIC
  • Installing APIC
  • Getting started with APIC
  • Designer
    • Getting Started With APIC designer
    • Working with API project
    • Creating a Folder
    • Creating a Model or Definitions
    • Creating a Trait
    • Creating an Endpoint
    • Write API Tests starting from Design Phase
    • API Security Definitions
    • Export and view Docs
  • Tester
    • Make an API call
    • Sending Forbidden request headers with APIC
    • Viewing API Response
    • Managing Environments
    • Using Environments
    • Using the Test Builder
    • Writing Test Cases
    • Response Schema validation
    • Creating Test Suites
    • Test Websocket
  • Test Real User Sessions
  • APIC Command line interface (apic-cli)
  • APIC Web Agent (apic-cli)
  • APIC CI/CD Integration (with Jenkins)
  • API Documentation
  • Simulator
  • Dashboard
    • Team Management
    • Published Docs
  • Sharing
Powered by GitBook
On this page

Was this helpful?

Simulator

PreviousAPI DocumentationNextDashboard

Last updated 5 years ago

Was this helpful?

APIC's API simulator allows you to simulate your API responses based on the API design you have defined. You can simulate response for any status type you wish for; for example 200 (ok), 404 (Not found) or 500 (Internal server error). Know more about the API Simulator here.

You can enable simulation for an API design project from the Designer section. To enable simulation for a project go to , open the required API project by clicking on it and scroll down to the Mocked Response section at the bottom of the page. Click on the Enable Mocked Response button to enable API simulation for the selected project.

Once the API simulation is enabled you will get a simulation key (simKey) which you can use to simulate you API. You can mock your API endpoint at http://myapic.com/mock/{simkey}/{api-endpoint}?statusCode={statuscode}, where

  • simKey is the key you get when you enable mocked response

  • api-denpoint is the path of your API

  • statuscode is the HTTP StatusCode value for which you want to simulate the response. For example 200 (Ok), 400 (Bad Request) or 500 (Internal serve error)

Click on the Run button beside an endpoint to open it in API's API tester and view the response.

Designer Module