Hey team, is it possible to set up some automations that receives an email address and invite that email address to a prefect tenant? We are trying to build a self-service platform where stakeholders can request prefect accounts by themselves.
Shaoyi Zhang
10/11/2021, 11:11 PM
I was trying the GraphQL query below to get existing members, but not sure how the POST request for adding new members would look like
Copy code
{
tenant(where: {id: {_eq: "xxxxxxxxxxxxxx"}}) {
id
name
memberships {
id
}
}
}
z
Zach Angell
10/11/2021, 11:25 PM
For querying for existing members, there's a special query:
mutation ($input: create_membership_invitation_input!) {
create_membership_invitation(input: $input) {
id
}
}
where input is something like
Copy code
{
"input": {
"email": "<mailto:zach+1@prefect.io|zach+1@prefect.io>",
"role": "USER",
"role_id": <optionally pass the id of the role for the new user>,
"tenant_id": <optional, inferred from api key>
}
}
s
Shaoyi Zhang
10/11/2021, 11:33 PM
Thank you for the thorough reply. I’ll give it a shot!
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.