IMPORT & EXPORT
Importing OpenAPI / Swagger

API Try It!

3min

The TRY IT! feature allows you to test your API directly in your browser. It works both on a published doc portal or directly inside the editor.

How to configure

The Try It! feature uses the fetch API, so in order for it to work, your API imports need to have the following:

  • an absolute path URL to your API (not just a path)
    • add in your .yml file an URL as follows
  • servers:
    • url example: https://petstore3.swagger.io/api/v3 (your actual URL)
  • authorization methods will be read from your api file and included in each API page
  • CORS disabled or enabled for the documentation domain, so the users can actually test your API

How it works

1

Import your API files (direct import or github sync)

2

[Optional] Define "default" values in your OpenAPI file. This way, when you import your API all "default" values will be added to the code sample, and you can test your API immediately without the need to manually add values to params.

3

Configure the API method with the test params

Document image

4

After you update the parameters, the code sample on the right(or below, depending on how you set your view) will also update with the test params you added, providing you the code snippet of the request in several languages

Document image

5

Hit the Try it! button and check out the response area, below the sample code

Document image




🤔
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.