0

List enrolled Beta programs

by
Published Oct 17, 2025

Display all enrolled Beta Programs for your Account. Includes inactive as well as active Beta Programs. Only unrestricted Users can access this operation. > --- - __CLI__. ``` linode-cli betas enrolled ``` [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli) - __OAuth scopes__. ``` account:read_only ``` [Learn more...](https://techdocs.akamai.com/linode-api/reference/get-started#oauth)

Script linode Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Linode = {
3
  token: string;
4
};
5
/**
6
 * List enrolled Beta programs
7
 * Display all enrolled Beta Programs for your Account. Includes inactive as well as active Beta Programs.
8

9
Only unrestricted Users can access this operation.
10

11

12
>
13

14
---
15

16

17
- __CLI__.
18

19
    ```
20
    linode-cli betas enrolled
21
    ```
22

23
    [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)
24

25
- __OAuth scopes__.
26

27
    ```
28
    account:read_only
29
    ```
30

31
    [Learn more...](https://techdocs.akamai.com/linode-api/reference/get-started#oauth)
32
 */
33
export async function main(
34
  auth: Linode,
35
  apiVersion: "v4" | "v4beta",
36
  page: string | undefined,
37
  page_size: string | undefined,
38
) {
39
  const url = new URL(`https://api.linode.com/${apiVersion}/account/betas`);
40
  for (const [k, v] of [
41
    ["page", page],
42
    ["page_size", page_size],
43
  ]) {
44
    if (v !== undefined && v !== "" && k !== undefined) {
45
      url.searchParams.append(k, v);
46
    }
47
  }
48
  const response = await fetch(url, {
49
    method: "GET",
50
    headers: {
51
      Authorization: "Bearer " + auth.token,
52
    },
53
    body: undefined,
54
  });
55
  if (!response.ok) {
56
    const text = await response.text();
57
    throw new Error(`${response.status} ${text}`);
58
  }
59
  return await response.json();
60
}
61