Skip to content

Delete a Policy

When a policy is not required anymore, you can delete the Control Change Policy of an Asset / Data Stream pair.

After the policy is deleted, the Control Changes for that pair use the value in the Control Change request or 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
5
curl -X 'POST' \
'https://<url.kelvin.ai>/api/v4/control-changes/policies/krn%3Aad%3Adoc_demo_plunger_01%2Fdoc_demo_closed_time_sp/delete' \
-H "Authorization: Bearer <Your Current Token>" \
-H 'accept: */*' \
-d ''

You will get a 200 response if successful.

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>")

# Delete Control Change Policy
client.control_change.delete_control_change_policy(
    resource="krn:ad:doc_demo_plunger_01/doc_demo_closed_time_sp"
)

You will not receive a response.