Playground Overview
/api/v1/demo
curl --request GET \
--url https://server.mintlify.com/api/v1/demo \
--header 'Authorization: Bearer <token>'
The message to be used in the query
{
"success": true,
"message": "Hello world"
}
Introduction
The API playground is an interactive environment to make requests and preview an API endpoint.
To create an API page, you must set an api
or openapi
property in the page metadata. See Configuration for more details.
If using a folder to store your api pages, you cannot use api
for the name
of the folder unless it is nested inside another folder. Folder names such as
api-reference
are accepted.
Defining API Parameters
See our components reference for all components you can use to improve your API docs. We will automatically generate all parameter components if you are using OpenAPI.
Playground Settings
In mint.json
, add the following properties:
Configuration for API settings. Learn more about API pages at API Components.
A string or an array of strings of URL(s) or relative path(s) pointing to your OpenAPI file.
Examples:
"openapi": "https://example.com/openapi.json"
The playground settings can be configured in mint.json
with a set of different “modes”.
curl --request GET \
--url https://server.mintlify.com/api/v1/demo \
--header 'Authorization: Bearer <token>'
{
"success": true,
"message": "Hello world"
}