> For the complete documentation index, see [llms.txt](https://docs.currents.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.currents.dev/api/resources/errors-explorer.md).

# Errors Explorer

Query and filter errors from the Error Explorer.

Returns aggregated error metrics for a project within a date range, with optional filters for error target, message, category, action, tags, branches, authors, and groups.

## Get errors explorer

> Get aggregated error metrics for a project within a date range. Supports filtering by error\_target, error\_message, error\_category, error\_action, test\_title, tags, branches, authors, and groups.

```json
{"openapi":"3.0.2","info":{"title":"Currents REST API","version":"1.0.0"},"tags":[{"name":"Errors Explorer","description":"Query and filter errors from the Error Explorer.\n\nReturns aggregated error metrics for a project within a date range, with optional filters\nfor error target, message, category, action, tags, branches, authors, and groups."}],"servers":[{"url":"https://api.currents.dev/v1","description":"Production API"},{"url":"https://api-staging.currents.dev/v1","description":"Staging API"},{"url":"http://localhost:4000/v1","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key authentication using Bearer token"}},"parameters":{"ProjectIdPath":{"name":"projectId","in":"path","required":true,"description":"The project ID","schema":{"type":"string"}},"DateStartQuery":{"name":"date_start","in":"query","required":true,"description":"Start date in ISO 8601 format","schema":{"type":"string","format":"date-time"}},"DateEndQuery":{"name":"date_end","in":"query","required":true,"description":"End date in ISO 8601 format","schema":{"type":"string","format":"date-time"}},"PageQuery":{"name":"page","in":"query","required":false,"description":"Page number (0-indexed)","schema":{"type":"integer","minimum":0,"default":0}},"TagsQuery":{"name":"tags[]","in":"query","required":false,"description":"Filter by tags (can be specified multiple times using bracket notation, e.g., tags[]=value1&tags[]=value2)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},"BranchesQuery":{"name":"branches[]","in":"query","required":false,"description":"Filter by git branch. Use trailing `*` for prefix match (e.g. `release/*`). Max 250 characters per value.","schema":{"type":"array","items":{"$ref":"#/components/schemas/BranchFilterQueryValue"}},"style":"form","explode":true},"GroupsQuery":{"name":"groups[]","in":"query","required":false,"description":"Filter by groups (can be specified multiple times using bracket notation, e.g., groups[]=group1&groups[]=group2)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},"AuthorsQuery":{"name":"authors[]","in":"query","required":false,"description":"Filter by git authors (can be specified multiple times using bracket notation, e.g., authors[]=author1&authors[]=author2)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},"SortDirectionQuery":{"name":"dir","in":"query","required":false,"description":"Sort direction: `desc` (default) or `asc`.","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}}},"schemas":{"BranchFilterQueryValue":{"description":"Branch filter value: an exact branch name, or a trailing `*` for prefix match (e.g. `release/*`). Max 250 characters.","oneOf":[{"type":"string","description":"Exact branch name (must not contain `*` or spaces).","pattern":"^[!-)+-~]+$","maxLength":250},{"type":"string","description":"Prefix match: branch prefix followed by `*`.","pattern":"^[!-)+-~]+\\*$","maxLength":250}]},"ErrorsExplorerResponse":{"type":"object","required":["status","data"],"properties":{"status":{"type":"string","enum":["OK"]},"data":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/ErrorsExplorerItem"},"description":"Error items for the current page"},"timeline":{"type":"array","items":{"$ref":"#/components/schemas/ErrorsExplorerTimelineItem"},"description":"Time-bucketed top errors (date, count, items per bucket)"},"count":{"type":"integer","description":"Number of items in the current page"},"total":{"type":"integer","description":"Total number of errors matching the filter"},"nextPage":{"oneOf":[{"type":"integer"},{"type":"boolean"}],"description":"Next page number (0-indexed) or false if no more pages"}}}}},"ErrorsExplorerItem":{"type":"object","properties":{"message":{"type":"string","nullable":true},"error_category":{"type":"string","nullable":true},"error_action":{"type":"string","nullable":true},"error_target":{"type":"string","nullable":true},"signature":{"type":"string","nullable":true,"description":"Test signature. Present only when group_by includes `test`."},"title":{"type":"string","nullable":true,"description":"Test title. Present only when group_by includes `test`."},"spec":{"type":"string","nullable":true,"description":"Spec file path. Present only when group_by includes `test`."},"count":{"type":"integer"},"details":{"type":"object","properties":{"tests":{"type":"object","properties":{"count":{"type":"integer"}}},"branches":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"ErrorsExplorerTimelineItem":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ErrorsExplorerItem"}}}},"ErrorResponse":{"type":"object","required":["status","error"],"properties":{"status":{"type":"string","enum":["FAILED"]},"error":{"type":"string","description":"Error message"}}}},"responses":{"BadRequest":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/errors/{projectId}":{"get":{"summary":"Get errors explorer","description":"Get aggregated error metrics for a project within a date range. Supports filtering by error_target, error_message, error_category, error_action, test_title, tags, branches, authors, and groups.","operationId":"getErrorsExplorer","tags":["Errors Explorer"],"parameters":[{"$ref":"#/components/parameters/ProjectIdPath"},{"$ref":"#/components/parameters/DateStartQuery"},{"$ref":"#/components/parameters/DateEndQuery"},{"$ref":"#/components/parameters/PageQuery"},{"name":"limit","in":"query","required":false,"description":"Maximum number of results (1-100)","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"$ref":"#/components/parameters/TagsQuery"},{"name":"tags_logical_operator","in":"query","required":false,"description":"Logical operator for tags filter: OR (match any) or AND (match all). Default: OR.","schema":{"type":"string","enum":["OR","AND"],"default":"OR"}},{"$ref":"#/components/parameters/BranchesQuery"},{"$ref":"#/components/parameters/GroupsQuery"},{"$ref":"#/components/parameters/AuthorsQuery"},{"name":"error_target","in":"query","required":false,"description":"Filter by error target (e.g. CSS selector, URL)","schema":{"type":"string"}},{"name":"error_message","in":"query","required":false,"description":"Filter by error message (case-insensitive partial match)","schema":{"type":"string"}},{"name":"error_category","in":"query","required":false,"description":"Filter by error category","schema":{"type":"string"}},{"name":"error_action","in":"query","required":false,"description":"Filter by error action","schema":{"type":"string"}},{"name":"test_title","in":"query","required":false,"description":"Filter by test title (case-insensitive partial match)","schema":{"type":"string"}},{"name":"order_by","in":"query","required":false,"description":"Field to order results by","schema":{"type":"string","enum":["count","tests","branches","error"],"default":"count"}},{"$ref":"#/components/parameters/SortDirectionQuery"},{"name":"group_by[]","in":"query","required":false,"description":"Group results by dimension (can be specified multiple times using bracket notation, e.g., group_by[]=target&group_by[]=message). Order matters: the first value is the primary grouping and filters out nulls for that dimension; subsequent values are applied in order. Grouping by `test` additionally returns `signature`, `title`, and `spec` on each item.","schema":{"type":"array","items":{"type":"string","enum":["target","action","category","message","test"]}},"style":"form","explode":true},{"name":"metric","in":"query","required":false,"description":"Metric used for timeline ranking (occurrence, test, or branch)","schema":{"type":"string","enum":["occurrence","test","branch"],"default":"occurrence"}},{"name":"top_n","in":"query","required":false,"description":"Maximum number of top errors per timeline bucket (1-50). Default: 5.","schema":{"type":"integer","minimum":1,"maximum":50,"default":5}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsExplorerResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.currents.dev/api/resources/errors-explorer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
