0

Get details for list fields

by
Published Oct 17, 2025

This endpoint will return details for all list fields. Lists that can be edited will have the "manageable" attribute set to yes. Lists with the "multiple" attribute set to yes are fields that can have multiple values. Options with the "archived" attribute set to yes should not appear as current options, but are included so that historical data can reference the value.

Script bamboo_hr Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Get details for list fields
4
 * This endpoint will return details for all list fields. Lists that can be edited will have the "manageable" attribute set to yes. Lists with the "multiple" attribute set to yes are fields that can have multiple values. Options with the "archived" attribute set to yes should not appear as current options, but are included so that historical data can reference the value.
5
 */
6
export async function main(auth: RT.BambooHr, AcceptHeaderParameter?: string) {
7
	const url = new URL(`https://${auth.companyDomain}.bamboohr.com/api/v1/meta/lists`)
8

9
	const response = await fetch(url, {
10
		method: 'GET',
11
		headers: {
12
			...(AcceptHeaderParameter ? { AcceptHeaderParameter: AcceptHeaderParameter } : {}),
13
			Authorization: 'Basic ' + btoa(`${auth.apiKey}:x`)
14
		},
15
		body: undefined
16
	})
17
	if (!response.ok) {
18
		const text = await response.text()
19
		throw new Error(`${response.status} ${text}`)
20
	}
21
	return await response.json()
22
}
23