openapi: 3.1.0 info: title: Galileo API Server annotation log_stream_alerts API version: 1.1085.0 servers: - url: https://api.galileo.ai description: Galileo API Server - galileo-v2 tags: - name: log_stream_alerts paths: /projects/{project_id}/log_streams/{log_stream_id}/alerts: post: tags: - log_stream_alerts summary: Create description: Create alert. operationId: create_projects__project_id__log_streams__log_stream_id__alerts_post security: - ClassicAPIKeyHeader: [] - APIKeyHeader: [] - OAuth2PasswordBearer: [] - HTTPBasic: [] parameters: - name: log_stream_id in: path required: true schema: type: string format: uuid4 title: Log Stream Id - name: project_id in: path required: true schema: type: string format: uuid4 title: Project Id requestBody: required: true content: application/json: schema: anyOf: - $ref: '#/components/schemas/CreateAlertConfigurationV1Request' - $ref: '#/components/schemas/CreateAlertConfigurationV2Request' examples: - conditions: - field: toxicity aggregation: max operator: lte value: 0.3 window: 900 condition_type: metric/numeric/1 interval: 300 title: Alert Config Request responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AlertConfigurationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - log_stream_alerts summary: List Alerts By Log Stream operationId: list_alerts_by_log_stream_projects__project_id__log_streams__log_stream_id__alerts_get security: - ClassicAPIKeyHeader: [] - APIKeyHeader: [] - OAuth2PasswordBearer: [] - HTTPBasic: [] parameters: - name: log_stream_id in: path required: true schema: type: string format: uuid4 title: Log Stream Id - name: project_id in: path required: true schema: type: string format: uuid4 title: Project Id - name: starting_token in: query required: false schema: type: integer default: 0 title: Starting Token - name: limit in: query required: false schema: type: integer default: 100 title: Limit responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ListAlertConfigurationsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /projects/{project_id}/log_streams/{log_stream_id}/alerts/{alert_config_id}: put: tags: - log_stream_alerts summary: Update description: Update alert configuration. operationId: update_projects__project_id__log_streams__log_stream_id__alerts__alert_config_id__put security: - ClassicAPIKeyHeader: [] - APIKeyHeader: [] - OAuth2PasswordBearer: [] - HTTPBasic: [] parameters: - name: log_stream_id in: path required: true schema: type: string format: uuid4 title: Log Stream Id - name: alert_config_id in: path required: true schema: type: string format: uuid4 title: Alert Config Id - name: project_id in: path required: true schema: type: string format: uuid4 title: Project Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateAlertConfigurationRequest' examples: - conditions: - field: toxicity aggregation: max operator: lte value: 0.3 window: 900 condition_type: metric/numeric/1 interval: 300 responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AlertConfigurationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - log_stream_alerts summary: Delete Alert description: Delete alert configuration. operationId: delete_alert_projects__project_id__log_streams__log_stream_id__alerts__alert_config_id__delete security: - ClassicAPIKeyHeader: [] - APIKeyHeader: [] - OAuth2PasswordBearer: [] - HTTPBasic: [] parameters: - name: log_stream_id in: path required: true schema: type: string format: uuid4 title: Log Stream Id - name: alert_config_id in: path required: true schema: type: string format: uuid4 title: Alert Config Id - name: project_id in: path required: true schema: type: string format: uuid4 title: Project Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AlertStatusResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - log_stream_alerts summary: Get Alert By Id operationId: get_alert_by_id_projects__project_id__log_streams__log_stream_id__alerts__alert_config_id__get security: - ClassicAPIKeyHeader: [] - APIKeyHeader: [] - OAuth2PasswordBearer: [] - HTTPBasic: [] parameters: - name: project_id in: path required: true schema: type: string format: uuid4 title: Project Id - name: log_stream_id in: path required: true schema: type: string format: uuid4 title: Log Stream Id - name: alert_config_id in: path required: true schema: type: string format: uuid4 title: Alert Config Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AlertConfigurationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: AlertCondition: properties: field: type: string title: Field aggregation: anyOf: - $ref: '#/components/schemas/Aggregator' - type: string title: Aggregation operator: $ref: '#/components/schemas/Operator' value: anyOf: - type: number - type: integer - type: string title: Value filter_value: anyOf: - type: string - type: number - type: integer - type: 'null' title: Filter Value filter_operator: anyOf: - $ref: '#/components/schemas/Operator' - type: 'null' window: type: integer minimum: 900.0 title: Window condition_type: $ref: '#/components/schemas/AlertConditionType' default: metric/numeric/1 metric_id: anyOf: - type: string - type: 'null' title: Metric Id legacy_metric_name: anyOf: - type: string - type: 'null' title: Legacy Metric Name type: object required: - field - aggregation - operator - value - window title: AlertCondition ListAlertConfigurationsResponse: properties: starting_token: type: integer title: Starting Token default: 0 limit: type: integer title: Limit default: 100 paginated: type: boolean title: Paginated default: false next_starting_token: anyOf: - type: integer - type: 'null' title: Next Starting Token alerts: items: $ref: '#/components/schemas/AlertConfigurationResponse' type: array title: Alerts type: object title: ListAlertConfigurationsResponse AlertConfigurationResponse: properties: conditions: items: additionalProperties: true type: object type: array title: Conditions filters: items: oneOf: - $ref: '#/components/schemas/AlertNameFilter' discriminator: propertyName: name mapping: node_name: '#/components/schemas/AlertNameFilter' type: array title: Filters interval: type: integer title: Interval schema_version: $ref: '#/components/schemas/AlertType' default: multi_condition/object/1 active: type: boolean title: Active default: true id: type: string format: uuid4 title: Id created_by: type: string format: uuid4 title: Created By project_id: type: string format: uuid4 title: Project Id run_id: type: string format: uuid4 title: Run Id created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At type: object required: - conditions - interval - id - created_by - project_id - run_id - created_at - updated_at title: AlertConfigurationResponse OutputTypeEnum: type: string enum: - boolean - categorical - count - discrete - freeform - percentage - multilabel - retrieved_chunk_list_boolean - boolean_multilabel title: OutputTypeEnum description: Enumeration of output types. HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError UpdateAlertConfigurationRequest: properties: conditions: anyOf: - items: additionalProperties: true type: object type: array - type: 'null' title: Conditions filters: items: oneOf: - $ref: '#/components/schemas/AlertNameFilter' discriminator: propertyName: name mapping: node_name: '#/components/schemas/AlertNameFilter' type: array title: Filters interval: anyOf: - type: integer - type: 'null' title: Interval active: anyOf: - type: boolean - type: 'null' title: Active processed_by: anyOf: - type: string format: uuid4 - type: 'null' title: Processed By last_triggered: anyOf: - type: string format: date-time - type: 'null' title: Last Triggered last_sent: anyOf: - type: string format: date-time - type: 'null' title: Last Sent alert_sent: anyOf: - type: boolean - type: 'null' title: Alert Sent counter_since_last_sent: anyOf: - type: integer - type: 'null' title: Counter Since Last Sent counter: anyOf: - type: integer - type: 'null' title: Counter schema_version: anyOf: - $ref: '#/components/schemas/AlertType' - type: 'null' type: object title: UpdateAlertConfigurationRequest NumericMetricConditionV2: properties: field: type: string title: Field metric_id: anyOf: - type: string - type: 'null' title: Metric Id legacy_metric_name: anyOf: - type: string - type: 'null' title: Legacy Metric Name output_type: anyOf: - $ref: '#/components/schemas/OutputTypeEnum' - type: 'null' scoreable_node_types: anyOf: - items: type: string type: array - type: 'null' title: Scoreable Node Types operator: $ref: '#/components/schemas/Operator' window: type: integer minimum: 900.0 title: Window type: type: string const: metric/numeric/v2 title: Type default: metric/numeric/v2 aggregation: type: string enum: - avg - max - min - sum title: Aggregation value: anyOf: - type: number - type: integer title: Value type: object required: - field - operator - window - aggregation - value title: NumericMetricConditionV2 Aggregator: type: string enum: - count - sum - avg - max - min - percentage_true - percentage_false title: Aggregator description: Aggregation functions for alert conditions. CategoricalMetricConditionV2: properties: field: type: string title: Field metric_id: anyOf: - type: string - type: 'null' title: Metric Id legacy_metric_name: anyOf: - type: string - type: 'null' title: Legacy Metric Name output_type: anyOf: - $ref: '#/components/schemas/OutputTypeEnum' - type: 'null' scoreable_node_types: anyOf: - items: type: string type: array - type: 'null' title: Scoreable Node Types operator: $ref: '#/components/schemas/Operator' window: type: integer minimum: 900.0 title: Window type: type: string const: metric/categorical/v2 title: Type default: metric/categorical/v2 aggregation: type: string const: count title: Aggregation target_value: type: string title: Target Value value: type: integer title: Value type: object required: - field - operator - window - aggregation - target_value - value title: CategoricalMetricConditionV2 BooleanMetricConditionV2: properties: field: type: string title: Field metric_id: anyOf: - type: string - type: 'null' title: Metric Id legacy_metric_name: anyOf: - type: string - type: 'null' title: Legacy Metric Name output_type: anyOf: - $ref: '#/components/schemas/OutputTypeEnum' - type: 'null' scoreable_node_types: anyOf: - items: type: string type: array - type: 'null' title: Scoreable Node Types operator: $ref: '#/components/schemas/Operator' window: type: integer minimum: 900.0 title: Window type: type: string const: metric/boolean/v2 title: Type default: metric/boolean/v2 aggregation: type: string enum: - count_true - count_false - percentage_true - percentage_false title: Aggregation value: anyOf: - type: number - type: integer title: Value type: object required: - field - operator - window - aggregation - value title: BooleanMetricConditionV2 MultilabelMetricConditionV2: properties: field: type: string title: Field metric_id: anyOf: - type: string - type: 'null' title: Metric Id legacy_metric_name: anyOf: - type: string - type: 'null' title: Legacy Metric Name output_type: anyOf: - $ref: '#/components/schemas/OutputTypeEnum' - type: 'null' scoreable_node_types: anyOf: - items: type: string type: array - type: 'null' title: Scoreable Node Types operator: $ref: '#/components/schemas/Operator' window: type: integer minimum: 900.0 title: Window type: type: string const: metric/multilabel/v2 title: Type default: metric/multilabel/v2 aggregation: type: string const: count title: Aggregation target_value: type: string title: Target Value value: type: integer title: Value type: object required: - field - operator - window - aggregation - target_value - value title: MultilabelMetricConditionV2 AlertNameFilter: properties: name: type: string const: node_name title: Name default: node_name operator: type: string enum: - eq - ne - contains - one_of - not_in title: Operator value: anyOf: - type: string - items: type: string type: array title: Value case_sensitive: type: boolean title: Case Sensitive default: true type: object required: - operator - value title: AlertNameFilter AlertType: type: string enum: - multi_condition/object/1 - multi_condition/object/2 title: AlertType RootColumnConditionV2: properties: field: type: string title: Field metric_id: anyOf: - type: string - type: 'null' title: Metric Id legacy_metric_name: anyOf: - type: string - type: 'null' title: Legacy Metric Name output_type: anyOf: - $ref: '#/components/schemas/OutputTypeEnum' - type: 'null' scoreable_node_types: anyOf: - items: type: string type: array - type: 'null' title: Scoreable Node Types operator: $ref: '#/components/schemas/Operator' window: type: integer minimum: 900.0 title: Window type: type: string const: root/column/v2 title: Type default: root/column/v2 aggregation: type: string enum: - avg - max - min - sum - count title: Aggregation value: anyOf: - type: number - type: integer title: Value target_value: anyOf: - type: number - type: integer - type: 'null' title: Target Value target_operator: anyOf: - $ref: '#/components/schemas/Operator' - type: 'null' type: object required: - field - operator - window - aggregation - value title: RootColumnConditionV2 CreateAlertConfigurationV1Request: properties: conditions: items: $ref: '#/components/schemas/AlertCondition' type: array title: Conditions filters: items: oneOf: - $ref: '#/components/schemas/AlertNameFilter' discriminator: propertyName: name mapping: node_name: '#/components/schemas/AlertNameFilter' type: array title: Filters interval: type: integer title: Interval schema_version: type: string const: multi_condition/object/1 title: Schema Version default: multi_condition/object/1 active: type: boolean title: Active default: true project_id: anyOf: - type: string format: uuid4 - type: 'null' title: Project Id run_id: anyOf: - type: string format: uuid4 - type: 'null' title: Run Id created_by: anyOf: - type: string format: uuid4 - type: 'null' title: Created By type: object required: - conditions - interval title: CreateAlertConfigurationV1Request CreateAlertConfigurationV2Request: properties: schema_version: type: string const: multi_condition/object/2 title: Schema Version default: multi_condition/object/2 conditions: items: oneOf: - $ref: '#/components/schemas/NumericMetricConditionV2' - $ref: '#/components/schemas/BooleanMetricConditionV2' - $ref: '#/components/schemas/CategoricalMetricConditionV2' - $ref: '#/components/schemas/MultilabelMetricConditionV2' - $ref: '#/components/schemas/RootColumnConditionV2' - $ref: '#/components/schemas/RecordCountConditionV2' discriminator: propertyName: type mapping: metric/boolean/v2: '#/components/schemas/BooleanMetricConditionV2' metric/categorical/v2: '#/components/schemas/CategoricalMetricConditionV2' metric/multilabel/v2: '#/components/schemas/MultilabelMetricConditionV2' metric/numeric/v2: '#/components/schemas/NumericMetricConditionV2' root/column/v2: '#/components/schemas/RootColumnConditionV2' root/record_count/v2: '#/components/schemas/RecordCountConditionV2' type: array title: Conditions interval: type: integer title: Interval active: type: boolean title: Active default: true project_id: anyOf: - type: string format: uuid4 - type: 'null' title: Project Id run_id: anyOf: - type: string format: uuid4 - type: 'null' title: Run Id created_by: anyOf: - type: string format: uuid4 - type: 'null' title: Created By type: object required: - conditions - interval title: CreateAlertConfigurationV2Request ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError AlertConditionType: type: string enum: - metric/numeric/1 - metric/string/1 - metric/array_string/1 - root/numeric/1 - metric/numeric/v2 - metric/boolean/v2 - metric/categorical/v2 - metric/multilabel/v2 - root/column/v2 - root/record_count/v2 title: AlertConditionType Operator: type: string enum: - eq - ne - gt - gte - lt - lte - in - not_in - contains - has_all - between - like title: Operator RecordCountConditionV2: properties: field: type: string title: Field default: record_count metric_id: anyOf: - type: string - type: 'null' title: Metric Id legacy_metric_name: anyOf: - type: string - type: 'null' title: Legacy Metric Name output_type: anyOf: - $ref: '#/components/schemas/OutputTypeEnum' - type: 'null' scoreable_node_types: items: type: string type: array minItems: 1 title: Scoreable Node Types operator: $ref: '#/components/schemas/Operator' window: type: integer minimum: 900.0 title: Window type: type: string const: root/record_count/v2 title: Type default: root/record_count/v2 aggregation: type: string const: count title: Aggregation default: count value: type: integer title: Value type: object required: - scoreable_node_types - operator - window - value title: RecordCountConditionV2 AlertStatusResponse: properties: message: anyOf: - type: string - type: 'null' title: Message status: anyOf: - type: string - type: 'null' title: Status id: anyOf: - type: string - type: 'null' title: Id type: object title: AlertStatusResponse securitySchemes: ClassicAPIKeyHeader: type: apiKey in: header name: Galileo-API-Key APIKeyHeader: type: apiKey in: header name: Splunk-AO-API-Key OAuth2PasswordBearer: type: oauth2 flows: password: scopes: {} tokenUrl: https://api.galileo.ai/login HTTPBasic: type: http scheme: basic