Skip to content

View a Policy

View the Control Change Policy of an Asset / Data Stream pair.

The response returns only the fields that are set in the policy, except resource_value_check, which is returned as an empty list when no checks are set. Fields that are not set use the platform default.

Reference:

Field Option Description
resource KRN The Asset / Data Stream pair of the policy, in the path of the request. In the Kelvin API request it must be URL-encoded. Required.

The KRN in the path must be URL-encoded. In this example krn:ad:doc_demo_plunger_01/doc_demo_closed_time_sp becomes krn%3Aad%3Adoc_demo_plunger_01%2Fdoc_demo_closed_time_sp.

API cURL Example
1
2
3
4
curl -X 'GET' \
'https://<url.kelvin.ai>/api/v4/control-changes/policies/krn%3Aad%3Adoc_demo_plunger_01%2Fdoc_demo_closed_time_sp/get' \
-H "Authorization: Bearer <Your Current Token>" \
-H 'accept: application/json'

You will get a response with a status code of 200, similar to this;

API cURL Example Response
{
"resource": "krn:ad:doc_demo_plunger_01/doc_demo_closed_time_sp",
"policy": {
    "resource_value_check": [
    {
        "resource": "krn:ad:doc_demo_plunger_01/doc_demo_closed_time",
        "tolerance": 1
    }
    ],
    "retries": 3,
    "retry_interval": 150,
    "queueing": {
    "mode": "enqueue"
    }
},
"created": "2026-01-01T00:00:00Z",
"created_by": "krn:user:user@example.com",
"updated": "2026-01-01T00:00:00Z",
"updated_by": "krn:user:user@example.com"
}

The Kelvin API Client URL-encodes the resource for you.

API Client (Python) Example
from kelvin.api.client import Client

# Login
client = Client(url="https://<url.kelvin.ai>", username="<your_username>")
client.login(password="<your_password>")

# Get Control Change Policy
response = client.control_change.get_control_change_policy(
    resource="krn:ad:doc_demo_plunger_01/doc_demo_closed_time_sp"
)

print(response)