Contact Free trial Login

Test Your API Specification Using the API Console

Studio provides an API Console view and a mocking service for the API you are designing. While the mocking service is enabled, The API Console view returns the HTTP status codes and example payloads that you defined in your API specification.

Simulating calls to your API is a critical design task that helps you troubleshoot problems and demo the API to prospective users even before you implement it. You can simulate calls to the API in the API Console view before publishing a new version of the API specification to Exchange.

Studio’s mocking service does not modify the baseUri field in your API specification when it is enabled.

Prerequisites

  • You must have an API specification project created.

  • Your API specification project must be synchronized with Design Center.

  • You must turn on the mocking service.
    In your Package Explorer view, right-click your API specification project and select Manage API Specification > Turn on Mocking Service.

    turn on mocking service

Steps

  1. Locate the API Console view within the API Design perspective.
    The API Console view displays:

    • A summary of your API specification

    • All the available endpoints and their allowed HTTP methods

    • A list of all the types defined in your API specification

  2. Navigate through the Endpoints section, click the HTTP method that you want to test, and click Try It to simulate calls to an API.
    Your expanded API Console view shows the mocking service to the right of the console. Request URL is populated with your selected API endpoint.

    • The Request URL field is populated with your selected API endpoint.

    • Use Query Parameters if you need to add specific parameters to your request.

  3. Click Send to send your test request.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub