REST API Plugin for MoBro
Integrate custom metrics into MoBro using a simple REST API.
This plugin allows you to integrate your own custom metrics and data into MoBro to integrate them into your dashboards.
- Metric Management
- Freely register up to 100 new custom metrics
- Update the value of a registered metric at any time
- Fetch registered metrics and check their current value
- Unregister metrics when they are no longer needed
- API Documentation: Built-in Swagger documentation for easy API exploration
- Persistence: Registered metrics can be persisted across plugin restarts
- Install the REST API plugin in MoBro.
- Configure the plugin settings (Port, Swagger support, Persistence).
- Verify that the plugin is running by navigating to http://localhost:8080 (use the configured port) in your browser.
- Register and manage your custom metrics via the provided REST API.
The plugin exposes the following REST API endpoints:
POST /api/v1/metrics
: Register a new metric.GET /api/v1/metrics
: Get all registered metrics.GET /api/v1/metrics/{id}
: Get a specific metric by ID.DELETE /api/v1/metrics/{id}
: Unregister a metric by ID.PUT /api/v1/metrics/{id}/value
: Update the value of a metric by ID.
Detailed API documentation is available via Swagger if enabled in the plugin settings.
The plugin offers the following configurable settings:
Setting | Default | Explanation |
---|---|---|
Port | 8080 | The port to use for the Rest API |
Swagger support | enabled | Whether to enable swagger documentation (http://localhost:8080/swagger) |
Persistence | enabled | Whether to persist registered metrics to make them available across plugin reboots |
This plugin is built using the MoBro Plugin SDK.
Developer documentation is available at developer.mobro.app.