---
title: "Получить список"
method: GET
path: "/api-v2/departments"
tags: ["Отделы"]
---

# Получить список

`GET /api-v2/departments`

## Request

- Base URL: `https://api-docs.yougile.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.yougile.com/api-v2/departments`
- Auth: HTTP bearer

## Query parameters

- `includeDeleted` boolean
- `limit` number
- `offset` number
- `title` string
- `parentId` string

## Response `200`

- DepartmentListDto
  - `paging` PagingMetadata, required
    - `count` number, required: Количество элементов в результате
    - `limit` number, required: Количество элементов на страницу
    - `offset` number, required: Индекс первого элемента страницы
    - `next` boolean, required: Есть ли элементы после данной страницы
  - `content` DepartmentListDtoBase[], required: Список отделов
    - `deleted` boolean: Если true, значит объект удален
    - `id` string, required: ID объекта
    - `title` string, required: Название отдела
    - `parentId` string: Id родительского отдела. Оставить пустым или "-", если это отдел верхнего уровня
    - `users` object: Сотрудники на отделе и их роль. Возможные значения: <br/><div>1) manager или member</div><div>2) "-" или "" для удаления существующего пользователя из отдела</div>

## Other responses

- `404`

---

[API](https://skmtc.dev/yougile/apis/yougile-rest-api-v2-0.md) - [All operations](https://skmtc.dev/yougile/apis/yougile-rest-api-v2-0/llms.txt) - [OpenAPI document](https://skmtc.dev/yougile/apis/yougile-rest-api-v2-0/revisions/9452cba35716?raw)
