import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.roles.list({});
for await (const page of result) {
console.log(page);
}
}
run();{
"data": [
{
"id": "role_0L6WO1vEdPlXy",
"type": "roles",
"attributes": {
"name": "collaborator"
}
}
],
"meta": {}
}Returns a list of all roles that can be assigned to users
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.roles.list({});
for await (const page of result) {
console.log(page);
}
}
run();{
"data": [
{
"id": "role_0L6WO1vEdPlXy",
"type": "roles",
"attributes": {
"name": "collaborator"
}
}
],
"meta": {}
}Number of items to return per page
x >= 1Page number to return (starts at 1)
x >= 1Success
Show child attributes
Was this page helpful?