API: LabeledEvents
Project-scoped no-code rules that derive named business events from privacy-safe autocapture signals.
На этой странице
- GET /projects/{id}/labeled-events
- POST /projects/{id}/labeled-events
- GET /projects/{id}/labeled-events/{ruleID}
- PATCH /projects/{id}/labeled-events/{ruleID}
- DELETE /projects/{id}/labeled-events/{ruleID}
- POST /projects/{id}/labeled-events/{ruleID}/disable
- POST /projects/{id}/labeled-events/{ruleID}/enable
- POST /projects/{id}/labeled-events/picker-token
- GET /projects/{id}/labeled-events/picker/captures
- POST /projects/{id}/labeled-events/preview
Раздел собран из спецификации OpenAPI продукта: 10 метод(ов). Поверхность — query-api (основной API, база /api/v1). Все методы требуют аутентификации.
Методы раздела
- GET
/projects/{id}/labeled-events - POST
/projects/{id}/labeled-events - GET
/projects/{id}/labeled-events/{ruleID} - PATCH
/projects/{id}/labeled-events/{ruleID} - DELETE
/projects/{id}/labeled-events/{ruleID} - POST
/projects/{id}/labeled-events/{ruleID}/disable - POST
/projects/{id}/labeled-events/{ruleID}/enable - POST
/projects/{id}/labeled-events/picker-token - GET
/projects/{id}/labeled-events/picker/captures - POST
/projects/{id}/labeled-events/preview
GET
/projects/{id}/labeled-events List project-scoped labeled-event rules (viewer+)
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 200 | Rules ordered by event name. | object |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
POST
/projects/{id}/labeled-events Create an active labeled-event rule (analyst+)
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
Тело запроса application/json , обязательно
| Поле | Тип | Описание |
|---|---|---|
base_event обязательно | enum(pp.click, pp.page_view, pp.form_submit) | |
selector необязательно | string | |
url_pattern необязательно | string | |
match_text необязательно | string | |
attributes необязательно | array<LabeledEventAttribute> | |
event_name обязательно | string | |
display_name необязательно | string | |
description необязательно | string |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 201 | Created rule. | LabeledEventRule |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 403 | Authenticated but not permitted (code=forbidden) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 409 | Event name already exists in the project. | Error |
| 422 | Request failed validation (code=validation_failed) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
GET
/projects/{id}/labeled-events/{ruleID} Read one project-scoped labeled-event rule (viewer+)
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
ruleID обязателен | Путь | integer (int64) | Project-scoped labeled-event rule id. |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 200 | Rule. | LabeledEventRule |
| 400 | Request failed validation (code=validation_failed) | Error |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
PATCH
/projects/{id}/labeled-events/{ruleID} Replace mutable rule metadata and match conditions (analyst+)
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
ruleID обязателен | Путь | integer (int64) | Project-scoped labeled-event rule id. |
Тело запроса application/json , обязательно
| Поле | Тип | Описание |
|---|---|---|
base_event обязательно | enum(pp.click, pp.page_view, pp.form_submit) | |
selector необязательно | string | |
url_pattern необязательно | string | |
match_text необязательно | string | |
attributes необязательно | array<LabeledEventAttribute> | |
event_name обязательно | string | |
display_name необязательно | string | |
description необязательно | string |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 200 | Updated rule. | LabeledEventRule |
| 400 | Request failed validation (code=validation_failed) | Error |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 403 | Authenticated but not permitted (code=forbidden) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 409 | Event name already exists in the project. | Error |
| 422 | Request failed validation (code=validation_failed) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
DELETE
/projects/{id}/labeled-events/{ruleID} Mark a rule for asynchronous deletion (analyst+)
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
ruleID обязателен | Путь | integer (int64) | Project-scoped labeled-event rule id. |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 204 | Rule marked deleting. | пусто |
| 400 | Request failed validation (code=validation_failed) | Error |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 403 | Authenticated but not permitted (code=forbidden) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
POST
/projects/{id}/labeled-events/{ruleID}/disable Disable a rule and schedule derived-row teardown (analyst+)
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
ruleID обязателен | Путь | integer (int64) | Project-scoped labeled-event rule id. |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 204 | Rule disabled. | пусто |
| 400 | Request failed validation (code=validation_failed) | Error |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 403 | Authenticated but not permitted (code=forbidden) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
POST
/projects/{id}/labeled-events/{ruleID}/enable Re-enable a rule and schedule materialization (analyst+)
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
ruleID обязателен | Путь | integer (int64) | Project-scoped labeled-event rule id. |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 204 | Rule enabled. | пусто |
| 400 | Request failed validation (code=validation_failed) | Error |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 403 | Authenticated but not permitted (code=forbidden) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
POST
/projects/{id}/labeled-events/picker-token Issue a ten-minute project-bound element-picker token (analyst+)
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 200 | Signed token and nonce. | PickerToken |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 403 | Authenticated but not permitted (code=forbidden) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
| 501 | Picker secret is not configured for this deployment. | Error |
GET
/projects/{id}/labeled-events/picker/captures Poll one short-lived sanitized picker capture (analyst+)
The signed token is a ten-minute capability bound to the current project. It is carried in the URL by the current client contract, so proxies and tracing must redact the `token` query parameter.
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
token обязателен | Query | string |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 200 | Capture readiness and sanitized selector metadata. | PickerCapturePoll |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 403 | Authenticated but not permitted (code=forbidden) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
| 501 | Picker secret or Redis capture reader is not configured. | Error |
POST
/projects/{id}/labeled-events/preview Preview a rule against the last 30 days without persistence (analyst+)
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
id обязателен | Путь | integer (int32) | Project id. |
Тело запроса application/json , обязательно
| Поле | Тип | Описание |
|---|---|---|
base_event обязательно | enum(pp.click, pp.page_view, pp.form_submit) | |
selector необязательно | string | |
url_pattern необязательно | string | |
match_text необязательно | string | |
attributes необязательно | array<LabeledEventAttribute> | |
event_name необязательно | string | |
display_name необязательно | string | |
description необязательно | string |
Ответы
| Код | Что означает | Тело |
|---|---|---|
| 200 | Matching raw-event count. | LabeledEventPreview |
| 401 | Missing or invalid credentials (code=unauthorized) | Error |
| 403 | Authenticated but not permitted (code=forbidden) | Error |
| 404 | Resource not found (code=not_found) | Error |
| 422 | Request failed validation (code=validation_failed) | Error |
| 429 | Rate limit (code=rate_limited) or plan quota exceeded (code=quota_exceeded). On ingest operations a live trial that exhausted its total event cap answers code=trial_quota_exceeded instead of quota_exceeded. Заголовки: Retry-After.
| Error |
Источник раздела — docs/api/openapi.yaml репозитория продукта,
версия API 1.0.0, OpenAPI 3.0.3,
снимок 095579325c2d.
Расхождение снимка со спецификацией роняет сборку документации.