Create Policy Template

Creates a new Policy based on a provided template

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creates a policy from a predefined template. The type field selects the template: no_response, latency_spike, latency_anomaly, no_throughput, throughput_anomaly, or guardrail_violations.

When to use it

Use it to set up common agent monitoring quickly. For a custom metric and condition, use Create a policy.

Required parameters

  • Request body: a template object. Every template takes name, dataset_id, destination_ids, and agent_id, plus its own threshold fields: threshold for no response, latency spike, and guardrail violations; warn_above_threshold and warn_below_threshold for the anomaly templates; and value for no throughput.

Response

A successful call returns 201 Created with the PolicyResponse object, including id, name, status, data_config, threshold_settings, cron_expression, destination_ids, last_evaluation, and next_evaluation.

Related: Create a policy, List policies, Create a destination

Body Params
boolean
Defaults to true
string
required

A descriptive name for this policy

string
required

The dataset this policy is monitoring

destination_ids
array of uuids
required

List of communication channels to get notified through

Destination Ids*
string
Defaults to 0 * * * *
StaticThresholdSettings | null
string
enum
Defaults to HEALTHY_TO_UNHEALTHY
Allowed:
const
enum
Defaults to no_response
Allowed:
uuid
required
string
string
Defaults to count
time_range_config
object
Defaults to [object Object]
boolean
Defaults to true
integer
required
Responses

422

Unprocessable Entity

500

Internal Server Error

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json