Hey community. I was hoping someone could help with a way to generate API Keys from a single admin account? As part of our deployment, we're trying to limit the number of manual steps and would like to be able to create API Keys for our Service Accounts using an automated script. Is this possible? (We're using Prefect Cloud) Thanks in advance for the help.
a
Anna Geller
01/31/2022, 1:58 PM
You would need to use GraphQL mutation called
create_api_key
for this, it’s definitely possible. If you can’t figure out the mutation syntax, LMK and we can certainly help
t
Tim Wright
01/31/2022, 2:01 PM
Thanks Anna - I was messing around with that at the end of last week tryin to query
users
without much luck. Just a few minutes ago I was able to find the
user_view_same_tenant
which appears to return the SA user information. From there it was pretty straightforward using
create_api_key
. Thanks for the super fast response.
👍 1
a
Anna Geller
01/31/2022, 2:30 PM
nice work figuring that out with the query, GraphQL inputs can be challenging sometimes
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.