Latitude · Schema

CreateMonitorBody

CompanyArtificial IntelligenceObservabilityMonitoringPlatformAgents
View JSON Schema on GitHub

JSON Schema

latitude-so-create-monitor-body-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/latitude-so/json-schema/latitude-so-create-monitor-body-schema.json",
  "title": "CreateMonitorBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/latitude-so-monitors-api-openapi.yml#/components/schemas/CreateMonitorBody",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "Human-readable name. Used to derive the slug."
        },
        "description": {
          "type": "string",
          "maxLength": 2000,
          "description": "Optional free-form description."
        },
        "target": {
          "allOf": [
            {
              "$ref": "#/$defs/MonitorTarget"
            },
            {
              "description": "Entity or filter set watched by the monitor."
            }
          ]
        },
        "severity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "urgent"
          ],
          "description": "Severity assigned to incidents opened by this monitor."
        },
        "trigger": {
          "type": "string",
          "enum": [
            "match"
          ],
          "description": "Opens a point incident when any matching event appears."
        },
        "metric": {
          "allOf": [
            {
              "$ref": "#/$defs/MonitorMetric"
            },
            {
              "description": "Metric stored for later rule edits. Match monitors evaluate counts."
            }
          ]
        }
      },
      "required": [
        "name",
        "target",
        "severity",
        "trigger"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "Human-readable name. Used to derive the slug."
        },
        "description": {
          "type": "string",
          "maxLength": 2000,
          "description": "Optional free-form description."
        },
        "target": {
          "allOf": [
            {
              "$ref": "#/$defs/MonitorTarget"
            },
            {
              "description": "Entity or filter set watched by the monitor."
            }
          ]
        },
        "severity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "urgent"
          ],
          "description": "Severity assigned to incidents opened by this monitor."
        },
        "trigger": {
          "type": "string",
          "enum": [
            "threshold"
          ],
          "description": "Opens a point incident when the condition is met."
        },
        "metric": {
          "allOf": [
            {
              "$ref": "#/$defs/MonitorMetric"
            },
            {
              "description": "Metric evaluated by the monitor rule."
            }
          ]
        },
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertThresholdCondition"
            },
            {
              "description": "Threshold condition that opens point incidents."
            }
          ]
        }
      },
      "required": [
        "name",
        "target",
        "severity",
        "trigger",
        "condition"
      ]
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "Human-readable name. Used to derive the slug."
        },
        "description": {
          "type": "string",
          "maxLength": 2000,
          "description": "Optional free-form description."
        },
        "target": {
          "allOf": [
            {
              "$ref": "#/$defs/MonitorTarget"
            },
            {
              "description": "Entity or filter set watched by the monitor."
            }
          ]
        },
        "severity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "urgent"
          ],
          "description": "Severity assigned to incidents opened by this monitor."
        },
        "trigger": {
          "type": "string",
          "enum": [
            "escalating"
          ],
          "description": "Opens and closes a sustained incident while the condition is met."
        },
        "metric": {
          "allOf": [
            {
              "$ref": "#/$defs/MonitorMetric"
            },
            {
              "description": "Metric evaluated by the monitor rule."
            }
          ]
        },
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertEscalatingCondition"
            },
            {
              "description": "Escalating condition that opens sustained incidents."
            }
          ]
        }
      },
      "required": [
        "name",
        "target",
        "severity",
        "trigger",
        "condition"
      ]
    }
  ],
  "$defs": {
    "AlertBaseline": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "average",
            "period"
          ],
          "description": "How the comparison rate is computed. `average` is the rolling rate over the last `lookback`; `period` is the equal-length window immediately before it (e.g. `lookback` of 1 day compares against yesterday) for daily/weekly seasonality."
        },
        "lookback": {
          "$ref": "#/$defs/AlertDuration"
        }
      },
      "required": [
        "kind",
        "lookback"
      ],
      "description": "Fixed-window baseline the current rate is compared against."
    },
    "AlertDuration": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "unit": {
              "type": "string",
              "enum": [
                "minutes"
              ],
              "description": "The duration is expressed in whole minutes; read `minutes`."
            },
            "minutes": {
              "type": "number",
              "minimum": 0,
              "exclusiveMinimum": true,
              "description": "Number of minutes."
            }
          },
          "required": [
            "unit",
            "minutes"
          ]
        },
        {
          "type": "object",
          "properties": {
            "unit": {
              "type": "string",
              "enum": [
                "hours"
              ],
              "description": "The duration is expressed in whole hours; read `hours`."
            },
            "hours": {
              "type": "number",
              "minimum": 0,
              "exclusiveMinimum": true,
              "description": "Number of hours."
            }
          },
          "required": [
            "unit",
            "hours"
          ]
        },
        {
          "type": "object",
          "properties": {
            "unit": {
              "type": "string",
              "enum": [
                "days"
              ],
              "description": "The duration is expressed in whole days; read `days`."
            },
            "days": {
              "type": "number",
              "minimum": 0,
              "exclusiveMinimum": true,
              "description": "Number of days."
            }
          },
          "required": [
            "unit",
            "days"
          ]
        }
      ],
      "description": "Length of the window used to compute the baseline rate."
    },
    "AlertEscalatingCondition": {
      "type": "object",
      "properties": {
        "trigger": {
          "type": "string",
          "enum": [
            "escalating"
          ],
          "description": "Opens when the monitor target is escalating or sustained."
        },
        "metric": {
          "$ref": "#/$defs/MonitorMetric"
        },
        "threshold": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertMetricThreshold"
            },
            {
              "description": "How the metric is compared when threshold-based."
            }
          ]
        },
        "direction": {
          "type": "string",
          "enum": [
            "above",
            "below"
          ],
          "description": "Direction that opens the incident. Defaults to `above` when omitted."
        },
        "sensitivity": {
          "type": "integer",
          "minimum": 1,
          "maximum": 6,
          "description": "Detector sensitivity from 1 (noisiest) to 6 (strictest). Defaults to 3 when omitted."
        },
        "window": {
          "type": "object",
          "properties": {
            "minutes": {
              "type": "integer",
              "minimum": 5,
              "description": "How long the threshold must stay crossed before the incident opens. Minimum 5."
            }
          },
          "required": [
            "minutes"
          ],
          "description": "Sustained-condition window."
        }
      },
      "required": [
        "trigger",
        "metric",
        "window"
      ]
    },
    "AlertMetricThreshold": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "absolute"
              ],
              "description": "Compare the metric against a fixed value; read `value`."
            },
            "value": {
              "type": "number",
              "minimum": 0,
              "exclusiveMinimum": true,
              "description": "Metric value that opens the incident."
            }
          },
          "required": [
            "mode",
            "value"
          ]
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "multiplier"
              ],
              "description": "Compare the metric rate against `factor × baseline`; read `factor` and `baseline`."
            },
            "factor": {
              "type": "number",
              "minimum": 0,
              "exclusiveMinimum": true,
              "description": "Multiple of the baseline rate that opens the incident (e.g. `3` = 3×)."
            },
            "baseline": {
              "$ref": "#/$defs/AlertBaseline"
            }
          },
          "required": [
            "mode",
            "factor",
            "baseline"
          ]
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "expected"
              ],
              "description": "Compare against the seasonally-learned expected value for this time of day/week."
            },
            "sensitivity": {
              "type": "integer",
              "minimum": 1,
              "maximum": 6,
              "description": "Detector sensitivity from 1 (noisiest) to 6 (strictest). Defaults to 3 when omitted."
            }
          },
          "required": [
            "mode"
          ]
        }
      ],
      "description": "How the metric is compared."
    },
    "AlertThresholdCondition": {
      "type": "object",
      "properties": {
        "trigger": {
          "type": "string",
          "enum": [
            "threshold"
          ],
          "description": "Opens once the measured value crosses the threshold."
        },
        "metric": {
          "$ref": "#/$defs/MonitorMetric"
        },
        "threshold": {
          "$ref": "#/$defs/AlertMetricThreshold"
        },
        "direction": {
          "type": "string",
          "enum": [
            "above",
            "below"
          ],
          "description": "Direction that opens the incident. Defaults to `above` when omitted."
        }
      },
      "required": [
        "trigger",
        "metric",
        "threshold"
      ]
    },
    "FilterCondition": {
      "type": "object",
      "properties": {
        "op": {
          "type": "string",
          "enum": [
            "eq",
            "neq",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "notIn",
            "contains",
            "notContains",
            "gtePercentile"
          ],
          "description": "Comparison operator applied to the field's value (e.g. `eq`, `neq`, `in`). The full operator list lives in the API reference."
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            }
          ],
          "description": "Right-hand value compared against the field. Arrays are required for `in` / `notIn`-style operators."
        }
      },
      "required": [
        "op",
        "value"
      ]
    },
    "MonitorFilterSet": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/FilterCondition"
        }
      },
      "description": "Additional filters applied when evaluating the monitor."
    },
    "MonitorMetric": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "count"
              ],
              "description": "Count matching events in each evaluation bucket."
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "errorRate"
              ],
              "description": "Measure the fraction of matching events that errored."
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "cacheHitRate"
              ],
              "description": "Token-weighted prompt-cache hit rate (cache-read tokens over total input-side tokens), a 0..1 fraction."
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "avg"
              ],
              "description": "Average a numeric field over matching events."
            },
            "field": {
              "type": "string",
              "enum": [
                "duration",
                "cost",
                "tokens"
              ],
              "description": "Numeric field to aggregate."
            }
          },
          "required": [
            "kind",
            "field"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "sum"
              ],
              "description": "Sum a numeric field over matching events."
            },
            "field": {
              "type": "string",
              "enum": [
                "duration",
                "cost",
                "tokens"
              ],
              "description": "Numeric field to aggregate."
            }
          },
          "required": [
            "kind",
            "field"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "min"
              ],
              "description": "Find the minimum numeric field value over matching events."
            },
            "field": {
              "type": "string",
              "enum": [
                "duration",
                "cost",
                "tokens"
              ],
              "description": "Numeric field to aggregate."
            }
          },
          "required": [
            "kind",
            "field"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "max"
              ],
              "description": "Find the maximum numeric field value over matching events."
            },
            "field": {
              "type": "string",
              "enum": [
                "duration",
                "cost",
                "tokens"
              ],
              "description": "Numeric field to aggregate."
            }
          },
          "required": [
            "kind",
            "field"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "median"
              ],
              "description": "Find the median numeric field value over matching events."
            },
            "field": {
              "type": "string",
              "enum": [
                "duration",
                "cost",
                "tokens"
              ],
              "description": "Numeric field to aggregate."
            }
          },
          "required": [
            "kind",
            "field"
          ]
        }
      ],
      "description": "Metric measured over the monitor target."
    },
    "MonitorTarget": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "savedSearch",
            "tool",
            "user",
            "session"
          ],
          "description": "Product target category: `savedSearch`, `tool`, `user`, or `session`."
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 24,
          "maxLength": 24,
          "description": "Target entity id, or `null` for project-wide targets."
        },
        "filterSet": {
          "$ref": "#/$defs/MonitorFilterSet"
        },
        "query": {
          "type": [
            "string",
            "null"
          ],
          "description": "Semantic query applied when evaluating inline trace targets."
        },
        "kind": {
          "type": "string",
          "enum": [
            "savedSearch",
            "tool",
            "user",
            "session"
          ],
          "description": "Normalized target kind returned on persisted monitors."
        },
        "stream": {
          "type": "string",
          "enum": [
            "traces",
            "spans",
            "sessions"
          ],
          "description": "Telemetry stream evaluated by the monitor."
        },
        "savedSearchId": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 24,
          "maxLength": 24,
          "description": "Saved-search id for saved-search monitors, or `null` for inline targets."
        },
        "metric": {
          "allOf": [
            {
              "$ref": "#/$defs/MonitorMetric"
            },
            {
              "description": "Default metric evaluated for this target."
            }
          ]
        }
      },
      "required": [
        "type",
        "id"
      ],
      "description": "Entity or filter set watched by this monitor."
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/latitude-so-create-monitor-body"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.