Is it possible to restrict api key to specific branch only?
I mean, to have a single API key that I can use for
main
branch that I can have in vercel prod env for example, and 2nd api key, that can be used for all branches, except main
? So while trying to push changes, query etc. from main
I will get the error?2 Replies
Hi, currently API keys have full read/write access to the entire "user space", meaning all workspaces and branches that a user has access to. We'working on branch-level API keys and we anticipate to have those before the end of the year. Until then, the only way to separate the access that different API keys have is by creating different Xata users with access to separate workspaces.
Feel free to upvote the relevant enhancement request here: https://feedback.xata.io/feature-requests/p/scoped-and-read-only-api-keys Although it's already planned, quantifying interest helps with bumping priority.
Great. Voted. Thanks for the info. Will be waiting for this update.