Skip to content

Error Tracking

Capture errors and exceptions, group them into issues, search and resolve — Sentry-style error monitoring.

1. Overview

Base path: https://api.infrai.cc/v1/errors
Auth header: Authorization: Bearer $INFRAI_API_KEY
bash
# Call any /v1/errors capability over raw HTTP — no SDK to install.
# curl:
curl https://api.infrai.cc/v1/errors/... \
  -H "Authorization: Bearer $INFRAI_API_KEY" \
  -H "Content-Type: application/json"

2. Methods (9)

2.1errors.capture

POST /v1/errors/capture

Capture an application error with optional tags.

Parameters

NameTypeRequiredDescription
messagestring
Required
Human-readable error message.
codestringOptionalOptional application error code.
stackstringOptionalOptional stack trace.
tagsRecord<string, string>OptionalKey/value tags for grouping.

Returns

{ ok, error_id }
NameTypeDescription
event_idstringUnique identifier for this event
pattern: ^evt_err_[A-Za-z0-9]{20,}$
fingerprintstringHex sha256 used for grouping.
error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
is_new_groupbooleanWhether this capture created a new error group
dashboard_urlstringURL to view this resource in the dashboard
format: uri

Example

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X POST https://api.infrai.cc/v1/errors/capture \
  -H "Authorization: Bearer $INFRAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

2.2errors.message

POST /v1/errors/message

上报一条结构化错误或日志消息

Parameters

NameTypeRequiredDescription
textstring
Required
消息正文
≥ 1 chars
level"debug" | "info" | "warning" | "error" | "fatal"Optional级别:debug/info/warning/error/fatal
default: "info"
tagsRecord<string, string>Optional键值标签,便于过滤与分组
user_idstringOptional关联的用户 ID
releasestringOptional发布版本标识
environment"production" | "staging" | "development" | nullOptional环境:production/staging/development
idempotency_keystringOptional幂等键,用于避免重复写入

Returns

CaptureResult
NameTypeDescription
event_idstringUnique identifier for this event
pattern: ^evt_err_[A-Za-z0-9]{20,}$
fingerprintstringHex sha256 used for grouping.
error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
is_new_groupbooleanWhether this capture created a new error group
dashboard_urlstringURL to view this resource in the dashboard
format: uri

Example

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X POST https://api.infrai.cc/v1/errors/message \
  -H "Authorization: Bearer $INFRAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "hello"}'

2.3errors.list

GET /v1/errors/list

分页列出捕获到的错误事件

Parameters

NameTypeRequiredDescription
filterRecord<string, unknown>Optional过滤条件(观测过滤 DSL)
cursorstringOptional分页游标
limitnumberOptional每页返回数量

Returns

ErrorEventList
NameTypeDescription
itemsobject[]Array of result items in this page
items[].event_idstringUnique identifier for this event
pattern: ^evt_err_[A-Za-z0-9]{20,}$
items[].fingerprintstringHex sha256 grouping fingerprint.
items[].error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
items[].timestampstringUnix timestamp of the data point
format: date-time
items[].level"debug" | "info" | "warning" | "error" | "fatal"Severity or log level (e.g. info, warn, error)
items[].titlestringShort title or summary
items[].messagestring | nullDetailed message content
items[].environmentstring | nullDeployment environment (e.g. production, staging)
items[].releasestring | nullSoftware release version
items[].user_idstring | nullUser identifier associated with this resource
items[].tagsobject | nullTags for categorization and filtering
items[].is_resolvedbooleanWhether this error or group is marked as resolved
items[].is_ignoredbooleanWhether this error or group is marked as ignored
items[].dashboard_urlstringURL to view this resource in the dashboard
format: uri
next_cursorstring | nullOpaque cursor to fetch the next page; null/absent if this is the last page
totalintegerTotal number of items across all pages
≥ 0

Example

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/errors/list \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.4errors.search

GET /v1/errors/search

按关键词搜索错误事件

Parameters

NameTypeRequiredDescription
qstring
Required
搜索关键词
filterRecord<string, unknown>Optional过滤条件(观测过滤 DSL)
cursorstringOptional分页游标
limitnumberOptional每页返回数量

Returns

ErrorEventList
NameTypeDescription
itemsobject[]Array of result items in this page
items[].event_idstringUnique identifier for this event
pattern: ^evt_err_[A-Za-z0-9]{20,}$
items[].fingerprintstringHex sha256 grouping fingerprint.
items[].error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
items[].timestampstringUnix timestamp of the data point
format: date-time
items[].level"debug" | "info" | "warning" | "error" | "fatal"Severity or log level (e.g. info, warn, error)
items[].titlestringShort title or summary
items[].messagestring | nullDetailed message content
items[].environmentstring | nullDeployment environment (e.g. production, staging)
items[].releasestring | nullSoftware release version
items[].user_idstring | nullUser identifier associated with this resource
items[].tagsobject | nullTags for categorization and filtering
items[].is_resolvedbooleanWhether this error or group is marked as resolved
items[].is_ignoredbooleanWhether this error or group is marked as ignored
items[].dashboard_urlstringURL to view this resource in the dashboard
format: uri
next_cursorstring | nullOpaque cursor to fetch the next page; null/absent if this is the last page
totalintegerTotal number of items across all pages
≥ 0

Example

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/errors/search \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.5errors.get

GET /v1/errors/get/{event_id}

按事件 ID 获取错误事件详情

Parameters

NameTypeRequiredDescription
event_idstring
Required
错误事件 ID

Returns

ErrorEvent
NameTypeDescription
event_idstringUnique identifier for this event
pattern: ^evt_err_[A-Za-z0-9]{20,}$
fingerprintstringFingerprint hash for error grouping
pattern: ^[a-f0-9]{64}$
error_group_idstringIdentifier of the error group this event belongs to
timestampstringUnix timestamp of the data point
format: date-time
level"debug" | "info" | "warning" | "error" | "fatal"Severity or log level (e.g. info, warn, error)
titlestringShort title or summary
messagestring | nullDetailed message content
environment"production" | "staging" | "development" | nullDeployment environment (e.g. production, staging)
releasestring | nullSoftware release version
user_idstring | nullUser identifier associated with this resource
tagsobjectTags for categorization and filtering
is_resolvedbooleanWhether this error or group is marked as resolved
default: false
is_ignoredbooleanWhether this error or group is marked as ignored
default: false
exceptionobject | nullException details including type and stacktrace
breadcrumbsobject[]List of breadcrumb events leading up to the error
contextobjectAdditional context data for the error
extraobjectExtra metadata attached to the error event
idempotency_keystring | nullDedup key for errors.capture (route is idempotent:true).

Example

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/errors/get/EVENT_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.6errors.groups

GET /v1/errors/groups

分页列出错误分组

Parameters

NameTypeRequiredDescription
status'unresolved' | 'resolved' | 'ignored'Optional按状态过滤:unresolved/resolved/ignored
sort'count_desc' | 'last_seen_desc' | 'first_seen_desc'Optional排序方式:count_desc/last_seen_desc/first_seen_desc
cursorstringOptional分页游标
limitnumberOptional每页返回数量

Returns

ErrorGroupList
NameTypeDescription
groupsobject[]List of error group objects
groups[].error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
groups[].fingerprintstringFingerprint hash for error grouping
groups[].titlestringShort title or summary
groups[].first_seen_atstringISO 8601 timestamp when this was first observed
format: date-time
groups[].last_seen_atstringISO 8601 timestamp when this was last observed
format: date-time
groups[].countintegerTotal number of items across all pages
≥ 1
groups[].user_countintegerNumber of unique users affected
≥ 0
groups[].level"debug" | "info" | "warning" | "error" | "fatal"Severity or log level (e.g. info, warn, error)
groups[].is_resolvedbooleanWhether this error or group is marked as resolved
groups[].is_ignoredbooleanWhether this error or group is marked as ignored
groups[].assigned_tostring | nullUser assigned to investigate this error group
groups[].sample_event_idstringID of a sample event from this error group
pattern: ^evt_err_[A-Za-z0-9]{20,}$
groups[].environmentsstring[] | nullList of environments where this error has been seen
groups[].releasesstring[] | nullList of software releases where this error has been seen
groups[].trend_24hobject | nullObject with current, previous, and change_pct.
groups[].sparklineinteger[] | null24-bucket hourly event counts for mini chart.
groups[].dashboard_urlstringURL to view this resource in the dashboard
format: uri
next_cursorstring | nullOpaque cursor for next page; null = end.
totalintegerTotal number of items across all pages
≥ 0

Example

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/errors/groups \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.7errors.group_detail

GET /v1/errors/group_detail/{error_group_id}

获取错误分组的聚合详情

Parameters

NameTypeRequiredDescription
error_group_idstring
Required
错误分组 ID

Returns

ErrorGroupDetail
NameTypeDescription
error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
fingerprintstringFingerprint hash for error grouping
titlestringShort title or summary
first_seen_atstringISO 8601 timestamp when this was first observed
format: date-time
last_seen_atstringISO 8601 timestamp when this was last observed
format: date-time
countintegerTotal number of items across all pages
≥ 1
user_countintegerNumber of unique users affected
≥ 0
levelstringSeverity or log level (e.g. info, warn, error)
is_resolvedbooleanWhether this error or group is marked as resolved
is_ignoredbooleanWhether this error or group is marked as ignored
assigned_tostring | nullUser assigned to investigate this error group
sample_event_idstringID of a sample event from this error group
environmentsstring[] | nullList of environments where this error has been seen
releasesstring[] | nullList of software releases where this error has been seen
trend_24hobject | null24-hour trend data for this error group
sparklineinteger[] | nullSparkline data points for error frequency visualization
dashboard_urlstringURL to view this resource in the dashboard
format: uri
representative_eventobjectRepresentative error event for this group
representative_event.event_idstringUnique identifier for this event
pattern: ^evt_err_[A-Za-z0-9]{20,}$
representative_event.fingerprintstringFingerprint hash for error grouping
representative_event.error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
representative_event.timestampstringUnix timestamp of the data point
format: date-time
representative_event.level"debug" | "info" | "warning" | "error" | "fatal"Severity or log level (e.g. info, warn, error)
representative_event.titlestringShort title or summary
representative_event.messagestring | nullDetailed message content
representative_event.environmentstring | nullDeployment environment (e.g. production, staging)
representative_event.releasestring | nullSoftware release version
representative_event.user_idstring | nullUser identifier associated with this resource
representative_event.tagsobject | nullTags for categorization and filtering
representative_event.is_resolvedbooleanWhether this error or group is marked as resolved
representative_event.is_ignoredbooleanWhether this error or group is marked as ignored
representative_event.dashboard_urlstringURL to view this resource in the dashboard
format: uri
representative_event.exceptionobjectException details including type and stacktrace
representative_event.exception.typestringException class name, e.g. 'NullPointerException'.
representative_event.exception.valuestringException message.
representative_event.exception.stacktraceobject[]Stack trace of the error
representative_event.exception.stacktrace[].funcstringFunction name in the stack frame
representative_event.exception.stacktrace[].filestringSource file name in the stack frame
representative_event.exception.stacktrace[].lineintegerLine number in the source file
≥ 0
representative_event.exception.stacktrace[].colinteger | nullColumn number in the source file
≥ 0
representative_event.exception.stacktrace[].in_appbooleantrue if frame is in user code; false for SDK / stdlib.
representative_event.exception.stacktrace[].context_prestring[] | nullUp to 5 lines of source before the error line.
representative_event.exception.stacktrace[].context_linestring | nullSource line where the error occurred.
representative_event.exception.stacktrace[].context_poststring[] | nullSource code lines after the error line
representative_event.exception.stacktrace[].varsobject | nullLocal variable snapshot (PII scrubbed).
representative_event.breadcrumbsobject[]List of breadcrumb events leading up to the error
representative_event.breadcrumbs[].atstringISO 8601 timestamp of the event
format: date-time
representative_event.breadcrumbs[].categorystringConsent category (e.g. marketing, analytics)
e.g. http
representative_event.breadcrumbs[].messagestringDetailed message content
representative_event.breadcrumbs[].level"debug" | "info" | "warning" | "error" | "critical" | nullSeverity or log level (e.g. info, warn, error)
representative_event.breadcrumbs[].dataobject | nullFree-form structured data attached to this breadcrumb.
representative_event.contextobject | nullAdditional context data for the error
representative_event.extraobject | nullExtra metadata attached to the error event
representative_event.sdkobject | nullObject with name and version.
representative_event.runtimeobject | nullObject with name, version, and os.
representative_event.requestobject | nullHTTP request info (scrubbed).
representative_event.userobject | nullUser info (scrubbed).
representative_event.fingerprint_source"default" | "user" | "rule"Source of the error fingerprint
representative_event.received_atstringISO 8601 timestamp when the error was received by the server
format: date-time
representative_event.group_first_seen_atstringISO 8601 timestamp when this group was first seen
format: date-time
representative_event.group_last_seen_atstringISO 8601 timestamp when this group was last seen
format: date-time
representative_event.group_countintegerNumber of events in this error group
≥ 1
representative_event.group_user_countintegerNumber of unique users affected in this group
≥ 0
tag_distributionobject | nullObject mapping tag name to count.
user_distributionobject | nullTop affected users: object mapping user_id to count.
release_distributionobject | nullDistribution of events across software releases
environment_distributionobject | nullDistribution of events across environments
timelineobject[] | null24h time-series points.
commentsobject[] | nullList of comments on this error group
activity_logobject[] | nullList of activity log entries for the error group

Example

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.8errors.events

GET /v1/errors/events/{error_group_id}

列出某错误分组下的事件

Parameters

NameTypeRequiredDescription
error_group_idstring
Required
错误分组 ID
cursorstringOptional分页游标
limitnumberOptional每页返回数量

Returns

ErrorEventList
NameTypeDescription
itemsobject[]Array of result items in this page
items[].event_idstringUnique identifier for this event
pattern: ^evt_err_[A-Za-z0-9]{20,}$
items[].fingerprintstringHex sha256 grouping fingerprint.
items[].error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
items[].timestampstringUnix timestamp of the data point
format: date-time
items[].level"debug" | "info" | "warning" | "error" | "fatal"Severity or log level (e.g. info, warn, error)
items[].titlestringShort title or summary
items[].messagestring | nullDetailed message content
items[].environmentstring | nullDeployment environment (e.g. production, staging)
items[].releasestring | nullSoftware release version
items[].user_idstring | nullUser identifier associated with this resource
items[].tagsobject | nullTags for categorization and filtering
items[].is_resolvedbooleanWhether this error or group is marked as resolved
items[].is_ignoredbooleanWhether this error or group is marked as ignored
items[].dashboard_urlstringURL to view this resource in the dashboard
format: uri
next_cursorstring | nullOpaque cursor to fetch the next page; null/absent if this is the last page
totalintegerTotal number of items across all pages
≥ 0

Example

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.9errors.resolve

POST /v1/errors/resolve/{error_group_id}

将错误分组标记为已解决

Parameters

NameTypeRequiredDescription
error_group_idstring
Required
错误分组 ID
pattern: ^errgrp_[A-Za-z0-9]{20,}$

Returns

ErrorGroup
NameTypeDescription
error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
fingerprintstringFingerprint hash for error grouping
titlestringShort title or summary
first_seen_atstringISO 8601 timestamp when this was first observed
format: date-time
last_seen_atstringISO 8601 timestamp when this was last observed
format: date-time
countintegerTotal number of items across all pages
≥ 1
user_countintegerNumber of unique users affected
≥ 0
levelstringSeverity or log level (e.g. info, warn, error)
is_resolvedbooleanWhether this error or group is marked as resolved
is_ignoredbooleanWhether this error or group is marked as ignored
assigned_tostring | nullUser assigned to investigate this error group
sample_event_idstringID of a sample event from this error group
environmentsstring[] | nullList of environments where this error has been seen
releasesstring[] | nullList of software releases where this error has been seen
trend_24hobject | null24-hour trend data for this error group
sparklineinteger[] | nullSparkline data points for error frequency visualization
dashboard_urlstringURL to view this resource in the dashboard
format: uri
representative_eventobjectRepresentative error event for this group
representative_event.event_idstringUnique identifier for this event
pattern: ^evt_err_[A-Za-z0-9]{20,}$
representative_event.fingerprintstringFingerprint hash for error grouping
representative_event.error_group_idstringIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
representative_event.timestampstringUnix timestamp of the data point
format: date-time
representative_event.level"debug" | "info" | "warning" | "error" | "fatal"Severity or log level (e.g. info, warn, error)
representative_event.titlestringShort title or summary
representative_event.messagestring | nullDetailed message content
representative_event.environmentstring | nullDeployment environment (e.g. production, staging)
representative_event.releasestring | nullSoftware release version
representative_event.user_idstring | nullUser identifier associated with this resource
representative_event.tagsobject | nullTags for categorization and filtering
representative_event.is_resolvedbooleanWhether this error or group is marked as resolved
representative_event.is_ignoredbooleanWhether this error or group is marked as ignored
representative_event.dashboard_urlstringURL to view this resource in the dashboard
format: uri
representative_event.exceptionobjectException details including type and stacktrace
representative_event.exception.typestringException class name, e.g. 'NullPointerException'.
representative_event.exception.valuestringException message.
representative_event.exception.stacktraceobject[]Stack trace of the error
representative_event.exception.stacktrace[].funcstringFunction name in the stack frame
representative_event.exception.stacktrace[].filestringSource file name in the stack frame
representative_event.exception.stacktrace[].lineintegerLine number in the source file
≥ 0
representative_event.exception.stacktrace[].colinteger | nullColumn number in the source file
≥ 0
representative_event.exception.stacktrace[].in_appbooleantrue if frame is in user code; false for SDK / stdlib.
representative_event.exception.stacktrace[].context_prestring[] | nullUp to 5 lines of source before the error line.
representative_event.exception.stacktrace[].context_linestring | nullSource line where the error occurred.
representative_event.exception.stacktrace[].context_poststring[] | nullSource code lines after the error line
representative_event.exception.stacktrace[].varsobject | nullLocal variable snapshot (PII scrubbed).
representative_event.breadcrumbsobject[]List of breadcrumb events leading up to the error
representative_event.breadcrumbs[].atstringISO 8601 timestamp of the event
format: date-time
representative_event.breadcrumbs[].categorystringConsent category (e.g. marketing, analytics)
e.g. http
representative_event.breadcrumbs[].messagestringDetailed message content
representative_event.breadcrumbs[].level"debug" | "info" | "warning" | "error" | "critical" | nullSeverity or log level (e.g. info, warn, error)
representative_event.breadcrumbs[].dataobject | nullFree-form structured data attached to this breadcrumb.
representative_event.contextobject | nullAdditional context data for the error
representative_event.extraobject | nullExtra metadata attached to the error event
representative_event.sdkobject | nullObject with name and version.
representative_event.runtimeobject | nullObject with name, version, and os.
representative_event.requestobject | nullHTTP request info (scrubbed).
representative_event.userobject | nullUser info (scrubbed).
representative_event.fingerprint_source"default" | "user" | "rule"Source of the error fingerprint
representative_event.received_atstringISO 8601 timestamp when the error was received by the server
format: date-time
representative_event.group_first_seen_atstringISO 8601 timestamp when this group was first seen
format: date-time
representative_event.group_last_seen_atstringISO 8601 timestamp when this group was last seen
format: date-time
representative_event.group_countintegerNumber of events in this error group
≥ 1
representative_event.group_user_countintegerNumber of unique users affected in this group
≥ 0
tag_distributionobject | nullObject mapping tag name to count.
user_distributionobject | nullTop affected users: object mapping user_id to count.
release_distributionobject | nullDistribution of events across software releases
environment_distributionobject | nullDistribution of events across environments
timelineobject[] | null24h time-series points.
commentsobject[] | nullList of comments on this error group
activity_logobject[] | nullList of activity log entries for the error group

Example

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X POST https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"error_group_id": "sample"}'

3. All capabilities

Every routed capability in this module — the complete public REST contract. The methods above are the guided walkthrough; this index is the full reference.

errors.capturePOST /v1/errors/capture

Capture an error event, aggregated into a group by fingerprint.

Parameters (13)
NameTypeRequiredDescription
titlestring | nullOptionalShort error title; falls back to message or exception.value.
messagestring | nullOptionalDetailed message content
exceptionobject | nullOptionalStructured exception, e.g. {type, value, stacktrace}.
levelstringOptionalSeverity level (e.g. error, warning, info).
default: "error"
tagsobject | nullOptionalTags for categorization and filtering
user_idstring | nullOptionalUser identifier associated with this resource
fingerprintstring | string[] | nullOptionalGrouping fingerprint.
breadcrumbsobject[] | nullOptionalList of breadcrumb events leading up to the error
contextobject | nullOptionalAdditional context data for the error
extraobject | nullOptionalExtra metadata attached to the error event
environmentstring | nullOptionalDeployment environment (e.g. production, staging)
releasestring | nullOptionalSoftware release version
idempotency_keystring | nullOptionalClient-provided idempotency key; prevents duplicate execution on retry
errors.eventsGET /v1/errors/events/{error_group_id}

Page through all events within an error group.

Parameters (1)
NameTypeRequiredDescription
error_group_idstringRequiredPath parameter.
errors.getGET /v1/errors/get/{event_id}

Get the details of one error event by event ID.

Parameters (1)
NameTypeRequiredDescription
event_idstringRequiredPath parameter.
errors.group_detailGET /v1/errors/group_detail/{error_group_id}

Get the aggregated details of a specified error group.

Parameters (1)
NameTypeRequiredDescription
error_group_idstringRequiredPath parameter.
errors.groupsGET /v1/errors/groups

Page through error groups, with status filtering and sorting.

No request parameters.

errors.listGET /v1/errors/list

Page through captured error events, with filtering.

No request parameters.

errors.messagePOST /v1/errors/message

Capture a structured error/log message (level, tags, user, release, environment).

Parameters (7)
NameTypeRequiredDescription
textstringRequiredMessage body; becomes the event title.
≥ 1 chars
level"debug" | "info" | "warning" | "error" | "fatal"OptionalSeverity or log level (e.g. info, warn, error)
default: "info"
tagsobject | nullOptionalTags for categorization and filtering
user_idstring | nullOptionalUser identifier associated with this resource
releasestring | nullOptionalSoftware release version
environment"production" | "staging" | "development" | nullOptionalDeployment environment (e.g. production, staging)
idempotency_keystring | nullOptionalClient-provided idempotency key; prevents duplicate execution on retry
errors.resolvePOST /v1/errors/resolve/{error_group_id}

Mark an error group as resolved.

Parameters (1)
NameTypeRequiredDescription
error_group_idstringRequiredIdentifier of the error group this event belongs to
pattern: ^errgrp_[A-Za-z0-9]{20,}$
errors.searchGET /v1/errors/search

Full-text search error events by keyword.

No request parameters.

4. End-to-end example

A production-style walkthrough of this module: configure once, then run the flow. It exercises most of the module's APIs.

A copy-paste-runnable single-file Python program (stdlib only, no SDK): set your INFRAI_API_KEY, run it, and walk this module's core flow with REAL billed calls — later steps reuse real fields returned by earlier ones. The 12-line helper is the entire integration.

python
#!/usr/bin/env python3
"""Infrai · errors — runnable real-app example (single file, zero deps).

Copy this file, set your key, run it: every step is a REAL call to
api.infrai.cc, billed at the real (tiny) per-call price, printing the
live JSON response. Get a key at https://infrai.cc/login (Google/
GitHub sign-in grants $2 free credit); add funds at
https://infrai.cc/billing. No SDK — the 12-line helper below is the
entire integration."""
import json
import os
from urllib import error, request

KEY = os.environ.get("INFRAI_API_KEY") or "ifr_..."  # <- your key
BASE = "https://api.infrai.cc"


# Same raw HTTPS POST/GET as every per-method example on this page —
# wrapped once for reuse. There is nothing else to it: no SDK.
def infrai(method, path, body=None):
    req = request.Request(
        BASE + path, method=method,
        data=json.dumps(body).encode() if body is not None else None,
        headers={"Authorization": f"Bearer {KEY}",
                 "Content-Type": "application/json"})
    try:
        with request.urlopen(req, timeout=60) as r:
            return json.loads(r.read())
    except error.HTTPError as e:
        return json.loads(e.read())


def show(label, resp):
    print(f"\n== {label} ==")
    print(json.dumps(resp, indent=2, ensure_ascii=False))
    return resp


# 1) errors.capture — POST /v1/errors/capture · Capture an error event, aggregated into a group by fingerprint.
r1 = show("errors.capture", infrai("POST", "/v1/errors/capture", {"exception":{"type":"ValueError","message":"bad input","stacktrace":"..."},"level":"error"}))

# 2) errors.message — POST /v1/errors/message · Capture a structured error/log message (level, tags, user, release, environment).
r2 = show("errors.message", infrai("POST", "/v1/errors/message", {"text":"hello"}))

# 3) errors.list — GET /v1/errors/list · Page through captured error events, with filtering.
r3 = show("errors.list", infrai("GET", "/v1/errors/list"))