Powiadomienia: metody API i eksport
Pobieraj powiadomienia, podsumowania, szeregi czasowe i wskaźniki monitoringu. Dokumentacja obejmuje też eksport CSV oraz jego parametry.
Na tej stronie
- GET /public-api/v1/diff-projects/{id}/alerts
- GET /public-api/v1/diff-projects/{id}/reports/{report_id}/alerts
- GET /public-api/v1/diff-projects/{id}/alerts/summary
- GET /public-api/v1/diff-projects/{id}/reports/{report_id}/alerts/summary
- GET /public-api/v1/diff-projects/{id}/alerts/timeseries
- GET /public-api/v1/diff-projects/{id}/alerts/export.csv
- GET /public-api/v1/diff-projects/{id}/alerts/metrics
- GET /public-api/v1/diff-projects/{id}/reports/{report_id}/alerts/metrics
Wybierz metodę ze spisu treści. Sprawdź metodę HTTP, ścieżkę, uprawnienia, wymagane parametry i treść żądania. Bloki JSON zawierające schema, properties i $ref opisują kontrakt; nie wysyłaj ich jako gotowej treści żądania. Przykłady żądań i schematy odpowiedzi są oznaczone osobno.
GET /public-api/v1/diff-projects/{id}/alerts
Parametry
Powiązane modele danych: 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"
}
}
Odpowiedzi
200
Alerty.
{
"headers": {
"X-Request-ID": {
"$ref": "#/components/headers/XRequestID"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiffAlertListResponse"
}
}
}
}
default
Bez poprawnego klucza nagłówki limitów dotyczą nieudanych prób z IP. Po uwierzytelnieniu dotyczą klucza lub konta. Mogą być pominięte przy wcześniejszej blokadzie lub niedostępnym liczniku. X-RateLimit-Reset to czas Unix w sekundach; Retry-After przy 429 to opóźnienie w sekundach.
{
"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
Parametry
Powiązane modele danych: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertListResponse · ErrorResponse · XID
id (path)
{
"required": true,
"schema": {
"$ref": "#/components/schemas/XID"
}
}
report_id (path)
Xid raportu lub literał last. Literał last jest akceptowany tylko w tym parametrze ścieżki.
{
"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"
}
}
Odpowiedzi
200
Alerty.
{
"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
Parametry
Powiązane modele danych: 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"
}
}
Odpowiedzi
200
Podsumowanie alertów.
{
"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
Parametry
Powiązane modele danych: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertSummaryResponse · ErrorResponse · XID
id (path)
{
"required": true,
"schema": {
"$ref": "#/components/schemas/XID"
}
}
report_id (path)
Xid raportu lub literał last. Literał last jest akceptowany tylko w tym parametrze ścieżki.
{
"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"
}
}
Odpowiedzi
200
Podsumowanie alertów.
{
"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
Parametry
Powiązane modele danych: 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"
}
}
Odpowiedzi
200
Szeregi czasowe alertów.
{
"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
Parametry
Powiązane modele danych: 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"
}
}
Odpowiedzi
200
Eksport CSV zakodowany dla arkuszy kalkulacyjnych.
{
"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
Parametry
Powiązane modele danych: 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"
}
}
Odpowiedzi
200
Format tekstowy Prometheus wyłącznie z etykietami o niskiej kardynalności.
{
"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
Parametry
Powiązane modele danych: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · XID
id (path)
{
"required": true,
"schema": {
"$ref": "#/components/schemas/XID"
}
}
report_id (path)
Xid raportu lub literał last. Literał last jest akceptowany tylko w tym parametrze ścieżki.
{
"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"
}
}
Odpowiedzi
200
Format tekstowy Prometheus wyłącznie z etykietami o niskiej kardynalności.
{
"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"
}
}
}
}
