Get All Roles

API Library Examples

from fulcrum import Fulcrum
fulcrum = Fulcrum('{token}')

roles = fulcrum.roles.search()

for role in roles['roles']:
  print(role) # entire role
  # print(roles['name']) # just the role name
const { Client } = require('fulcrum-app');
const client = new Client('{token}');

client.roles.all()
  .then((page) => {
    page.objects.forEach(role => {
      console.log(role); // entire role
      // console.log(role.name); // just the role name
    });
  })
  .catch((error) => {
    console.log(error.message);
  });
require 'fulcrum'

client = Fulcrum::Client.new('{token}')
roles = client.roles.all()

for role in roles.objects do
  # puts role # entire role definition
  puts role['id'] # just the role id
end
Language
Credentials
Header
Click Try It! to start a request and see the response here!