Feature Request
Description:
Provide a comprehensive set of API endpoints for all CRUD operations on materialized view definitions and for reporting on their refresh runs. Use mount to mount api's similar to UI mounts
Use Case:
Allows programmatic management and monitoring of the system, enabling integration with other tools, custom dashboards, or CI/CD pipelines.
Proposed Solution:
- Create a set of RESTful API endpoints under an
/mat_views/api/v1 namespace.
- Endpoints for
GET, POST, PUT, DELETE on /mat_views/api/v1/mat_views.
- Endpoint for
GET on /mat_views/api/v1/mat_views/:id/runs.
- Secure the API with a token-based authentication strategy.
RSpec Tests:
- Write request specs for all endpoints:
GET /mat_views/api/v1/mat_views: Test it returns a list of views.
POST /mat_views/api/v1/mat_views: Test it creates a new view with valid data and returns errors for invalid data.
PUT /mat_views/api/v1/mat_views/:id: Test it updates a view.
DELETE /mat_views/api/v1/mat_views/:id: Test it deletes a view.
GET /mat_views/api/v1/mat_views/:id/runs: Test it returns a list of refresh runs for the specified view.
- Test that unauthenticated requests are rejected.
Checklist:
Feature Request
Description:
Provide a comprehensive set of API endpoints for all CRUD operations on materialized view definitions and for reporting on their refresh runs. Use mount to mount api's similar to UI mounts
Use Case:
Allows programmatic management and monitoring of the system, enabling integration with other tools, custom dashboards, or CI/CD pipelines.
Proposed Solution:
/mat_views/api/v1namespace.GET, POST, PUT, DELETEon/mat_views/api/v1/mat_views.GETon/mat_views/api/v1/mat_views/:id/runs.RSpec Tests:
GET /mat_views/api/v1/mat_views: Test it returns a list of views.POST /mat_views/api/v1/mat_views: Test it creates a new view with valid data and returns errors for invalid data.PUT /mat_views/api/v1/mat_views/:id: Test it updates a view.DELETE /mat_views/api/v1/mat_views/:id: Test it deletes a view.GET /mat_views/api/v1/mat_views/:id/runs: Test it returns a list of refresh runs for the specified view.Checklist: