apache / amoro

Apache Amoro (incubating) is a Lakehouse management system built on open data lake formats.
https://amoro.apache.org/
Apache License 2.0
875 stars 291 forks source link

[AMORO-3038] Unify the API set for dashboard and open API #3244

Closed mansonliwh closed 1 month ago

mansonliwh commented 1 month ago

Why are the changes needed?

Close #3038.

Brief change log

Unify the API set for both dashboard and Open API in the same url [ /api/ams/v1 ].

Previously, frontend requests and external interface requests were distinguished by using the paths ams/v1 and api/ams/v1 respectively. Frontend requests required cookie validation for login status, while external interface requests needed to pass an apikey parameter for verification. In this design, the request paths from both sources are unified to api/ams/v1. For frontend requests, an additional header parameter X-Request-Source: frontend will be included. This allows the source of the request to be distinguished and routed to different validation logic accordingly.

How was this patch tested?

mansonliwh commented 1 month ago

Thank you for your contribution. Do we have any relevant documents. should we introduce Swagger and related SDK in other PR?

After merging, I will continue to improve this part of the functionality in a new PR.