Update a Policy
Update the Control Change Policy of an Asset / Data Stream pair.
Warning
An update replaces the full policy. Any field you leave out of the request is unset in the policy and is resolved at runtime from the Control Change request or the platform default. Leaving out resource_value_check removes all its completion checks.
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. |
policy.retries |
Integer, 0 or more | The number of retry attempts after the initial delivery. Corresponds to the Control Change request's retries field. |
policy.retry_interval |
Integer, 1 or more | The time in seconds between retry attempts. Corresponds to the Control Change request's older, deprecated timeout field. |
policy.queueing.mode |
enqueue, next or immediate |
How a new Control Change is queued for the same Asset / Data Stream pair. See Queueing Mode. |
policy.resource_value_check[].resource |
KRN | The Asset / Data Stream pair observed to evaluate completion. It must belong to the same Asset and have the same data type as the policy resource. |
policy.resource_value_check[].tolerance |
Number, 0 or more | The allowed deviation (±) from the requested value. |
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.
You will get a response with a status code of 200, similar to this;
To remove all completion checks and keep only the retries, send an empty resource_value_check list;
The Kelvin API Client URL-encodes the resource for you.