Create Policy

Creates a new Policy

  • payload (PolicySchema): Required. The policy data to be created:
    • name (str): A descriptive name for this policy.
    • query (Query): Cube.js query.
    • cron_expression (str): Cron expression for policy evaluation.
    • condition_above_value (float or None): Condition above value.
    • condition_below_value (float or None): Condition below value.
    • destination_ids (list of UUID): List of communication channels to get notified through.
    • alert_on_status (AlertOnStatusDirection): Trigger policy action if the value is above/below.
    • alert_on_policy_level (bool): Trigger policy action on a single group/entire groups.
    • dataset_id (str): The dataset this policy is monitoring.
    • time_range_field (str): Time field to scan.
    • time_range_unit (TimeRangeUnit): Time unit to scan.
    • time_range_value (int): Time value to scan.
Click Try It! to start a request and see the response here!