Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Dashboard API > Organization role

List organization roles

Warning: Experimental API

Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

Returns

Returns an array of resource objects of type organization_role

Examples

import { buildClient } from "@datocms/dashboard-client";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const organizationRoles = await client.organizationRoles.list();
for (const organizationRole of organizationRoles) {
// Check the 'Returned output' tab for the result ☝️
console.log(organizationRole);
}
}
run();
{
id: "312",
name: "Owner",
can_read_everything: true,
can_access_sites_as_owner: true,
can_create_new_sites: true,
can_edit_sites: true,
can_manage_site_transfers: true,
can_delete_sites: true,
can_manage_members: true,
can_manage_billing: true,
can_manage_organization: true,
}