Skip to main content
POST
/
v3
/
genai-alert-rules
Create GenAI Alert Rule
curl --request POST \
  --url https://{host}/v3/genai-alert-rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "metric_name": "<string>",
  "critical_threshold": 123,
  "notification_settings": [
    {
      "config": {
        "recipients": [
          "jsmith@example.com"
        ]
      }
    }
  ],
  "warning_threshold": 123,
  "token_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "attribute_value": "<string>",
  "evaluator_rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "evaluator_output_name": "<string>",
  "evaluator_output_value": "<string>"
}
'
{
  "api_version": "3.0",
  "kind": "NORMAL",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "metric_name": "<string>",
    "critical_threshold": 123,
    "organization": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "project": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "application": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "notification_settings": [
      {
        "config": {
          "recipients": [
            "jsmith@example.com"
          ]
        }
      }
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "created_by": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "email": "jsmith@example.com",
      "full_name": "<string>"
    },
    "updated_by": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "email": "jsmith@example.com",
      "full_name": "<string>"
    },
    "warning_threshold": 123,
    "token_type": "<string>",
    "attribute_name": "<string>",
    "attribute_value": "<string>",
    "evaluator_rule_name": "<string>",
    "evaluator_output_name": "<string>",
    "evaluator_output_value": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://handbook.fiddler.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
project_id
string<uuid>
required

UUID of the project

application_id
string<uuid>
required

UUID of the application

name
string
required

Name of the alert rule

metric_source
enum<string>
required

Source of the metric data

Available options:
raw_data,
attribute,
evaluator,
custom
metric_name
string
required

Name of the metric (e.g., "traffic", "token_count", "attribute", "latency", or an evaluator type)

interval
enum<integer>
required

Interval in seconds (3600 = 1 hour, 86400 = 1 day)

Available options:
3600,
86400
aggregation
enum<string>
required

Supported aggregation types for GenAI metrics

Available options:
sum,
average,
p50,
p75,
p90,
p95,
p99,
count
threshold_type
enum<string>
required

Type of threshold

Available options:
ABSOLUTE
threshold_condition
enum<string>
required

Condition for threshold comparison

Available options:
ABOVE,
BELOW
critical_threshold
number<float>
required

Threshold value for triggering a critical alert

notification_settings
object[]
required

List of notification settings for the alert rule

query_scope
enum<string>
required

Scope of query processing

Available options:
SPAN,
SESSION
metric_unit
enum<string>

Unit for metric values.

Available options:
milliseconds
warning_threshold
number<float> | null

Threshold value for triggering a warning alert (optional)

token_type_id
string<uuid> | null

Token type attribute ID (required for token_count metrics)

attribute_id
string<uuid> | null

Attribute ID for the metric (required for attribute metrics)

attribute_value
string | null

Attribute value for the metric attribute (only for attribute metrics with count aggregation)

evaluator_rule_id
string<uuid> | null

Evaluator rule ID (required for evaluator metrics)

evaluator_output_name
string | null

Name of the evaluator output to monitor (required for evaluator metrics)

evaluator_output_value
string | null

Value of the evaluator output to filter on (only for evaluator metrics with count aggregation)

Response

GenAI Alert Rule created successfully

Response object for standard API responses.

api_version
enum<string>
default:3.0

API version.

Available options:
2.0,
3.0
kind
enum<string>
default:NORMAL

Type of response, indicating a normal response.

Available options:
NORMAL
data
object