401 Unauthorized when accessing REST API (rest.runpod.io/v1) despite API key having ALL permissions
Hello,
We're getting a 401 Unauthorized error when using the REST API (rest.runpod.io/v1) to manage serverless endpoints, even though our API key has Read/Write permissions enabled.
What we're trying to do: Update workersMin and workersMax for a serverless endpoint via the REST API Using: PATCH /endpoints/{endpointId} or POST /endpoints/{endpointId}/update
What works: The same API key works with api.runpod.ai/v2 (Serverless API) for submitting jobs API key has "All" or "Read/Write" permissions enabled in the dashboard
Questions: Does rest.runpod.io/v1 require separate permissions from api.runpod.ai? Is REST API access included in the "All" permission level, or does it need explicit enablement? Are there account-tier restrictions for REST API access? Is there a different authentication method for the REST API?
We need to programmatically adjust worker counts for auto-scaling. Any guidance is appreciated.