API Explorer in Martini
Introduction
The API Explorer provides a visual and interactive platform to learn and interact with RESTful APIs in Martini. It displays OpenAPI definitions for all REST APIs, enabling users to interact with endpoints and observe their responses to various inputs.
Features
- Interactive Documentation: Documentation is dynamically generated based on OpenAPI specifications for ease of use.
- User-Friendly Interface: Offers a graphical interface for interacting with REST endpoints, enhancing user experience.
- Simplified Setup: Martini automatically generates the necessary API specifications, eliminating the need for additional configuration.
Accessing API Explorer
-
Direct Access:
- Open a browser and visit
/api-explorer
.
- Open a browser and visit
-
Via the IDE:
- Right-click the Martini instance in Navigator > Open API Explorer.
- Choose the user type for accessing API Explorer.
User Types
- Active User: Access as the currently logged-in Lonti user account.
- Lonti User: Access as a specific Lonti user account. Secured REST APIs require sufficient privileges.
- Anonymous User: Access without login. Secured REST APIs are hidden.
REST Endpoints
- Endpoint List: Available REST endpoints are listed on the left panel, grouped by tags.
- Default Specification: Shows endpoints for managing Martini and annotated Groovy services.
- Custom Specifications: Select other user-defined APIs from the top of the page.
Endpoint Details
- Description: Top section provides a summary of the endpoint.
- Parameters:
- Lists supported request parameters.
- Includes a
Try it out!
button to test the endpoint. - Responses:
- Describes possible HTTP responses with examples.
- Shows actual response details if a request is made.
Authentication
- Secured REST APIs: Some APIs require access privileges.
- User Login: Choose to log in with a Lonti user account to access secured endpoints.
- Credential Change: Use
Change Credentials
orLogin
button to switch users.
Notes
Appending the path /api-explorer
to your Martini Runtime domain name or IP address will display API Explorer in your web browser.