Skip to content

Implement full CRUD and reporting API for mat views and runs #40

@niteshpurohit

Description

@niteshpurohit

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:

  • I have searched for a similar feature request and didn't find any duplicates.
  • I have included all the required information.
  • I have tagged the issue with the label "enhancement".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions