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
| Field | Type | Required | Description |
|---|---|---|---|
| role_code | RoleCode | Yes | Workforce role code from `xpms.dim_role`, on URID grammar.Constraints: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}$ |
| fields | Fields | No | Sparse 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
| Field | Type | Required | Description |
|---|---|---|---|
| role_code | RoleCode | Yes | Workforce role code from `xpms.dim_role`, on URID grammar.Constraints: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}$ |
| role | string | Yes | Role function name.Constraints: length 1 to 200 |
| dept_code | DeptCode | Yes | Department class code from `xpms.dim_department` (Section 3.2).Constraints: pattern ^[0-9]000$ |
| staffing_ratio | number | null | Yes | Staffing ratio from canon: how many people one role holder covers.Constraints: range 0 to any |
| ratio_basis | string | null | Yes | Basis of the ratio.Constraints: length 1 to 300 |
| kit_basis | string | null | Yes | Kit basis.Constraints: length 1 to 300 |
| job_title | string | null | Yes | Job 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