list all available scripts paths

Script windmill Verified

by admin ยท 8/13/2023

The script

Submitted by admin Typescript (fetch-only)
Verified 370 days ago
1
/**
2
 * list all available scripts paths
3
 *
4
 */
5
export async function main(workspace: string) {
6
  const url = new URL(`${BASE_URL}/api/w/${workspace}/scripts/list_paths`);
7

8
  const response = await fetch(url, {
9
    method: "GET",
10
    headers: {
11
      Authorization: "Bearer " + WM_TOKEN,
12
    },
13
    body: undefined,
14
  });
15
  return await response.text();
16
}
17