https://prefect.io logo
Title
b

Blake List

08/23/2021, 1:04 AM
Hi there, is it possible to remove a tenant from the UI through the UI or CLI?
n

nicholas

08/23/2021, 2:46 PM
Hi @Blake List - are you using Prefect Server or Prefect Cloud?
b

Blake List

08/23/2021, 9:30 PM
Hi @nicholas, I am using Prefect Server
n

nicholas

08/23/2021, 10:36 PM
Got it @Blake List - in which case you should be able to run this from the InteractiveAPI:
mutation {
  delete_tenant(input: {tenant_id: "<<>>", confirm:true}) {
    success
    error
  }
}
replacing the
<<>>
with the if of the tenant you're trying to remove
🙌 1
b

Blake List

08/24/2021, 11:39 PM
@nicholas Any idea how to get the tenant_id?
n

nicholas

08/25/2021, 12:17 AM
Sure, you can query for it in the interactive api like this:
query {
  tenant { 
    id
    name
  }
}
b

Blake List

08/25/2021, 12:24 AM
Is there a way to list the names of the tenants also?
n

nicholas

08/25/2021, 12:25 AM
sure, just add
name
to that query (i've added it)
b

Blake List

08/25/2021, 12:25 AM
Ah great I see how it all works now. Thank you very much!!
n

nicholas

08/25/2021, 12:27 AM
Happy to help!