Skip to content

List Policies

List the Control Change Policies of your Assets / Data Streams, with optional filters.

Each returned policy includes only the fields that are set in it, 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
resources List of KRNs Return only the policies of these Asset / Data Stream pairs.
queueing_modes List of enqueue, next or immediate Return only the policies that use one of these queueing modes.
search Query parameter Return only the policies whose resource matches the search term.
sort_by Query parameter Sort the results by resource, created, created_by, updated or updated_by. The default is resource.
API cURL Example
curl -X 'POST' \
'https://<url.kelvin.ai>/api/v4/control-changes/policies/list?sort_by=resource&pagination_type=cursor&page_size=20&direction=asc' \
-H "Authorization: Bearer <Your Current Token>" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"resources": [
    "krn:ad:doc_demo_plunger_01/doc_demo_closed_time_sp",
    "krn:ad:doc_demo_plunger_01/doc_demo_speed_sp"
],
"queueing_modes": [
    "enqueue",
    "immediate"
]
}'

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

API cURL Example Response
{
"pagination": {
    "next_page": null,
    "previous_page": null
},
"data": [
    {
    "resource": "krn:ad:doc_demo_plunger_01/doc_demo_closed_time_sp",
    "policy": {
        "resource_value_check": [],
        "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"
    },
    {
    "resource": "krn:ad:doc_demo_plunger_01/doc_demo_speed_sp",
    "policy": {
        "resource_value_check": [],
        "queueing": {
        "mode": "immediate"
        }
    },
    "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"
    }
]
}
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>")

# List Control Change Policies
response = client.control_change.list_control_change_policies(
    data={
        "resources": [
            "krn:ad:doc_demo_plunger_01/doc_demo_closed_time_sp",
            "krn:ad:doc_demo_plunger_01/doc_demo_speed_sp",
        ],
        "queueing_modes": ["enqueue", "immediate"],
    }
)

print(f"Found {len(response)} Control Change Policies")
for policy in response:
    print(f"  - {policy.resource}")

The response will look like this;

API Client (Python) Example Response
1
2
3
Found 2 Control Change Policies
  - krn:ad:doc_demo_plunger_01/doc_demo_closed_time_sp
  - krn:ad:doc_demo_plunger_01/doc_demo_speed_sp