Authentication fails when trying to get Usage data from REST API

When trying to get Usage data from “/v1/organizations/{organizationId}/usage” REST API using API key of type “API_KEY”, I get the this error:

Error: response status is 403

{
  "code": 7,
  "message": "failed to check permissions to access/modify this resource: user not allowed to call method",
  "details": []
}

I wonder what could be the problem, how can one get the usage data from the REST API?

Hey @afshin,

Some sensitive resources, such as Pipelines, Usage, and Secrets, are not accessible via API keys today. We plan to add support with user-defined permissions soon.

User defined permissions are great!
Looking forward to it.

1 Like