# imopenlines.v2.Operator.list

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

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

## Описание

Метод `imopenlines.v2.Operator.list` получает список операторов с текущим статусом и нагрузкой.

## Параметры

- `configId` `integer` — необязательный. Идентификатор открытой линии.
  Идентификатор можно получить методом [imopenlines.config.list.get](https://chugunov.pro/api-bitrix24/imopenlines/openlines/imopenlines-config-list-get/)
- `configIdList` `integer[]` — необязательный. Список идентификаторов открытых линий.
  Идентификаторы можно получить методом [imopenlines.config.list.get](https://chugunov.pro/api-bitrix24/imopenlines/openlines/imopenlines-config-list-get/).
  Если переданы `configIdList` и `configId`, используется `configIdList`.
  Максимум: 1000 элементов
- `userId` `integer` — необязательный. Идентификатор оператора.
  Идентификатор можно получить методом [user.get](https://chugunov.pro/api-bitrix24/user/user-get/) или [user.search](https://chugunov.pro/api-bitrix24/user/user-search/)
- `userIdList` `integer[]` — необязательный. Список идентификаторов операторов.
  Идентификаторы можно получить методом [user.get](https://chugunov.pro/api-bitrix24/user/user-get/) или [user.search](https://chugunov.pro/api-bitrix24/user/user-search/).
  Если переданы `userIdList` и `userId`, используется `userIdList`.
  Максимум: 1000 элементов
- `status` `string` — необязательный. Статус оператора.
  Возможные значения:
  - `online` — оператор онлайн и не на паузе
  - `offline` — оператор не в сети
  - `pause` — оператор поставил себя на паузу
- `hasFreeSlots` `boolean` — необязательный. Фильтр по наличию свободных слотов.
  Возможные значения:
  - `true`, `Y`, `1` — есть свободные слоты
  - `false`, `N`, `0` — свободных слотов нет
- `offset` `integer` — необязательный. Смещение для пагинации.
  По умолчанию: `0`
- `limit` `integer` — необязательный. Размер страницы.
  Возможные значения: от `1` до `200`.
  По умолчанию: `50`

## Ответ

HTTP-статус: 200

```json
{
    "result": {
        "operators": [
            {
                "userId": 42,
                "configId": 3,
                "status": "online",
                "activeSessions": 2,
                "maxChat": 5,
                "freeSlots": 3,
                "lastActivityDate": "2026-06-15T15:01:00+03:00"
            }
        ],
        "hasNextPage": false
    },
    "time": {
        "start": 1782810000,
        "finish": 1782810000.2,
        "duration": 0.2,
        "processing": 0,
        "date_start": "2026-06-30T10:00:00+03:00",
        "date_finish": "2026-06-30T10:00:00+03:00",
        "operating_reset_at": 1782810600,
        "operating": 0
    }
}
```

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

- `result` `object`. Корневой объект ответа
- `result.operators` `operatorLoad[]`. Список операторов.
  Все поля типа [`operatorLoad`](https://apidocs.bitrix24.ru/api-reference/imopenlines/statistics/data-types.html#operator-load) смотрите в разделе [Типы данных статистики открытых линий](https://apidocs.bitrix24.ru/api-reference/imopenlines/statistics/data-types.html#operator-load)
- `result.hasNextPage` `boolean`. Признак следующей страницы
- `time` `time`. Информация о времени выполнения запроса

## Ошибки

HTTP-статус: 400

```json
{
    "error": "INVALID_FILTER",
    "error_description": "Invalid status filter value"
}
```

- `400` — `TARIFF_RESTRICTION`. Statistics reports are not available on the current tariff plan
- `400` — `INVALID_FILTER`. Invalid status filter value
- `400` — `OFFSET_TOO_LARGE`. Offset is too large

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

### cURL (Webhook)

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "configId": 3,
    "status": "online",
    "limit": 50
  }' \
  https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/imopenlines.v2.Operator.list
```

### cURL (OAuth)

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "configId": 3,
    "status": "online",
    "limit": 50,
    "auth": "**put_access_token_here**"
  }' \
  https://**put_your_bitrix24_address**/rest/imopenlines.v2.Operator.list
```

### JS (TS)

```ts
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'

declare const $b24: B24Frame

type OperatorListResult = {
  operators: Array<{
    userId: number
    configId: number
    status: string
    activeSessions: number
    maxChat: number
    freeSlots: number
    lastActivityDate: string | null
  }>
  hasNextPage: boolean
}

try {
  const response = await $b24.actions.v2.call.make<OperatorListResult>({
    method: 'imopenlines.v2.Operator.list',
    params: {
      configId: 3,
      status: 'online',
      limit: 50,
    },
    requestId: Text.getUuidRfc4122()
  })

  if (!response.isSuccess) {
    console.error(response.getErrorMessages().join('; '))
  } else {
    console.info(response.getData()!.result.operators)
  }
} catch (error) {
  console.error(error)
}
```

### JS (UMD)

```html
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
  async function getOpenlinesOperators() {
    try {
      const $b24 = await B24Js.initializeB24Frame()
      const response = await $b24.actions.v2.call.make({
        method: 'imopenlines.v2.Operator.list',
        params: {
          configId: 3,
          status: 'online',
          limit: 50,
        },
        requestId: B24Js.Text.getUuidRfc4122()
      })

      if (!response.isSuccess) {
        console.error(response.getErrorMessages().join('; '))
        return
      }

      console.info(response.getData().result.operators)
    } catch (error) {
      console.error(error)
    }
  }

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

### Python

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

try:
    bitrix_response = client.call(
        "imopenlines.v2.Operator.list",
        {
            "configId": 3,
            "status": "online",
            "limit": 50,
        },
    ).response
    print(bitrix_response.result)
except BitrixAPIError as error:
    print(f"error: {error.error}", f"error_description: {error.error_description}", sep="\n")
except BitrixSDKException as error:
    print(f"Ошибка Bitrix SDK: {error.message}")
```

### PHP

```php
try {
    $response = $b24Service
        ->core
        ->call(
            'imopenlines.v2.Operator.list',
            [
                'configId' => 3,
                'status' => 'online',
                'limit' => 50,
            ]
        );

    print_r($response->getResponseData()->getResult());
} catch (Throwable $e) {
    echo $e->getMessage();
}
```

### BX24.js

```js
BX24.callMethod(
    'imopenlines.v2.Operator.list',
    {
        configId: 3,
        status: 'online',
        limit: 50,
    },
    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.v2.Operator.list',
    [
        'configId' => 3,
        'status' => 'online',
        'limit' => 50,
    ]
);

print_r($result);
```

### Go

```go
res, err := client.Core().Call(ctx, "imopenlines.v2.Operator.list", b24.Params{
	"configId": 3,
	"status":   "online",
	"limit":    50,
}, b24.WithIdempotent())
if err != nil {
	return fmt.Errorf("imopenlines.v2.Operator.list: %w", err)
}

fmt.Println(string(res.Result))
```

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