# imopenlines.config.list.get

URL: https://chugunov.pro/api-bitrix24/imopenlines/openlines/imopenlines-config-list-get/
Проверено на Битрикс24 REST API, обновлено 11.09.2026 (ревизия источника fb39d6c).
Источник: официальная документация Битрикс24 (bitrix-tools/b24-rest-docs, лицензия MIT, © Bitrix). Справочник независимый, официальной документацией не является.

Получить список открытых линий
Scope: `imopenlines`
Кто может выполнять метод: любой пользователь

## Описание

Метод `imopenlines.config.list.get` получает список открытых линий.

## Параметры

- `PARAMS` `object` — необязательный. Параметры выборки [(подробное описание)](#params)
- `OPTIONS` `object` — необязательный. Дополнительные опции [(подробное описание)](#options)

### Параметр PARAMS

- `select` `array` — необязательный. Массив содержит [список полей](#result), которые необходимо выбрать.
  Можно указывать поля из таблицы [Элемент массива result](#result). Поля `QUEUE`, `QUEUE_USERS_FIELDS`, `CONFIG_QUEUE` возвращаются только через `OPTIONS`
- `order` `object` — необязательный. Объект для сортировки списка открытых линий в формате `{"field_1": "value_1", ... "field_N": "value_N"}`
  Направление сортировки может принимать значения: 
  - `asc` — по возрастанию
  - `desc` — по убыванию
  Для `field_N` используйте поля из таблицы [Элемент массива result](#result). Поля `QUEUE`, `QUEUE_USERS_FIELDS`, `CONFIG_QUEUE` не поддерживаются в `order`
- `filter` `object` — необязательный. Объект для фильтрации списка открытых линий в формате `{"field_1": "value_1", ... "field_N": "value_N"}`
  Для `field_N` используйте поля из таблицы [Элемент массива result](#result). Поля `QUEUE`, `QUEUE_USERS_FIELDS`, `CONFIG_QUEUE` не поддерживаются в `filter`
- `limit` `integer` — необязательный. Количество элементов на страницу. По умолчанию: `50`. Максимальное значение: `200`
- `offset` `integer` — необязательный. Смещение для постраничной выборки. По умолчанию: `0`

### Параметр OPTIONS

- `QUEUE` `char` — необязательный. Возвращать очередь операторов. Возможные значения:
  - `Y` — да
  - `N` — нет
- `CONFIG_QUEUE` `char` — необязательный. Возвращать очередь линии. Каждый элемент очереди содержит `ENTITY_TYPE` и `ENTITY_ID`. Возможные значения:
  - `Y` — да
  - `N` — нет
- `CHECK_PERMISSION` `string` — необязательный. Проверять доступ к линиям по указанному действию из карты прав открытых линий

## Ответ

HTTP-статус: 200

```json
{
    "result": [
        {
            "ID": "15",
            "LINE_NAME": "Линия поддержки VIP",
            "ACTIVE": "Y",
            "QUEUE": [101, 205],
            "QUEUE_USERS_FIELDS": {
                "101": {
                    "USER_NAME": "Иван Петров",
                    "USER_WORK_POSITION": "Оператор",
                    "USER_AVATAR": "https://example.bitrix24.ru/upload/main/a1b/avatar.jpg",
                    "USER_AVATAR_ID": 312
                },
                "205": {
                    "USER_NAME": "Анна Смирнова",
                    "USER_WORK_POSITION": null,
                    "USER_AVATAR": "",
                    "USER_AVATAR_ID": null
                }
            },
            "CONFIG_QUEUE": [
                {
                    "ENTITY_ID": "10",
                    "ENTITY_TYPE": "department"
                }
            ]
        },
        {
            "ID": "16",
            "LINE_NAME": "Линия продаж",
            "ACTIVE": "Y",
            "QUEUE": [101],
            "QUEUE_USERS_FIELDS": {
                "101": {
                    "USER_NAME": "Иван Петров",
                    "USER_WORK_POSITION": "Оператор",
                    "USER_AVATAR": "https://example.bitrix24.ru/upload/main/a1b/avatar.jpg",
                    "USER_AVATAR_ID": 312
                }
            },
            "CONFIG_QUEUE": []
        }
    ],
    "time": {
        "start": 1741688574.50636,
        "finish": 1741688574.701981,
        "duration": 0.19562101364135742,
        "processing": 0.09473705291748047,
        "date_start": "2025-03-11T10:29:34+03:00",
        "date_finish": "2025-03-11T10:29:34+03:00",
        "operating_reset_at": 1741689174,
        "operating": 0
    }
}
```

### Возвращаемые данные

- `result` `array`. Список открытых линий [(подробное описание)](#result)
- `time` `time`. Информация о времени выполнения запроса

## Ошибки

HTTP-статус: 400

```json
{
    "error": "INVALID_FORMAT",
    "error_description": "A wrong format for the PARAMS field 'filter' is passed"
}
```

- `400` — `INVALID_FORMAT`. Unsupported PARAMS fields are passed: ...
- `400` — `INVALID_FORMAT`. A wrong format for the PARAMS field 'select' is passed
- `400` — `INVALID_FORMAT`. A wrong format for the PARAMS field 'order' is passed
- `400` — `INVALID_FORMAT`. A wrong format for the PARAMS field 'filter' is passed
- `400` — `INVALID_FORMAT`. A non-negative integer is expected in the PARAMS field 'limit'
- `400` — `INVALID_FORMAT`. A non-negative integer is expected in the PARAMS field 'offset'
- `400` — `INVALID_FORMAT`. A wrong field name is passed in the PARAMS field 'select'
- `400` — `INVALID_FORMAT`. A wrong field name is passed in the PARAMS field 'order'
- `400` — `INVALID_FORMAT`. A wrong field name is passed in the PARAMS field 'filter'
- `400` — `INVALID_FORMAT`. An unknown field '...' is passed in the PARAMS field 'select'
- `400` — `INVALID_FORMAT`. An unknown field '...' is passed in the PARAMS field 'order'
- `400` — `INVALID_FORMAT`. An unknown field '...' is passed in the PARAMS field 'filter'
- `400` — `INVALID_FORMAT`. A wrong field alias is passed in the PARAMS field 'select'
- `400` — `INVALID_FORMAT`. The alias '...' matches an existing field in the PARAMS field 'select'
- `400` — `INVALID_FORMAT`. A wrong sorting direction is passed in the PARAMS field 'order'
- `400` — `INVALID_FORMAT`. Unsupported OPTIONS fields are passed: ...
- `400` — `INVALID_FORMAT`. A wrong format for the OPTIONS field 'QUEUE' is passed
- `400` — `INVALID_FORMAT`. A wrong format for the OPTIONS field 'CONFIG_QUEUE' is passed
- `400` — `INVALID_FORMAT`. An unknown value for the OPTIONS field 'CHECK_PERMISSION' is passed

## Примеры запроса

### cURL (Webhook)

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "PARAMS": {
      "select": ["ID", "LINE_NAME", "ACTIVE"],
      "order": {"ID": "ASC"},
      "filter": {"ACTIVE": "Y"},
      "limit": 50,
      "offset": 0
    },
    "OPTIONS": {
      "QUEUE": "Y",
      "CONFIG_QUEUE": "Y"
    }
  }' \
  https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/imopenlines.config.list.get
```

### cURL (OAuth)

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "PARAMS": {
      "select": ["ID", "LINE_NAME", "ACTIVE"],
      "order": {"ID": "ASC"},
      "filter": {"ACTIVE": "Y"},
      "limit": 50,
      "offset": 0
    },
    "OPTIONS": {
      "QUEUE": "Y",
      "CONFIG_QUEUE": "Y"
    },
    "auth": "**put_access_token_here**"
  }' \
  https://**put_your_bitrix24_address**/rest/imopenlines.config.list.get
```

### JS (TS)

```ts
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'

declare const $b24: B24Frame

// Shape of each OpenLineItem returned in result[]
type OpenLineItem = {
  ID: string
  LINE_NAME: string
  ACTIVE: string
  QUEUE?: number[]
  QUEUE_USERS_FIELDS?: Record<string, {
    USER_NAME: string | null
    USER_WORK_POSITION: string | null
    USER_AVATAR: string | null
    USER_AVATAR_ID: number | null
  }>
  CONFIG_QUEUE?: Array<{
    ENTITY_ID: string
    ENTITY_TYPE: string
  }>
}

try {
  // imopenlines.config.list.get returns a single page (max 50 records). For the whole result set
  // use a list helper: $b24.actions.v2.callList.make() returns every record as one
  // array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
  // NOTE: the list helpers do not accept `order` (it is excluded from their params, so
  // passing it is a TS error) — keep this call.make + `start` variant when sort matters.
  const response = await $b24.actions.v2.call.make<OpenLineItem[]>({
    method: 'imopenlines.config.list.get',
    params: {
      PARAMS: {
        select: ['ID', 'LINE_NAME', 'ACTIVE'],
        order: { ID: 'ASC' },
        filter: { ACTIVE: 'Y' },
        limit: 50,
        offset: 0,
      },
      OPTIONS: {
        QUEUE: 'Y',
        CONFIG_QUEUE: 'Y',
      },
    },
    requestId: Text.getUuidRfc4122()
  })

  // The payload is available only on a successful response
  if (!response.isSuccess) {
    console.error(response.getErrorMessages().join('; '))
  } else {
    const result = response.getData()!.result
    console.info('Open lines count:', result.length, 'First line:', result[0]?.LINE_NAME)
  }
} catch (error) {
  // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
  console.error(error)
}
```

### JS (UMD)

```html
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
  async function getOpenLineList() {
    try {
      // Initialize the SDK inside a Bitrix24 frame
      const $b24 = await B24Js.initializeB24Frame()

      // imopenlines.config.list.get returns a single page (max 50 records). For the whole result set
      // use a list helper: $b24.actions.v2.callList.make() returns every record as one
      // array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
      // NOTE: the list helpers do not accept `order` (it is excluded from their params, so
      // passing it is a TS error) — keep this call.make + `start` variant when sort matters.
      const response = await $b24.actions.v2.call.make({
        method: 'imopenlines.config.list.get',
        params: {
          PARAMS: {
            select: ['ID', 'LINE_NAME', 'ACTIVE'],
            order: { ID: 'ASC' },
            filter: { ACTIVE: 'Y' },
            limit: 50,
            offset: 0,
          },
          OPTIONS: {
            QUEUE: 'Y',
            CONFIG_QUEUE: 'Y',
          },
        },
        requestId: B24Js.Text.getUuidRfc4122()
      })

      // The payload is available only on a successful response
      if (!response.isSuccess) {
        console.error(response.getErrorMessages().join('; '))
        return
      }

      const result = response.getData().result
      console.info('Open lines count:', result.length, 'First line:', result[0]?.LINE_NAME)
    } catch (error) {
      // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
      console.error(error)
    }
  }

  document.addEventListener('DOMContentLoaded', getOpenLineList)
</script>
```

### Python

```python
from b24pysdk.errors import BitrixAPIError, BitrixSDKException

try:
    bitrix_response = client.imopenlines.config.list.get(
        params={
            "select": [
                "ID",
                "LINE_NAME",
                "ACTIVE",
            ],
            "order": {
                "ID": "ASC",
            },
            "filter": {
                "ACTIVE": "Y",
            },
            "limit": 50,
            "offset": 0,
        },
        options={
            "QUEUE": "Y",
            "CONFIG_QUEUE": "Y",
        },
    ).response
    result = bitrix_response.result
    print(result)
except BitrixAPIError as error:
    print(
        "Ошибка Bitrix API",
        f"error: {error.error}",
        f"error_description: {error.error_description}",
        sep="\n",
    )
except BitrixSDKException as error:
    print(f"Ошибка Bitrix SDK: {error.message}")
except Exception as error:
    print(f"Непредвиденная ошибка: {error}")
```

### PHP

```php
try {
    $response = $b24Service
        ->core
        ->call(
            'imopenlines.config.list.get',
            [
                'PARAMS' => [
                    'select' => ['ID', 'LINE_NAME', 'ACTIVE'],
                    'order' => ['ID' => 'ASC'],
                    'filter' => ['ACTIVE' => 'Y'],
                    'limit' => 50,
                    'offset' => 0,
                ],
                'OPTIONS' => [
                    'QUEUE' => 'Y',
                    'CONFIG_QUEUE' => 'Y',
                ],
            ]
        );

    $result = $response
        ->getResponseData()
        ->getResult();

    print_r($result);
} catch (Throwable $e) {
    echo $e->getMessage();
}
```

### BX24.js

```js
BX24.callMethod(
    'imopenlines.config.list.get',
    {
        PARAMS: {
            select: ['ID', 'LINE_NAME', 'ACTIVE'],
            order: { ID: 'ASC' },
            filter: { ACTIVE: 'Y' },
            limit: 50,
            offset: 0
        },
        OPTIONS: {
            QUEUE: 'Y',
            CONFIG_QUEUE: 'Y'
        }
    },
    function(result)
    {
        if (result.error())
        {
            console.error(result.error());
        }
        else
        {
            console.log(result.data());
        }
    }
);
```

### PHP CRest

```php
require_once('crest.php');

$result = CRest::call(
    'imopenlines.config.list.get',
    [
        'PARAMS' => [
            'select' => ['ID', 'LINE_NAME', 'ACTIVE'],
            'order' => ['ID' => 'ASC'],
            'filter' => ['ACTIVE' => 'Y'],
            'limit' => 50,
            'offset' => 0,
        ],
        'OPTIONS' => [
            'QUEUE' => 'Y',
            'CONFIG_QUEUE' => 'Y',
        ],
    ]
);

print_r($result);
```

### Go

```go
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "imopenlines.config.list.get", b24.Params{
	"PARAMS": b24.Params{
		"select": []string{"ID", "LINE_NAME", "ACTIVE"},
		"order": b24.Params{
			"ID": "ASC",
		},
		"filter": b24.Params{
			"ACTIVE": "Y",
		},
		"limit":  50,
		"offset": 0,
	},
	"OPTIONS": b24.Params{
		"QUEUE":        "Y",
		"CONFIG_QUEUE": "Y",
	},
}, b24.WithIdempotent())
if err != nil {
	return fmt.Errorf("imopenlines.config.list.get: %w", err)
}

var items []struct {
	ID       b24.ID `json:"ID"`
	LineName string `json:"LINE_NAME"`
	Active   string `json:"ACTIVE"`
}
if err := json.Unmarshal(res.Result, &items); err != nil {
	return fmt.Errorf("разбор ответа: %w", err)
}
for _, it := range items {
	fmt.Println(it.ID, it.LineName)
}
```

Оригинал в официальной документации: https://apidocs.bitrix24.ru/api-reference/imopenlines/openlines/imopenlines-config-list-get.html
