The roles API provides access to a list of which roles are available to a given organization. It does not support any other action.
Endpoints
Method Endpoint Description Example
GET /api/v2/roles.json Fetch all roles in your organization Get All
Query Parameters
Parameter Type Description
page integer The page number requested.
per_page integer Number of items per page. By default, all requests are paginated to the maximum value of 20,000 items per request.
Response
{
"roles" : [{
"name" : "Manager" ,
"is_system" : true ,
"is_default" : false ,
"can_manage_subscription" : false ,
"can_update_organization" : false ,
"can_manage_members" : true ,
"can_manage_roles" : false ,
"can_manage_layers" : true ,
"can_manage_apps" : true ,
"can_create_records" : true ,
"can_update_records" : true ,
"can_delete_records" : true ,
"can_manage_projects" : true ,
"can_manage_choice_lists" : true ,
"can_manage_classification_sets" : true ,
"can_change_status" : true ,
"can_change_project" : true ,
"can_assign_records" : true ,
"can_import_records" : true ,
"can_export_records" : true ,
"can_run_reports" : true ,
"can_manage_authorizations" : false ,
"id" : "b8cf1294-36c1-497a-a17e-f7bd3fc6e059" ,
"created_at" : "2018-01-19T19:59:20Z" ,
"updated_at" : "2018-01-19T19:59:20Z"
},
{
"name" : "Standard User" ,
"is_system" : true ,
"is_default" : true ,
"can_manage_subscription" : false ,
"can_update_organization" : false ,
"can_manage_members" : false ,
"can_manage_roles" : false ,
"can_manage_layers" : false ,
"can_manage_apps" : false ,
"can_create_records" : true ,
"can_update_records" : true ,
"can_delete_records" : false ,
"can_manage_projects" : false ,
"can_manage_choice_lists" : false ,
"can_manage_classification_sets" : false ,
"can_change_status" : true ,
"can_change_project" : true ,
"can_assign_records" : false ,
"can_import_records" : false ,
"can_export_records" : false ,
"can_run_reports" : true ,
"can_manage_authorizations" : false ,
"id" : "5a326552-865c-4c91-a45b-4262d4b6aedf" ,
"created_at" : "2018-01-19T19:59:20Z" ,
"updated_at" : "2018-01-19T19:59:20Z"
}
]
}
Examples
Get all Roles
curl --request GET 'https://api.fulcrumapp.com/api/v2/roles.json' \ --header 'Accept: application/json' \ --header 'X-ApiToken: {token}'
from fulcrum import Fulcrum fulcrum = Fulcrum('{token}' ) roles = fulcrum.roles.search()for role in roles['roles' ]: print(role)
const { Client } = require ('fulcrum-app' );const client = new Client('{token}' ); client.roles.all() .then((page ) => { page.objects.forEach(role => { console .log(role); }); }) .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['id' ] end