Saltar al contenido

Get a canon role

Módulo Canon

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.

  • Requiere la capacidad canon.taxonomy.read.
  • Alcances de OAuth: canon.
  • Estados de error: 400, 401, 404, 429. Los errores son detalles de problema RFC 9457.

Parámetros de ruta y de consulta

canonRoles.get: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
role_codeRoleCodeSíWorkforce role code from `xpms.dim_role`, on URID grammar.Restricciones: 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.Restricciones: pattern ^[a-z_][a-z0-9_]*(,[a-z_][a-z0-9_]*)*$

Respuesta 200: CanonRole

canonRoles.get: CanonRole
CampoTipoObligatorioDescripción
role_codeRoleCodeSíWorkforce role code from `xpms.dim_role`, on URID grammar.Restricciones: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}$
rolestringSíRole function name.Restricciones: length 1 to 200
dept_codeDeptCodeSíDepartment class code from `xpms.dim_department` (Section 3.2).Restricciones: pattern ^[0-9]000$
staffing_rationumber | nullSíStaffing ratio from canon: how many people one role holder covers.Restricciones: range 0 to any
ratio_basisstring | nullSíBasis of the ratio.Restricciones: length 1 to 300
kit_basisstring | nullSíKit basis.Restricciones: length 1 to 300
job_titlestring | nullSíJob title.Restricciones: 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"
}

Ejemplos de código

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