Saltar al contenido

Get a canon facet

Módulo Canon

GET/canon/facets/{facet}canonFacets.get

A facet carried from canon. Returns one canon facet with its `ETag`. A canon facet 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

canonFacets.get: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
facetstringSíFacet name.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: CanonFacet

canonFacets.get: CanonFacet
CampoTipoObligatorioDescripción
facetstringSíFacet name.Restricciones: length 1 to 200
formstring | nullSíForm of the facet.Restricciones: length 1 to 300
rolls_up_tostring | nullSíWhat the facet rolls up to.Restricciones: length 1 to 200
sincestring | nullSíVersion that introduced it, as written in canon.Restricciones: length 1 to 64
notestring | nullSíNote from the Bible.Restricciones: length 1 to 20000
{
  "facet": "Phase",
  "form": "Nine gated phases",
  "rolls_up_to": "Act",
  "since": "3.0",
  "note": "Carried from canon."
}

Ejemplos de código

curl -X GET "$XOS_BASE_URL/canon/facets/Phase" \
  -H "Authorization: Bearer $XOS_API_KEY"
const { data, etag } = await xos.canonFacets.get("Phase");
response = xos.canon_facets.get("Phase")
xos canon-facets get Phase