Runnable Endpoint

The <RunnableEndpoint> component enables users to make real HTTP requests to your APIs directly in the API Reference. It auto-detects endpoint definitions from your API specification and provides a request builder with inputs for headers, path parameters, query parameters, and request bodies.

Runnable Endpoint component example

Features

The Runnable Endpoint supports:

  • Multiple examples – When your endpoint has multiple pre-configured examples, the component displays a dropdown selector in the header so users can switch between different examples
  • Multiple environments – If your API defines multiple environments (production, staging, development), the component automatically displays an environment selector so users can test against different base URLs
  • API Reference integration – Each Runnable Endpoint includes a button that links users to the full API reference documentation for the endpoint
  • Real-time response preview – Users can view response status, headers, body, and response time immediately after sending requests
  • Form persistence – Form inputs are automatically persisted in the browser’s local storage, so users’ test data is preserved even when navigating between pages or refreshing the browser

Properties

endpoint
string

The endpoint locator in the format “METHOD /path”. For example: "POST /api/users" or "GET /api/users/{id}".

example
string

Pre-fill the form with a specific example by name. If not specified, the first example is used by default.

className
string

CSS class name for custom styling of the component container.