---
title: "🔒 Получение ленты логов активности пользователей и сущностей."
method: GET
path: "/states/activity"
tags: ["States"]
---

# 🔒 Получение ленты логов активности пользователей и сущностей.

`GET /states/activity`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/states/activity`
- Auth: one of:
  - API key in header `sid` and API key in header `rts` and API key in header `sig`
  - HTTP bearer

Получение ленты логов активности пользователей и сущностей.

**Access:** `authorized` (10 ) · **Scope:** `read`

**Allows:** `user:activity` (все обязательны; проверка в команде по ресурсу из запроса)

### TypeScript (copy-paste)

**`GET /states/activity`**

<details open><summary><b>Params</b></summary>

```typescript
export interface StatesActivityParams {
  nextCursor?: string | null
  author?: string | null
  userID?: string | null
  resID?: string | null
  resTypeGroup?: states_activity_resTypeGroup | null
  dtRange?: states_activity_dtRange | null
  startDt?: string | null
  finishDt?: string | null
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type StatesActivityResponse = IServerResponse<Resp_states_activity>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Query parameters

- `nextCursor` string, nullable
- `author` string, nullable
- `userID` string, uuid, nullable
- `resID` string, uuid, nullable
- `resTypeGroup` 'project' | 'product' | 'version' | 'feature' | 'task' | 'bug' | 'meeting' | 'chat' | 'profile' | 'administration' | 'worklog': `project` = "project", `product` = "product", `version` = "version", `feature` = "feature", `task` = "task", `bug` = "bug", `meeting` = "meeting", `chat` = "chat", `profile` = "profile", `administration` = "administration", `worklog` = "worklog"
- `dtRange` '24h' | 'iteration' | 'month' | 'range': `24h` = "24h", `iteration` = "iteration", `month` = "month", `range` = "range"
- `startDt` string, date-time, nullable
- `finishDt` string, date-time, nullable

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Response `200`

OK — `IServerResponse<Resp_states_activity>`

- object
  - `code` integer, required
  - `data` RespStatesActivity, required: ResponseData for states/activity
    - `minStartDt` string, date-time
    - `list` UserActivityLogs[], required
      - `ID` string, uuid, required
      - `cID` string, uuid, nullable
      - `dt` string, date-time, required
      - `iterationKey` integer, required
      - `dayKey` integer, required: Day key (YYYYMMDD or internal day index)
      - `monthKey` integer, required
      - `session` object, nullable
      - `authorID` string, uuid, required
      - `apiTokenID` string, uuid, nullable
      - `snapshot` object, required
      - `resParentID` string, nullable
      - `resID` string, uuid, required
      - `resType` 1 | 2 | 10 | 20 | 21 | 22 | 30 | 40 | 50 | 60 | 70 | 80 | 100 | 110 | 120 | 130 | 140 | 145 | 150 | 151 | 160 | 170 | 180 | 200 | 201 | 202 | 203 | 300 | 305 | 306 | 310 | 320 | 400, required: `company` = 1, `dictionary` = 2, `project` = 10, `product` = 20, `module` = 21, `component` = 22, `version` = 30, `feature` = 40, `task` = 50, `bug` = 60, `meeting` = 70, `entityRelation` = 80, `user` = 100, `userRole` = 110, `userTimeOff` = 120, `userEmployment` = 130, `userPrivilege` = 140, `userProductAccess` = 145, `worklog` = 150, `worklogsGroup` = 151, `session` = 160, `apiToken` = 170, `accessDenied` = 180, `payments` = 200, `paymentAwardPart` = 201, `payrollDocsSend` = 202, `payrollRecalc` = 203, `integrationGit` = 300, `gitAgentAction` = 305, `agentMemory` = 306, `integrationMeeting` = 310, `integrationFigma` = 320, `chat` = 400
      - `changes` object, required
      - `parentLogID` string, uuid, nullable
    - `tasks` object
    - `meetings` object
    - `products` object
    - `repositories` object: #27040 Репозитории записей о действиях через Git-интеграцию (создание ветки и др.)
    - `nextCursor` string, nullable
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest: Invalid parameters (resID specified without resTypeGroup or author=others without userID)
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Non-admin user attempted to watch activity logs of another user
- `404`: NotFound: Entity of the specified resTypeGroup not found by resID
- `406`: TimeResync — расхождение rts с сервером

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
