Saltar al contenido

List canon element rows

Módulo Canon

GET/canon/elementscanonElements.list

A catalog element, the unit of the catalog. Returns a cursor page of canon element rows the caller may see. Coded list: the default order is numeric code order by `element_id`. Supports sparse fieldsets and the filter grammar.

  • Requiere la capacidad canon.taxonomy.read.
  • Alcances de OAuth: canon.
  • Paginación por cursor: se aplican limit, cursor, fields, sort y filter.
  • Estados de error: 400, 401, 429. Los errores son detalles de problema RFC 9457.

Parámetros de ruta y de consulta

canonElements.list: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
limitLimitNoPage size. Default 50, maximum 200.Restricciones: range 1 to 200
cursorCursorNoOpaque cursor from `next_cursor` of the previous page.Restricciones: length 1 to any
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_]*)*$
sortSortNoSort keys, comma-separated; a leading `-` sorts descending. Without `sort`, the documented default order applies (coded lists sort in numeric code order).Restricciones: pattern ^-?[a-z_][a-z0-9_]*(,-?[a-z_][a-z0-9_]*)*$
filterFilterNoFilter grammar `filter[field][op]=value`. Operators: eq, ne, lt, lte, gt, gte, in (comma-separated values), is_null (true or false) and contains. Conditions combine with AND.

Respuesta 200: una página de CanonElement

canonElements.list: CanonElement
CampoTipoObligatorioDescripción
element_idItemIdSíCatalog item identifier `{URID}-{ORG}-{SEQ}` (Section 3.6).Restricciones: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}-[A-Z0-9]+-[0-9]+$
uridUridSíCategory URID `DDDD.DD.DD` from `xpms.dim_category` (Section 3.3). There is no fourth segment.Restricciones: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}$
itemstringSíElement name.Restricciones: length 1 to 200
common_namestring | nullSíCommon name.Restricciones: length 1 to 200
kindstringSíElement kind.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
unit_basisstringSíUnit basis of the element.Restricciones: length 1 to 64
xyzXyzSíXYZ schema-family tag (Section 3.6): X Resource, Y Process, Z Timeline.Restricciones: pattern ^[XYZ]$
xyz_basisstringSíBasis for the XYZ tag.Restricciones: length 1 to 300
gradestringSíExperience grade of the element: Standard, Base, Elevated or Premium.Restricciones: pattern ^[A-Z0-9][A-Za-z0-9&'/.()-]*( [A-Za-z0-9&'/.()-]+)*$
descriptionstring | nullSíDescription, sentence case.Restricciones: length 1 to 4000
specificationstring | nullSíSpecification.Restricciones: length 1 to 4000
tier_codeTierCodeSíTier of experience code from `xpms.dim_tier`.Restricciones: pattern ^[0-9]{2}$
lead_time_hoursnumber | nullSíLead time in hours.
crewstring | nullSíCrew the element needs.Restricciones: length 1 to 300
unspscstring | nullSíUNSPSC identifier; recorded, never minted.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
lifecycle_statestringSíLifecycle state from the shared vocabulary.Restricciones: pattern ^[A-Z0-9][A-Za-z0-9&'/.()-]*( [A-Za-z0-9&'/.()-]+)*$
purchase_accountGlAccountCode | nullSí
default_cost_centerstring | nullSíDefault cost center (dimension 1) of the element.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
external_refstring | nullSíExternal reference of the element.Restricciones: length 1 to 200
{
  "data": [
    {
      "element_id": "0000.51.01-XOS-001",
      "urid": "4000.01.01",
      "item": "Ground Stage Deck",
      "common_name": "Stage deck",
      "kind": "rental",
      "unit_basis": "ea",
      "xyz": "X",
      "xyz_basis": "Physical inventory",
      "grade": "Standard",
      "description": "Line array for outdoor stages.",
      "specification": "12 cabinets per side.",
      "tier_code": "04",
      "lead_time_hours": 48,
      "crew": "2 audio technicians",
      "unspsc": "52161512",
      "lifecycle_state": "Active",
      "purchase_account": "5400",
      "default_cost_center": "CC-CORP",
      "external_ref": "TECH-VIDO-CAMR-001 · 5000.050.00"
    },
    {
      "element_id": "4000.01.01-XPMS-001",
      "urid": "4000.01.01",
      "item": "Ground Stage Deck",
      "common_name": "Stage deck",
      "kind": "rental",
      "unit_basis": "ea",
      "xyz": "X",
      "xyz_basis": "Physical inventory",
      "grade": "Standard",
      "description": "Line array for outdoor stages.",
      "specification": "12 cabinets per side.",
      "tier_code": "04",
      "lead_time_hours": 48,
      "crew": "2 audio technicians",
      "unspsc": "52161512",
      "lifecycle_state": "Active",
      "purchase_account": "5400",
      "default_cost_center": "CC-CORP",
      "external_ref": "TECH-VIDO-CAMR-001 · 5000.050.00"
    }
  ],
  "next_cursor": null
}

Ejemplos de código

curl -X GET "$XOS_BASE_URL/canon/elements" \
  -H "Authorization: Bearer $XOS_API_KEY"
for await (const row of xos.canonElements.listAll()) {
  console.log(row);
}
for row in xos.canon_elements.list_all():
    print(row)
xos canon-elements list --all