Get a canon tag
Canon module
GET/canon/tags/{tag_id}canonTags.get
A sustainability or compliance tag. Returns one canon tag with its `ETag`. A canon tag 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 |
|---|---|---|---|
| tag_id | TagId | Yes | Sustainability or compliance tag from `xpms.dim_tag`.Constraints: pattern ^TAG-[0-9]{3}$ |
| 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: CanonTag
| Field | Type | Required | Description |
|---|---|---|---|
| tag_id | TagId | Yes | Sustainability or compliance tag from `xpms.dim_tag`.Constraints: pattern ^TAG-[0-9]{3}$ |
| tag_type | string | Yes | Tag type.Constraints: length 1 to 200 |
| tag | string | Yes | Tag value.Constraints: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ |
{
"tag_id": "TAG-002",
"tag_type": "Compliance",
"tag": "OSHA"
}Code samples
curl -X GET "$XOS_BASE_URL/canon/tags/TAG-002" \
-H "Authorization: Bearer $XOS_API_KEY"const { data, etag } = await xos.canonTags.get("TAG-002");response = xos.canon_tags.get("TAG-002")xos canon-tags get TAG-002