Closed mansonliwh closed 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.
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?
[ ☑️ ] Add screenshots for manual tests if appropriate
[ ☑️ ] Run test locally before making a pull request