---
title: "🔒 Завершение конкретной выбранной сессии пользователя по её ID."
method: GET
path: "/logout/terminate"
tags: ["Auth"]
---

# 🔒 Завершение конкретной выбранной сессии пользователя по её ID.

`GET /logout/terminate`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/logout/terminate`
- Auth: API key in header `sid` and API key in header `rts` and API key in header `sig`

Завершение конкретной выбранной сессии пользователя по её ID.

**Access:** `authorized` (10 ) · **allowNullCompany:** true · **Scope:** `write` · **только веб-сессия**

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

### TypeScript (copy-paste)

**`GET /logout/terminate`**

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

```typescript
export interface LogoutTerminateParams {
  ID: string
}
```

</details>

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

```typescript
export type LogoutTerminateResponse = IServerResponse<Resp_logout_terminate>

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

- `ID` string, uuid, required

## Headers

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

## Response `200`

OK — `IServerResponse<Resp_logout_terminate>`

- object
  - `code` integer, required
  - `data` RespLogoutTerminate, required: ResponseData for logout/terminate
    - `terminated` boolean, required
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest / Validation — неверные params/body/headers
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Non-admin user attempted to terminate session belonging to another user
- `404`: NotFound: Session with specified ID does not exist
- `406`: TimeResync — расхождение rts с сервером
- `422`: UnprocessableContent: Specified session has already expired

---

[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)
