v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
Tag Policies

Get a tag policy

Retrieve a single tag policy by ID. Optionally include the policy's current compliance score via the include=score query parameter. Policies belonging to other organizations cannot be retrieved.

get/api/v2/tag-policies/{policy_id}

Path parameters

policy_idstring required

The unique identifier of the tag policy.

Query parameters

include'score'

A related resource to include alongside a tag policy in the response. Currently the only supported value is score.

Example:score

Comma-separated list of related resources to include alongside the policy. Currently the only supported value is score.

ts_startinteger

Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds.

ts_endinteger

End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than ts_start.

Response

OK

Example response

{
  "data": {
    "attributes": {
      "created_at": "2026-05-21T22:11:06.108696Z",
      "created_by": "test-user",
      "enabled": true,
      "modified_at": "2026-05-21T22:11:06.108696Z",
      "modified_by": "test-user",
      "policy_name": "Service tag must be one of api or web",
      "policy_type": "surfacing",
      "required": true,
      "scope": "env",
      "source": "logs",
      "tag_key": "service",
      "tag_value_patterns": [
        "api",
        "web"
      ],
      "version": 1
    },
    "id": "123",
    "relationships": {
      "score": {
        "data": {
          "id": "123-v1-1779315066097-1779401466097",
          "type": "tag_policy_score"
        }
      }
    },
    "type": "tag_policy"
  },
  "included": [
    {
      "attributes": {
        "score": 80,
        "ts_end": 1779401466097,
        "ts_start": 1779315066097,
        "version": 1
      },
      "id": "123-v1-1779315066097-1779401466097",
      "type": "tag_policy_score"
    }
  ]
}