//native
/**
* List all clusters statuses
* Returns a list of clusters with only their id and status.
*/
export async function main(auth: RT.Qovery, organizationId: string) {
const url = new URL(`https://api.qovery.com/organization/${organizationId}/cluster/status`)
const response = await fetch(url, {
method: 'GET',
headers: {
Authorization: 'Token ' + auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
Submitted by hugo697 235 days ago