2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 13
2025-05-05 11:15:20 +03:00
description: Start a task and other functions to work with Bitrix24 in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Bitrix24]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Start a task
Start a task by ID
`Function StartTask(Val URL, Val TaskID, Val Token = "") Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
| TaskID | --task | Number, String | ✔ | Task ID |
| Token | --token | String | ✖ | Access token, when app auth method used |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
2024-11-21 13:27:18 +03:00
Method at API documentation: [tasks.task.start](https://dev.1c-bitrix.ru/rest_help/tasks/task/tasks/tasks_task_start.php)
2024-10-15 10:16:04 +03:00
:::
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-06-29 14:35:33 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
2025-09-15 13:14:53 +03:00
TaskID = "7884";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.StartTask(URL, TaskID);
2025-06-29 14:35:33 +03:00
URL = "b24-ar17wx.bitrix24.by";
2025-09-15 13:14:53 +03:00
Token = "75d8c668006e9f06006b12e400000001000...";
TaskID = "7886";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.StartTask(URL, TaskID, Token);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint bitrix24 StartTask \
2025-09-16 09:07:33 +03:00
--url ""b24-ar17wx.bitrix24.by"" \
--task ""7992"" \
2024-10-22 08:59:24 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint bitrix24 StartTask ^
2025-09-16 09:07:33 +03:00
--url ""b24-ar17wx.bitrix24.by"" ^
--task ""7992"" ^
2024-10-22 08:59:24 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"result": {
"task": {
2025-09-16 09:07:33 +03:00
"id": "7992",
2024-10-15 10:16:04 +03:00
"parentId": null,
"title": "Another task title",
"description": "Another task description",
"mark": null,
"priority": "1",
"multitask": "N",
"notViewed": "N",
"replicate": "N",
"stageId": "0",
2025-09-12 20:23:31 +03:00
"sprintId": null,
"backlogId": null,
2024-10-15 10:16:04 +03:00
"createdBy": "1",
2025-09-16 09:07:33 +03:00
"createdDate": "2025-09-15T22:44:50+00:00",
"responsibleId": "2664",
2024-10-15 10:16:04 +03:00
"changedBy": "1",
2025-09-16 09:07:33 +03:00
"changedDate": "2025-09-15T22:46:05+00:00",
2024-10-15 10:16:04 +03:00
"statusChangedBy": "1",
"closedBy": "0",
"closedDate": null,
2025-09-16 09:07:33 +03:00
"activityDate": "2025-09-15T22:46:00+00:00",
"dateStart": "2025-09-15T22:46:05+00:00",
"deadline": "2025-09-16T22:44:00+00:00",
"startDatePlan": "2025-09-15T22:44:50+00:00",
"endDatePlan": "2025-09-16T21:00:00+00:00",
"guid": "{51ce5c5a-b35c-4e91-90a2-e14e6e9e30e7}",
2024-10-15 10:16:04 +03:00
"xmlId": null,
"commentsCount": "3",
"serviceCommentsCount": "3",
"allowChangeDeadline": "N",
"allowTimeTracking": "N",
"taskControl": "N",
"addInReport": "N",
"forkedByTemplateId": null,
"timeEstimate": "0",
"timeSpentInLogs": null,
"matchWorkTime": "N",
2025-09-16 09:07:33 +03:00
"forumTopicId": "5200",
2024-10-15 10:16:04 +03:00
"forumId": "11",
"siteId": "s1",
2025-09-12 20:23:31 +03:00
"subordinate": "Y",
2024-10-15 10:16:04 +03:00
"exchangeModified": null,
"exchangeId": null,
"outlookVersion": "8",
2025-09-16 09:07:33 +03:00
"viewedDate": "2025-09-15T22:46:00+00:00",
2024-10-15 10:16:04 +03:00
"sorting": null,
"durationFact": null,
"isMuted": "N",
"isPinned": "N",
"isPinnedInGroup": "N",
"flowId": null,
"descriptionInBbcode": "Y",
"status": "3",
2025-09-16 09:07:33 +03:00
"statusChangedDate": "2025-09-15T22:46:05+00:00",
2024-10-15 10:16:04 +03:00
"durationPlan": null,
"durationType": "days",
"favorite": "N",
"groupId": "0",
"auditors": [],
"accomplices": [],
"checklist": [],
"group": [],
"creator": {
"id": "1",
"name": "Антон Титовец",
"link": "/company/personal/user/1/",
"icon": "https://b24-ar17wx.bitrix24.by/b28528874/resize_cache/30/c0120a8d7c10d63c83e32398d1ec4d9e/main/d7e/d7e99cf556e4ab676463dae2c00ddfbb/a7e0af6899300e3c684caeca5c334d81.jpg",
"workPosition": null
},
"responsible": {
2025-09-16 09:07:33 +03:00
"id": "2664",
2025-09-15 13:14:53 +03:00
"name": "Олег Лама",
2025-09-16 09:07:33 +03:00
"link": "/company/personal/user/2664/",
2024-10-15 10:16:04 +03:00
"icon": "/bitrix/images/tasks/default_avatar.png",
"workPosition": null
},
"accomplicesData": [],
"auditorsData": [],
"newCommentsCount": 0,
"action": {
"accept": false,
"decline": false,
"complete": true,
"approve": false,
"disapprove": false,
"start": false,
"pause": true,
"delegate": true,
"remove": true,
"edit": true,
"defer": false,
"renew": false,
"create": true,
"changeDeadline": true,
"checklistAddItems": true,
"addFavorite": true,
"deleteFavorite": false,
"rate": true,
2025-09-12 20:23:31 +03:00
"take": false,
2024-10-15 10:16:04 +03:00
"edit.originator": false,
"checklist.reorder": true,
"elapsedtime.add": true,
"dayplan.timer.toggle": false,
"edit.plan": true,
"checklist.add": true,
"favorite.add": true,
"favorite.delete": false
},
"checkListTree": {
"nodeId": 0,
"fields": {
"id": null,
"copiedId": null,
"entityId": null,
"userId": 1,
"createdBy": null,
"parentId": null,
"title": "",
"sortIndex": null,
"displaySortIndex": "",
"isComplete": false,
"isImportant": false,
"completedCount": 0,
"members": [],
2025-09-12 20:23:31 +03:00
"attachments": [],
"nodeId": null
2024-10-15 10:16:04 +03:00
},
"action": [],
"descendants": []
},
"checkListCanAdd": true
}
},
"time": {
2025-09-16 09:07:33 +03:00
"start": 1757976365.87924,
"finish": 1757976366.10237,
"duration": 0.22313117980957,
"processing": 0.19499397277832,
"date_start": "2025-09-15T22:46:05+00:00",
"date_finish": "2025-09-15T22:46:06+00:00",
"operating_reset_at": 1757976965,
"operating": 0.19497013092041
2024-10-15 10:16:04 +03:00
}
}
```