post
https://api.superwise.ai/v1/policies/template
Creates a new Policy based on a provided template
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
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, andagent_id, plus its own threshold fields:thresholdfor no response, latency spike, and guardrail violations;warn_above_thresholdandwarn_below_thresholdfor the anomaly templates; andvaluefor 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
422Unprocessable Entity
500Internal Server Error