//native
/**
* Get details for list fields
* 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.
*/
export async function main(auth: RT.BambooHr, AcceptHeaderParameter?: string) {
const url = new URL(`https://${auth.companyDomain}.bamboohr.com/api/v1/meta/lists`)
const response = await fetch(url, {
method: 'GET',
headers: {
...(AcceptHeaderParameter ? { AcceptHeaderParameter: AcceptHeaderParameter } : {}),
Authorization: 'Basic ' + btoa(`${auth.apiKey}:x`)
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
Submitted by hugo697 235 days ago