Home / Alerts: API methods and exports

Alerts: API methods and exports

Read project or report events, aggregate metrics and time series. Use the separate methods for CSV exports and monitoring metrics.

On this page

Choose a method from the contents. Check its HTTP method, path, scopes, required parameters and request body. JSON blocks containing schema, properties and $ref describe the contract; do not send them as a ready-made request body. Request examples and response schemas are labelled separately.

GET /public-api/v1/diff-projects/{id}/alerts

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertListResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

created_from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

created_to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

limit (query)

{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}

offset (query)

{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

Responses

200

Alerts.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertListResponse"
      }
    }
  }
}

default

Public API error. Rate-limit headers describe the limit actually checked: failed authentication attempts per IP for missing or invalid keys, or the applicable key/account limit after authentication. They may be absent for access blocks before rate-limit checks or when the limiter is unavailable. X-RateLimit-Reset is a Unix timestamp in seconds; Retry-After is a delay in seconds for 429.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/{report_id}/alerts

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertListResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

report_id (path)

Report xid or the literal last. The literal last is accepted only in this path parameter.

{
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 4,
    "maxLength": 64,
    "pattern": "^([A-Za-z0-9_-]+|last)$"
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

limit (query)

{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}

offset (query)

{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

Responses

200

Alerts.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertListResponse"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/alerts/summary

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertSummaryResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

created_from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

created_to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

Responses

200

Alerts summary.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertSummaryResponse"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/{report_id}/alerts/summary

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertSummaryResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

report_id (path)

Report xid or the literal last. The literal last is accepted only in this path parameter.

{
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 4,
    "maxLength": 64,
    "pattern": "^([A-Za-z0-9_-]+|last)$"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

Responses

200

Alerts summary.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertSummaryResponse"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/alerts/timeseries

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertTimeseriesResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

interval (query)

{
  "schema": {
    "type": "string",
    "enum": [
      "hour",
      "day"
    ],
    "default": "day"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

Responses

200

Alerts timeseries.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertTimeseriesResponse"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/alerts/export.csv

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

created_from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

created_to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

bom (query)

{
  "schema": {
    "type": "boolean",
    "default": true
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

Responses

200

CSV export encoded for spreadsheet tools.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "Content-Disposition": {
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "text/csv": {
      "schema": {
        "type": "string"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/alerts/metrics

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

created_from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

created_to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

Responses

200

Prometheus text format with low-cardinality labels only.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "text/plain": {
      "schema": {
        "type": "string"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/{report_id}/alerts/metrics

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

report_id (path)

Report xid or the literal last. The literal last is accepted only in this path parameter.

{
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 4,
    "maxLength": 64,
    "pattern": "^([A-Za-z0-9_-]+|last)$"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

Responses

200

Prometheus text format with low-cardinality labels only.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "text/plain": {
      "schema": {
        "type": "string"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}