|
1 | 1 | --- |
2 | | -title: 'Playground' |
3 | | -description: 'Enable users to interact with your API' |
| 2 | +title: 'API Playground' |
| 3 | +description: 'Try out API endpoints directly in the documentation' |
4 | 4 | openapi: 'POST /project/update/{projectId}' |
5 | 5 | hideApiMarker: true |
6 | 6 | icon: 'play' |
7 | 7 | --- |
8 | 8 |
|
9 | | -The API playground is an interactive environment to make requests and preview an API endpoint. |
| 9 | +The API playground lets you test API endpoints right from the documentation without writing any code. Think of it as a built-in Postman that's always ready to go. |
10 | 10 |
|
11 | | -This page is automatically generated from the OpenAPI specification. |
| 11 | +## How It Works |
| 12 | + |
| 13 | +<Steps> |
| 14 | + <Step title="Find an API endpoint"> |
| 15 | + Browse through the documentation to find the API endpoint you want to test. Each endpoint will have an interactive playground section. |
| 16 | + </Step> |
| 17 | + |
| 18 | + <Step title="Fill in the parameters"> |
| 19 | + The playground automatically shows all the required fields you need to fill in: |
| 20 | + - Path parameters (like IDs in the URL) |
| 21 | + - Query parameters |
| 22 | + - Request body fields |
| 23 | + |
| 24 | + <Note> |
| 25 | + Required fields are marked with a red asterisk (*) |
| 26 | + </Note> |
| 27 | + </Step> |
| 28 | + |
| 29 | + <Step title="Send the request"> |
| 30 | + Click the "Try It" button to make a real API call. You'll see: |
| 31 | + - The complete request that was sent |
| 32 | + - The response you got back |
| 33 | + - Response status code |
| 34 | + - Response headers |
| 35 | + </Step> |
| 36 | +</Steps> |
| 37 | + |
| 38 | +## Example Usage |
| 39 | + |
| 40 | +Here's what you'll typically see in the playground: |
| 41 | + |
| 42 | +<Frame> |
| 43 | + <img src="https://mintlify-assets.b-cdn.net/api-playground-example.png" alt="API Playground Example" /> |
| 44 | +</Frame> |
| 45 | + |
| 46 | +<Tip> |
| 47 | + You can switch between different authentication methods and add custom headers if needed. |
| 48 | +</Tip> |
| 49 | + |
| 50 | +## Features |
| 51 | + |
| 52 | +<CardGroup cols={2}> |
| 53 | + <Card title="Authentication Ready" icon="key"> |
| 54 | + Your API key is automatically included when you're logged in. |
| 55 | + </Card> |
| 56 | + |
| 57 | + <Card title="Real-Time Testing" icon="bolt"> |
| 58 | + Get instant responses from the API to verify your parameters. |
| 59 | + </Card> |
| 60 | + |
| 61 | + <Card title="Code Generation" icon="code"> |
| 62 | + See example code snippets in multiple programming languages. |
| 63 | + </Card> |
| 64 | + |
| 65 | + <Card title="Error Handling" icon="bug"> |
| 66 | + Clear error messages help you troubleshoot failed requests. |
| 67 | + </Card> |
| 68 | +</CardGroup> |
| 69 | + |
| 70 | +## Automatic Generation |
| 71 | + |
| 72 | +The playground is automatically generated from our OpenAPI specification, ensuring it's always up to date with the latest API changes. |
| 73 | + |
| 74 | +<Note> |
| 75 | + Can't see the playground for an endpoint? Make sure the endpoint is properly defined in the OpenAPI specification. |
| 76 | +</Note> |
0 commit comments