# tasks.task.get

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

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

## Описание

Метод `tasks.task.get` возвращает информацию о задаче по идентификатору.

Доступ к данным зависит от прав:
- администратор видит все задачи,
- руководитель — задачи своих сотрудников,
- остальные видят только доступные им задачи.

## Параметры

- `taskId` `integer` — необязательный. Идентификатор задачи. 
  Идентификатор задачи можно получить при [создании новой задачи](https://chugunov.pro/api-bitrix24/tasks/tasks-task-add/) или методом [получения списка задач](https://chugunov.pro/api-bitrix24/tasks/tasks-task-list/)
- `select` `array` — необязательный. Массив полей записей, которые будут возвращены методом. Можно указать только те поля, которые необходимы. Если в массиве присутствует значение `"*"`, то будут возвращены все доступные поля. 
  По умолчанию возвращает все поля, кроме пользовательских. Рекомендуем указывать конкретные поля в выборке, так как поля по умолчанию могут быть изменены.
  Системные поля `UF_CRM_TASK`, `UF_TASK_WEBDAV_FILES` и `UF_MAIL_MESSAGE` по умолчанию не возвращаются. Укажите одно из этих полей в `SELECT`, чтобы получить их значения. 
  Для получения пользовательских полей укажите их в `SELECT`. Узнать названия пользовательских полей можно методом [tasks.task.getFields](https://chugunov.pro/api-bitrix24/tasks/tasks-task-get-fields/)

## Ответ

HTTP-статус: 200

```json
{
    "result": {
        "task": {
            "id": "8017",
            "title": "Пример задачи",
            "description": "Описание задачи с [B]форматированием[/B]",
            "createdBy": "503",
            "responsibleId": "547",
            "deadline": "2025-10-24T19:00:00+03:00",
            "ufCrmTask": ["C_627", "CO_591", "L_1177", "T88_3", "D_1723"],
            "ufTaskWebdavFiles": [1065, 1077],
            "ufMailMessage": null,
            "descriptionInBbcode": "Y",
            "favorite": "Y",
            "group": [],
            "creator": {
                "id": "503",
                "name": "Мария Иванова",
                "link": "/company/personal/user/503/",
                "icon": "https://mysite.ru/b17053/resize_cache/45749/c0120a8d7c10d63c83e32398d1ec4d9e/main/c89/c89c6b7301880958ea704b5a8470635c/4R5A1256.png",
                "workPosition": "админ"
            },
            "responsible": {
                "id": "547",
                "name": "Мария",
                "link": "/company/personal/user/547/",
                "icon": "/bitrix/images/tasks/default_avatar.png",
                "workPosition": "Тестировщик"
            },
            "action": {
                "accept": false,
                "decline": false,
                "complete": true,
                "approve": false,
                "disapprove": false,
                "start": true,
                "pause": false,
                "delegate": true,
                "remove": true,
                "edit": true,
                "defer": true,
                "renew": false,
                "create": true,
                "changeDeadline": true,
                "checklistAddItems": true,
                "addFavorite": false,
                "deleteFavorite": true,
                "rate": true,
                "take": false,
                "edit.originator": false,
                "checklist.reorder": true,
                "elapsedtime.add": true,
                "dayplan.timer.toggle": true,
                "edit.plan": true,
                "checklist.add": true,
                "favorite.add": false,
                "favorite.delete": true
            }
        }
    },
    "time": {
        "start": 1759759363,
        "finish": 1759759363.155413,
        "duration": 0.15541291236877441,
        "processing": 0,
        "date_start": "2025-10-06T17:02:43+03:00",
        "date_finish": "2025-10-06T17:02:43+03:00",
        "operating_reset_at": 1759759963,
        "operating": 0
    }
}
```

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

- `result` `object`. Объект с данными ответа.
  Возвращает пустой массив `"result":[],` если задачи не существует или у пользователя нет прав доступа к задаче
- `task` `object`. Объект с [описанием задачи](https://apidocs.bitrix24.ru/api-reference/tasks/fields.html) после выполнения операции
- `time` `time`. Информация о времени выполнения запроса

## Ошибки

HTTP-статус: 400

```json
{
    "error": "100",
    "error_description": "Invalid value {} to match with parameter {select}. Should be value of type array. (internal error)"
}
```

- `0` — wrong task id. В параметре `taskId` указано значение неверного типа
- `100` — CTaskItem All parameters in the constructor must have real class type (internal error). Не передан обязательный параметр `taskId`
- `100` — Invalid value {} to match with parameter {select}. Should be value of type array. (internal error). Параметр `select` передан пустым или в нем указаны неверные значения

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

### cURL (Webhook)

```bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"taskId":8017,"select":["ID","TITLE","DESCRIPTION","CREATED_BY","RESPONSIBLE_ID","DEADLINE","UF_CRM_TASK","UF_TASK_WEBDAV_FILES"]}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/tasks.task.get
```

### cURL (OAuth)

```bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"taskId":8017,"select":["ID","TITLE","DESCRIPTION","CREATED_BY","RESPONSIBLE_ID","DEADLINE","UF_CRM_TASK","UF_TASK_WEBDAV_FILES"],"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/tasks.task.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, ISODate } from '@bitrix24/b24jssdk'

declare const $b24: B24Frame

// result.task limited to the requested (select) fields, in the SDK camelCase form
// Shape of the payload returned in result (match the "response handling" section of the page)
type TaskGetResult = {
  task: {
    id: string
    title: string
    description: string
    createdBy: string
    responsibleId: string
    deadline: ISODate | null
    ufCrmTask: string[]
    ufTaskWebdavFiles: number[]
  }
}

try {
  const response = await $b24.actions.v2.call.make<TaskGetResult>({
    method: 'tasks.task.get',
    params: {
      taskId: 8017, // ID of the task to read
      // Request only the fields you need
      select: [
        'ID',
        'TITLE',
        'DESCRIPTION',
        'CREATED_BY',
        'RESPONSIBLE_ID',
        'DEADLINE',
        'UF_CRM_TASK',
        'UF_TASK_WEBDAV_FILES'
      ]
    },
    requestId: Text.getUuidRfc4122() // optional unique tracking id for this request
  })

  // The payload is available only on a successful response
  if (!response.isSuccess) {
    console.error(response.getErrorMessages().join('; '))
  } else {
    const task = response.getData()!.result.task
    console.info(`Fetched task ${task.id}: ${task.title}`)
  }
} 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 getTask() {
    try {
      // Initialize the SDK inside a Bitrix24 frame
      const $b24 = await B24Js.initializeB24Frame()

      const response = await $b24.actions.v2.call.make({
        method: 'tasks.task.get',
        params: {
          taskId: 8017, // ID of the task to read
          // Request only the fields you need
          select: [
            'ID',
            'TITLE',
            'DESCRIPTION',
            'CREATED_BY',
            'RESPONSIBLE_ID',
            'DEADLINE',
            'UF_CRM_TASK',
            'UF_TASK_WEBDAV_FILES'
          ]
        },
        requestId: B24Js.Text.getUuidRfc4122() // optional unique tracking id for this request
      })

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

      const task = response.getData().result.task
      console.info(`Fetched task ${task.id}: ${task.title}`)
    } catch (error) {
      // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
      console.error(error)
    }
  }

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

### Python

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

try:
    bitrix_response = client.tasks.task.get(
        bitrix_id=8017,
        select=[
            "ID",
            "TITLE",
            "DESCRIPTION",
            "CREATED_BY",
            "RESPONSIBLE_ID",
            "DEADLINE",
            "UF_CRM_TASK",
            "UF_TASK_WEBDAV_FILES",
        ],
    ).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(
            'tasks.task.get',
            [
                'taskId' => 8017,
                'select' => [
                    'ID',
                    'TITLE',
                    'DESCRIPTION',
                    'CREATED_BY',
                    'RESPONSIBLE_ID',
                    'DEADLINE',
                    'UF_CRM_TASK',
                    'UF_TASK_WEBDAV_FILES'
                ]
            ]
        );

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

    echo 'Success: ' . print_r($result, true);
    processData($result);

} catch (Throwable $e) {
    error_log($e->getMessage());
    echo 'Error fetching task: ' . $e->getMessage();
}
```

### BX24.js

```js
BX24.callMethod(
    'tasks.task.get',
    {
        taskId: 8017,
        select: [
            'ID',
            'TITLE',
            'DESCRIPTION',
            'CREATED_BY',
            'RESPONSIBLE_ID',
            'DEADLINE',
            'UF_CRM_TASK',
            'UF_TASK_WEBDAV_FILES'
        ]
    },
    function(result){
        console.info(result.data());
        console.log(result);
    }
);
```

### PHP CRest

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

$result = CRest::call(
    'tasks.task.get',
    [
        'taskId' => 8017,
        'select' => [
            'ID',
            'TITLE',
            'DESCRIPTION',
            'CREATED_BY',
            'RESPONSIBLE_ID',
            'DEADLINE',
            'UF_CRM_TASK',
            'UF_TASK_WEBDAV_FILES'
        ]
    ]
);

echo '<PRE>';
print_r($result);
echo '</PRE>';
```

### Go

```go
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "tasks.task.get", b24.Params{
	"taskId": 8017,
	"select": []string{"ID", "TITLE", "DESCRIPTION", "CREATED_BY", "RESPONSIBLE_ID", "DEADLINE", "UF_CRM_TASK", "UF_TASK_WEBDAV_FILES"},
}, b24.WithIdempotent())
if err != nil {
	return fmt.Errorf("tasks.task.get: %w", err)
}

// Метод заворачивает ответ в объект с ключом "task".
raw, ok := b24.Unwrap(res.Result, "task")
if !ok {
	return fmt.Errorf("в ответе нет ключа task")
}

var item struct {
	ID            b24.ID `json:"id"`
	Title         string `json:"title"`
	Description   string `json:"description"`
	CreatedBy     string `json:"createdBy"`
	ResponsibleID b24.ID `json:"responsibleId"`
	Deadline      string `json:"deadline"`
}
if err := json.Unmarshal(raw, &item); err != nil {
	return fmt.Errorf("разбор ответа: %w", err)
}
fmt.Println(item.ID, item.Title)
```

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