---
title: "System Events Query"
method: GET
path: "/api/event"
tags: ["System Events"]
---

# System Events Query

`GET /api/event`

## Request

- Base URL: `https://api.lytics.io`
- URL: `https://api.lytics.io/api/event`
- Auth: API key in header `Authorization`

Get list of system events.

```
# get the dashboard news items
curl -s -H "Authorization: $LIOKEY" \
  -XGET "https://api.lytics.io/api/event?query=dashboard_news" | jq '.'

# get list of all segments created in last 2 weeks
curl -s -H "Authorization: $LIOKEY" \
  -XGET "https://api.lytics.io/api/event?type=segment&start=now-2w&limit=100&verb=created" | jq '.'


# get list of all events performed by user X

# 1) first find a user id
curl -s -H "Authorization: $LIOKEY" \
  -XGET "https://api.lytics.io/api/user/user.email@yourdomain.com" | jq '.'

# 2) get the id for that user
curl -s -H "Authorization: $LIOKEY" \
  -XGET "https://api.lytics.io/api/event?type=user&id=USER_ID_FROM_PREVIOUS" | jq '.'


```

## Query parameters

- `account_id` string
- `before` string
- `after` string
- `limit` integer
- `verb` string
- `type` string
- `id` string

## Response `200`

OK

- SystemEventsModel
  - `data` object[]
    - `id` string, required
    - `ts` string, required
    - `priority` number, required
    - `subject_type` string, required
    - `subject_id` string, required
    - `verb` string, required
    - `account_id` string, required
    - `related` object[]
      - `type` string
      - `id` string
    - `context` object
      - `in` string
  - `message` string
  - `status` number

---

[API](https://skmtc.dev/lytics/apis/v1-lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/v1-lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/v1-lytics-api/revisions/339fd1d88486?raw)
