---
title: "Get database events"
method: GET
path: "/v1/databases/{databaseID}/events"
tags: ["Metrics & Events"]
---

# Get database events

`GET /v1/databases/{databaseID}/events`

## Request

- Base URL: `https://api.liara.ir`
- URL: `https://api.liara.ir/v1/databases/{databaseID}/events`
- Auth: HTTP bearer

Returns up to 100 lifecycle events of the database, such as started, stopped, restarted or out of memory. You can read events from the last 7 days. Team permission: `view`, `operate` or `manage`.

## Path parameters

- `databaseID` string, required: 24-character hexadecimal ID.

## Query parameters

- `teamID` string: 24-character hexadecimal ID.
- `start` integer
- `end` integer
- `direction` 'backward' | 'forward'
- `search` string

## Response `200`

Events. Each event can include additional fields not listed here.

- object
  - `data` object[]
    - `id` string: ID of the instance the event is about.
    - `action` string: What happened, for example `start`, `stop`, `restart` or `oom`.
    - `time` string: When it happened, in Unix seconds.

## Other responses

- `400`: The body or a parameter is invalid (`message` says which), or `teamID` isn't a valid ID.
- `401`: The API token is missing, invalid or expired.
- `403`: With `teamID`: you aren't a member of the team (`team_not_found`), or you don't have the required permission on this database (`no_permission`).
- `404`: The database doesn't exist.
- `503`: The data is temporarily unavailable. Try again later.

---

[API](https://skmtc.dev/liara-cloud/apis/dbaas.md) - [All operations](https://skmtc.dev/liara-cloud/apis/dbaas/llms.txt) - [OpenAPI document](https://skmtc.dev/liara-cloud/apis/dbaas/revisions/f6f78c6f05c6?raw)
