Skip to content

Get a canon role

Canon module

GET/canon/roles/{role_code}canonRoles.get

A workforce role with its staffing ratio. Returns one canon role with its `ETag`. A canon role the caller may not see returns 404.

  • Requires the capability canon.taxonomy.read.
  • OAuth scopes: canon.
  • Error statuses: 400, 401, 404, 429. Errors are RFC 9457 problem details.

Path and query parameters

canonRoles.get: Path and query parameters
FieldTypeRequiredDescription
role_codeRoleCodeYesWorkforce role code from `xpms.dim_role`, on URID grammar.Constraints: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}$
fieldsFieldsNoSparse fieldset: a comma-separated list of top-level fields to return. `id` is always returned.Constraints: pattern ^[a-z_][a-z0-9_]*(,[a-z_][a-z0-9_]*)*$

Response 200: CanonRole

canonRoles.get: CanonRole
FieldTypeRequiredDescription
role_codeRoleCodeYesWorkforce role code from `xpms.dim_role`, on URID grammar.Constraints: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}$
rolestringYesRole function name.Constraints: length 1 to 200
dept_codeDeptCodeYesDepartment class code from `xpms.dim_department` (Section 3.2).Constraints: pattern ^[0-9]000$
staffing_rationumber | nullYesStaffing ratio from canon: how many people one role holder covers.Constraints: range 0 to any
ratio_basisstring | nullYesBasis of the ratio.Constraints: length 1 to 300
kit_basisstring | nullYesKit basis.Constraints: length 1 to 300
job_titlestring | nullYesJob title.Constraints: length 1 to 200
{
  "role_code": "5000.50.01",
  "role": "Rigging lead",
  "dept_code": "4000",
  "staffing_ratio": 250,
  "ratio_basis": "Guests",
  "kit_basis": "Per person",
  "job_title": "Head Rigger"
}

Code samples

curl -X GET "$XOS_BASE_URL/canon/roles/5000.50.01" \
  -H "Authorization: Bearer $XOS_API_KEY"
const { data, etag } = await xos.canonRoles.get("5000.50.01");
response = xos.canon_roles.get("5000.50.01")
xos canon-roles get 5000.50.01