Got the error "Unauthorized" when making REST API call to Ververica Platform endpoint
Issue
In certain scenarios, REST API calls to the Ververica Platform are rejected with an "Unauthorized" response when the endpoint URL ends with a forward slash ("/").
Note: Assuming you have provided the correct credentials.
Environment
- Ververica Platform 2.0 or later.
Resolution
Remove the forward slash ("/") at the end of the URL (after the "deployments" keyword).
curl -X POST <VVP_BASE_URL>/api/v1/namespaces/default/deployments
# Ex:
curl -X POST https://vvp.com/api/v1/namespaces/default/deployments
Cause
The "Unauthorized" response is returned specifically when the endpoint URL ends with a forward slash ("/").
Example of problematic URL:
curl -X POST <VVP_BASE_URL>/api/v1/namespaces/default/deployments/
# Ex:
curl -X POST https://vvp.com/api/v1/namespaces/default/deployments/