# Get an error group's history

`GET /v1/groups/{group_id}/history`

Requires role member or higher.

Occurrences, tickets, releases and a weekday by hour heatmap over 7, 30 or 90 days, counted per environment. `days` above the plan's `retention_days` is 403 `plan-limit-reached`.

## Authentication

A session token: `Authorization: Bearer <session token>`, or the session cookie in the browser. Requires role `member` or higher.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `days` | query |  | no |  |
| `environment` | query | string | no | Counts of this environment only. |
| `group_id` | path | string | yes |  |

## Responses

### 200

An error group's behaviour over a range: occurrences, tickets, releases and a weekday by hour heatmap. Zero-filled.

`application/json`

```json
{
  "additionalProperties": false,
  "description": "An error group's behaviour over a range: occurrences, tickets, releases and a weekday by hour heatmap. Zero-filled.",
  "properties": {
    "bucket_hours": {
      "anyOf": [
        {
          "enum": [
            1
          ],
          "type": "number"
        },
        {
          "enum": [
            6
          ],
          "type": "number"
        },
        {
          "enum": [
            24
          ],
          "type": "number"
        }
      ],
      "description": "1 for 7 days, 6 for 30, 24 for 90. Longer buckets are cut in the project's time zone, so one may span 5, 7, 23 or 25 hours."
    },
    "busiest": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "hour": {
              "description": "Hour in the project's time zone.",
              "maximum": 23,
              "minimum": 0,
              "type": "integer"
            },
            "occurrences": {
              "description": "Occurrences in this cell.",
              "minimum": 0,
              "type": "integer"
            },
            "share": {
              "description": "Fraction of `total`.",
              "maximum": 1,
              "minimum": 0,
              "type": "number"
            },
            "weekday": {
              "description": "ISO weekday in the project's time zone, 1 = Monday.",
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "weekday",
            "hour",
            "occurrences",
            "share"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "counting_since": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The oldest hour still counted, in any environment; null when there is none. Time before it was not counted, which is not the same as no occurrences."
    },
    "days": {
      "anyOf": [
        {
          "enum": [
            7
          ],
          "type": "number"
        },
        {
          "enum": [
            30
          ],
          "type": "number"
        },
        {
          "enum": [
            90
          ],
          "type": "number"
        }
      ]
    },
    "environments": {
      "description": "Environments with counted occurrences, whatever the `environment` filter; the first 50 by name. A group counts at most 50, and the rest under `(other)`.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "first_seen": {
      "format": "date-time",
      "type": "string"
    },
    "heatmap": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "hour": {
            "description": "Hour in the project's time zone.",
            "maximum": 23,
            "minimum": 0,
            "type": "integer"
          },
          "occurrences": {
            "description": "Occurrences in this cell.",
            "minimum": 0,
            "type": "integer"
          },
          "weekday": {
            "description": "ISO weekday in the project's time zone, 1 = Monday.",
            "maximum": 7,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "weekday",
          "hour",
          "occurrences"
        ],
        "type": "object"
      },
      "maxItems": 168,
      "minItems": 168,
      "type": "array"
    },
    "releases": {
      "description": "Releases first seen in the range, oldest first.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "first_seen": {
            "format": "date-time",
            "type": "string"
          },
          "release": {
            "type": "string"
          }
        },
        "required": [
          "release",
          "first_seen"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "retention_days": {
      "description": "Longest range the organization's plan allows.",
      "minimum": 1,
      "type": "integer"
    },
    "series": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "occurrences": {
            "description": "Occurrences in the bucket starting at `start`.",
            "minimum": 0,
            "type": "integer"
          },
          "start": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "start",
          "occurrences"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "tickets": {
      "description": "The group's tickets created in the range, oldest first, at most 500; not filtered by environment.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "pattern": "^tkt_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "enum": [
                  "new"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "spike"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "regression"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "recurrence"
                ],
                "type": "string"
              }
            ]
          },
          "replay_anchor": {
            "description": "The moment a replay of this ticket stops at.",
            "format": "date-time",
            "type": "string"
          },
          "severity": {
            "anyOf": [
              {
                "enum": [
                  "critical"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "high"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "medium"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "low"
                ],
                "type": "string"
              }
            ]
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "severity",
          "reason",
          "title",
          "created_at",
          "replay_anchor"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "timezone": {
      "description": "The project's IANA time zone (notification settings).",
      "type": "string"
    },
    "total": {
      "description": "Occurrences in the range.",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "days",
    "retention_days",
    "bucket_hours",
    "timezone",
    "first_seen",
    "counting_since",
    "environments",
    "series",
    "tickets",
    "releases",
    "heatmap",
    "busiest",
    "total"
  ],
  "type": "object"
}
```

### 401

unauthorized: no valid session, or the email is not verified.

Problem type: [unauthorized](https://docs.dlogify.com/errors/unauthorized.md).

### 404

not-found: the resource does not exist, or the caller is not a member of its organization.

Problem type: [not-found](https://docs.dlogify.com/errors/not-found.md).

### 422

validation-failed: the request does not match the schema.

Problem type: [validation-failed](https://docs.dlogify.com/errors/validation-failed.md).

### 429

rate-limited: per-user management request limit.

Problem type: [rate-limited](https://docs.dlogify.com/errors/rate-limited.md).

## Example

```bash
curl -X GET "https://api.dlogify.com/v1/groups/{group_id}/history" \
  -H "Authorization: Bearer $DLOGIFY_SESSION"
```

Source: https://docs.dlogify.com/api/error-groups/getErrorGroupHistory
