Saltar al contenido

Get a canon metric

Módulo Canon

GET/canon/metrics/{item}canonMetrics.get

A metric, often code-derived and jurisdiction-bound. Returns one canon metric with its `ETag`. A canon metric 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

canonMetrics.get: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
itemstringSíMetric item.Restricciones: length 1 to 200
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: CanonMetric

canonMetrics.get: CanonMetric
CampoTipoObligatorioDescripción
domainstringSíMetric domain.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
itemstringSíMetric item.Restricciones: length 1 to 200
value_numericnumber | nullSíMetric value.
qualifierstring | nullSíQualifier of the value: the code section or modelling note it follows.Restricciones: length 1 to 1000
sourcestring | nullSíSource of the value.Restricciones: length 1 to 300
is_code_derivedbooleanSíWhether the value comes from a code.
jurisdiction_idJurisdictionIdSíJurisdiction identifier from `xpms.dim_jurisdiction`. An unpopulated jurisdiction returns no answer.Restricciones: pattern ^[A-Z]{2}(-[A-Z0-9]+)*$
is_jurisdiction_neutralbooleanSíWhether the value holds in every jurisdiction.
provenanceProvenanceSíProvenance from `xpms.dim_provenance` (Section 3.8); a lower rank never overwrites a higher one.Restricciones: pattern ^[a-z]+$
value_textstring | nullSíValue as text, when canon states it in words.Restricciones: length 1 to 300
{
  "domain": "capacity",
  "item": "Stage or performance area",
  "value_numeric": 15,
  "qualifier": "IBC 1005.3.2 - 0.2 in per occupant",
  "source": "IBC 1004.5",
  "is_code_derived": true,
  "jurisdiction_id": "US-FL",
  "is_jurisdiction_neutral": false,
  "provenance": "operator",
  "value_text": "Per show day"
}

Ejemplos de código

curl -X GET "$XOS_BASE_URL/canon/metrics/Stage%20or%20performance%20area" \
  -H "Authorization: Bearer $XOS_API_KEY"
const { data, etag } = await xos.canonMetrics.get("Stage or performance area");
response = xos.canon_metrics.get("Stage or performance area")
xos canon-metrics get Stage or performance area