0

Edit organization annotations group

by
Published Oct 17, 2025

Edit organization annotations group

Script qovery Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Edit organization annotations group
4
 * Edit organization annotations group
5
 */
6
export async function main(
7
	auth: RT.Qovery,
8
	organizationId: string,
9
	annotationsGroupId: string,
10
	body: Body
11
) {
12
	const url = new URL(
13
		`https://api.qovery.com/organization/${organizationId}/annotationsGroups/${annotationsGroupId}`
14
	)
15

16
	const response = await fetch(url, {
17
		method: 'PUT',
18
		headers: {
19
			'Content-Type': 'application/json',
20
			Authorization: 'Token ' + auth.apiKey
21
		},
22
		body: JSON.stringify(body)
23
	})
24
	if (!response.ok) {
25
		const text = await response.text()
26
		throw new Error(`${response.status} ${text}`)
27
	}
28
	return await response.json()
29
}
30

31
/* eslint-disable */
32
/**
33
 * This file was automatically generated by json-schema-to-typescript.
34
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
35
 * and run json-schema-to-typescript to regenerate this file.
36
 */
37

38
export interface Body {
39
	/**
40
	 * name of the annotations group
41
	 */
42
	name: string
43
	annotations: {
44
		key: string
45
		value: string
46
		[k: string]: unknown
47
	}[]
48
	scopes: (
49
		| 'DEPLOYMENTS'
50
		| 'STATEFUL_SETS'
51
		| 'SERVICES'
52
		| 'INGRESS'
53
		| 'HPA'
54
		| 'PODS'
55
		| 'SECRETS'
56
		| 'JOBS'
57
		| 'CRON_JOBS'
58
	)[]
59
	[k: string]: unknown
60
}
61