Skip to content

Errors API ​

JavaScript errors grouped by cause (the message without numbers and ids, and the script without query or build hash).

All paths are relative to https://your-site.com/api/v1. Send Authorization: Bearer <token> and Accept: application/json; see authentication and errors.

MethodPathWhat it does
GET/sites/{site}/errorsThe site's JavaScript errors grouped by cause, with counts and a daily trend for the period
GET/sites/{site}/errors/{error}One error group with its stack, daily trend (default 30 days) and the pages and devices it happened on most
PATCH/sites/{site}/errors/{error}Resolves, ignores or reopens an error group (recordings:write)
GET/sites/{site}/errors/requestsThe site's requests per endpoint, slow ones first
GET/sites/{site}/errors/requests/{endpoint}/sessionsThe latest 50 sessions where a request was slow
GET/sites/{site}/errors/{error}/sessionsThe latest 50 sessions the error happened in

GET /sites/{site}/errors ​

The site's JavaScript errors grouped by cause, with counts and a daily trend for the period

Groups seen in the period (default the last 14 days) of one status (default open), 50 per page. period_* count the period only; occurrences and sessions count since the group was first seen. meta.counts holds how many groups each status has in the period, meta.trend the site's errors per day (ignored groups left out) and meta.sessions how many sessions had at least one.

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
statusquerystringOne of: open, resolved, ignored, all. Default "open".
qquerystringText in the message or script address.
daysqueryintegerOne of: 1, 7, 14, 30, 90. Default 14.
sortquerystringOne of: sessions, occurrences, last_seen, first_seen. Default "sessions".
pagequeryintegerMinimum 1.

Responses ​

  • 200 — Error groups.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].idinteger
data[].messagestringThe latest message of the group.
data[].sourcestring, nullableScript it came from.
data[].lineinteger, nullable
data[].columninteger, nullable
data[].urlstring, nullablePage it last happened on.
data[].statusstringOne of: open, resolved, ignored.
data[].occurrencesinteger
data[].sessionsinteger
data[].first_seen_atstring (date-time)
data[].last_seen_atstring (date-time)
data[].resolved_atstring (date-time), nullable
data[].regressed_atstring (date-time), nullableWhen a resolved group last came back.
data[].period_occurrencesinteger
data[].period_sessionsinteger
data[].trendinteger[]Occurrences per day of the period, oldest first.
metaobject
meta.current_pageinteger
meta.last_pageinteger
meta.totalinteger
meta.countsobject
meta.counts.openinteger
meta.counts.resolvedinteger
meta.counts.ignoredinteger
meta.trendinteger[]
meta.sessionsinteger
meta.periodobject
meta.period.fromstring (date)
meta.period.tostring (date)
meta.period.daysinteger
meta.loggedbooleanWhether the site ever logged an error (any period, any status); false shows "No errors have been logged for this site yet."
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/errors" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

GET /sites/{site}/errors/{error} ​

One error group with its stack, daily trend (default 30 days) and the pages and devices it happened on most

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
errorpathintegeryes
daysqueryintegerOne of: 1, 7, 14, 30, 90. Default 30.

Responses ​

  • 200 — The group.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.messagestringThe latest message of the group.
data.sourcestring, nullableScript it came from.
data.lineinteger, nullable
data.columninteger, nullable
data.urlstring, nullablePage it last happened on.
data.statusstringOne of: open, resolved, ignored.
data.occurrencesinteger
data.sessionsinteger
data.first_seen_atstring (date-time)
data.last_seen_atstring (date-time)
data.resolved_atstring (date-time), nullable
data.regressed_atstring (date-time), nullableWhen a resolved group last came back.
data.stackstring, nullable
data.trendinteger[]
data.pagesobject[]
data.pages[].urlstring, nullable
data.pages[].sessionsinteger
data.devicesobject[]
data.devices[].devicestring, nullable
data.devices[].sessionsinteger
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/errors/{error}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

PATCH /sites/{site}/errors/{error} ​

Resolves, ignores or reopens an error group (recordings:write)

A resolved group reopens by itself when the error happens again (regressed_at says when); an ignored one keeps counting but leaves the open list and the site's totals.

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
errorpathintegeryes

Request body ​

application/json, required

FieldTypeRequiredDescription
statusstringyesOne of: open, resolved, ignored.

Responses ​

  • 200 — The group.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.messagestringThe latest message of the group.
data.sourcestring, nullableScript it came from.
data.lineinteger, nullable
data.columninteger, nullable
data.urlstring, nullablePage it last happened on.
data.statusstringOne of: open, resolved, ignored.
data.occurrencesinteger
data.sessionsinteger
data.first_seen_atstring (date-time)
data.last_seen_atstring (date-time)
data.resolved_atstring (date-time), nullable
data.regressed_atstring (date-time), nullableWhen a resolved group last came back.
bash
curl -X PATCH "https://your-site.com/api/v1/sites/{site}/errors/{error}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"status":"open"}'

GET /sites/{site}/errors/requests ​

The site's requests per endpoint, slow ones first

Every fetch / XHR call of the period grouped by method, host and path (ids folded to :id), with calls, slow ones (at least meta.slow_from_ms, the errors.slow_request_ms setting), failed ones, average and longest time, and the sessions with a slow call.

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
daysqueryintegerOne of: 1, 7, 14, 30, 90. Default 14.
qquerystringMatches the path or the server. At most 200 characters.
sortquerystringOne of: slow, avg, max, calls, failed. Default "slow".
pagequeryintegerMinimum 1.

Responses ​

  • 200 — The endpoints.
  • 404 — Missing, or another account's.
  • 422 —
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].idinteger
data[].methodstring
data[].hoststring
data[].pathstring
data[].example_urlstring, nullable
data[].callsinteger
data[].slowinteger
data[].failedinteger
data[].avg_msinteger
data[].max_msinteger
data[].sessionsinteger
data[].last_seen_atstring (date-time)
metaobject
meta.current_pageinteger
meta.last_pageinteger
meta.totalinteger
meta.slow_from_msinteger
meta.loggedboolean
meta.periodobject
meta.totalsobject
meta.totals.callsinteger
meta.totals.slowinteger
meta.totals.failedinteger
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/errors/requests" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

GET /sites/{site}/errors/requests/{endpoint}/sessions ​

The latest 50 sessions where a request was slow

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
endpointpathintegeryes

Responses ​

  • 200 — Session ids, the first slow call (ms since epoch, replay from there), how many slow calls, the longest, page and device.
  • 404 — Missing, or another account's.
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].sessionstring (uuid)
data[].at_msinteger
data[].slowinteger
data[].max_msinteger
data[].urlstring, nullable
data[].devicestring, nullable
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/errors/requests/{endpoint}/sessions" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

GET /sites/{site}/errors/{error}/sessions ​

The latest 50 sessions the error happened in

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
errorpathintegeryes

Responses ​

  • 200 — Session ids (replay at GET /sites/{site}/sessions/{session}), when the error first happened in each (ms since epoch), how often, page and device.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].sessionstring (uuid)
data[].at_msinteger
data[].occurrencesinteger
data[].urlstring, nullable
data[].devicestring, nullable
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/errors/{error}/sessions" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

Replora: see what your visitors see.