API Management inside the editor
The API Management widget allows users to efficiently define, configure, and manage API endpoints within their projects. It offers a structured way to input and manage essential information for request and response parameters, ensuring comprehensive API setup.
How to Add and Configure the API Management Widget
1
Insert the widget
Insert the Widget: To insert the API Management Widget, navigate to the desired section in your documentation. Type / to bring up the widget menu and select API Management.
2
Confgiure API
Configure the HTTP Method: Click on the method dropdown in the widget’s header to select an HTTP method (e.g., POST, PUT, PATCH, DELETE). Define the Endpoint Path: Enter the endpoint path next to the HTTP method, which will be appended to the base URL. Press the Save Changes button or hit Enter to save.
Detail Request Specifications:
- Headers: Add headers such as content type or authorization tokens.
- Parameters: Input query parameters or path variables required by the endpoint.
- Body: For methods like POST or PUT, specify the request body structure.
Form and Code Views: Switch between:
- Form View: A user-friendly interface for entering request details.
- Code View: For scripting or pasting raw data.
Configuring the Response
- Add the Response Widget: Navigate to the Response tab within the API Management widget. Click the "Add Response" button, which will trigger the response widget to appear.
- Add Response Codes: By default, a 200 OK response is included. Add other response codes by clicking the + icon.
- Detail the Response:
- Form View: Add descriptions and structure the returned data.
- Code View: Paste in JSON or other formatted responses, and the widget will parse them for easy reading.
- Multiple Responses: Document responses for various status codes (e.g., 200 OK, 400 Bad Request, 500 Internal Server Error) to cover different API outcomes.
Additional Configuration Options
- Parameter Properties: Click the icon in the right corner of each parameter to trigger a modal for adding extra properties.
- Required Parameters: Mark parameters as required using a asterisk icon.
- Parameter Actions: Use the three-dot menu to delete or duplicate parameters.
- Ask AI: Use AI to suggest descriptions for each parameter by clicking the "Ask AI" button in the description field.
- Code Beautify: Use the beautify button to format code in code view.
- Full Screen Mode: Use the full-screen option in the header to manage endpoints more easily.
- More Actions Menu: The three-dot menu includes options to delete the entire API management section or hide descriptions for request and response parameters in the published view.
If you prefer a cleaner look, use the three-dot menu to hide the description column on the left. This can make the published documentation appear more streamlined.
Video Guide on how API Management widget works
On this page
- API Management inside the editor