0

Get cluster current cost

by
Published Oct 17, 2025

Get your cluster cost range. We are unable to give a precise cost of your infrastructure at the moment. But Qovery guarantees that the cost of your cluster will not exceed the max range.

Script qovery Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Get cluster current cost
4
 * Get your cluster cost range. We are unable to give a precise cost of your infrastructure at the moment.
5
But Qovery guarantees that the cost of your cluster will not exceed the max range.
6

7
 */
8
export async function main(auth: RT.Qovery, organizationId: string, clusterId: string) {
9
	const url = new URL(
10
		`https://api.qovery.com/organization/${organizationId}/cluster/${clusterId}/currentCost`
11
	)
12

13
	const response = await fetch(url, {
14
		method: 'GET',
15
		headers: {
16
			Authorization: 'Token ' + auth.apiKey
17
		},
18
		body: undefined
19
	})
20
	if (!response.ok) {
21
		const text = await response.text()
22
		throw new Error(`${response.status} ${text}`)
23
	}
24
	return await response.json()
25
}
26