Введение
Эта документация предназначена для предоставления всей необходимой информации для работы с нашим API.
Аутентификация запросов
Чтобы аутентифицировать запросы, включите заголовок Authorization со значением "Bearer {YOUR_AUTH_KEY}".
Время жизни токена - 1000000 минут
Все аутентифицированные конечные точки отмечены значком требуется аутентификация в документации ниже.
Чтобы получить аунтификатор Вы можете сделать запрос на маршрут входа, если у Вас есть аккаунт, или зарегистрировать новый
Проекты
Получить проекты
Заголовки
Параметры URL
Slug пространства
Параметры запроса
Передать 300, если нужно получить завершенные проекты
Поле для сортировки
nameamountpaidend_atstatus_idauthor
Тип сортировки
descasc
Поиск
Показывать ли регулярные проекты
Список ID меток
Список ID участников
Список ID компаний
Номер страницы
Количество элементов на странице
const url = new URL(
"https://api.otask.ru/api/v1/ws/d823e13a-b255-431e-b425-6c211c038248/panel/projects"
);
const params = {
"status_id": "300",
"sort_field": "name",
"sort_type": "desc",
"query": "eius",
"is_regular": "1",
"tag_ids[0]": "no_tag",
"tag_ids[1]": "1",
"tag_ids[2]": "2",
"tag_ids[3]": "3",
"member_ids[0]": "1",
"member_ids[1]": "2",
"member_ids[2]": "3",
"company_ids[0]": "1",
"company_ids[1]": "2",
"company_ids[2]": "3",
"page": "9",
"per_page": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); {
"success": true,
"data": {
"projects": {
"current_page": 1,
"data": [
{
"id": 2,
"name": "Мой первый проект в O!task (демо)",
"priority_id": 200,
"description": null,
"amount": "300000.00",
"is_regular_amount": false,
"start_at": null,
"end_at": "2024-12-31T00:00:00.000000Z",
"status_id": 100,
"user_id": 3,
"slug": "7956d6df-aa9a-4503-a9dd-242db85d9ca0",
"deleted_at": null,
"created_at": "2024-12-26T14:04:21.000000Z",
"updated_at": "2024-12-26T14:04:24.000000Z",
"team_id": 3,
"completed_at": null,
"position": "0.000113250312500000000000000000",
"is_pinned": false,
"company_id": null,
"paid": "274 000.00",
"end_at_regular": "2025-03-03T00:00:00+00:00",
"owner": {
"id": 3,
"first_name": null,
"last_name": null,
"email": "new@new.new",
"full_name": "new",
"full_name_short": "new",
"isonline": true,
"avatar": "https://api.otask.ru/storage/uploads/users/0e098d68-1ac0-41b6-9462-3b74e10fcb7a.jpg"
},
"members": [],
"managers": [],
"tags": []
}
],
"first_page_url": "https://api.otask.ru/api/v1/ws/c150bb61-a9c5-4faf-b8e2-649f6f20bf57/panel/projects?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://api.otask.ru/api/v1/ws/c150bb61-a9c5-4faf-b8e2-649f6f20bf57/panel/projects?page=1",
"links": [
{
"url": null,
"label": "« Назад",
"active": false
},
{
"url": "https://api.otask.ru/api/v1/ws/c150bb61-a9c5-4faf-b8e2-649f6f20bf57/panel/projects?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Вперёд »",
"active": false
}
],
"next_page_url": null,
"path": "https://api.otask.ru/api/v1/ws/c150bb61-a9c5-4faf-b8e2-649f6f20bf57/panel/projects",
"per_page": 20,
"prev_page_url": null,
"to": 1,
"total": 1
},
"membersOptions": [],
"companiesOptions": [],
"hasGuestProjects": false,
"hasRegularProject": false,
"tagsOptions": [
{
"id": "no_tag",
"name": "Без меток"
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 20,
"to": 1,
"total": 1
}
},
"message": "success"
}
Получить список всех проектов #1
Заголовки
Параметры URL
Slug пространства
const url = new URL(
"https://api.otask.ru/api/v1/ws/d823e13a-b255-431e-b425-6c211c038248/projects/all"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); {
"success": true,
"data": [
{
"id": 188,
"slug": "b5fad061-ef75-487c-b2b5-2086581c368a",
"status_id": 100,
"name": "Мой первый проект в O!task (демо)",
"position": "0.000113250312499999999742671120",
"is_pinned": false,
"end_at_regular": null
}
],
"message": "success"
}
Получить список всех проектов #2
Заголовки
Параметры URL
Slug пространства
const url = new URL(
"https://api.otask.ru/api/v1/ws/d823e13a-b255-431e-b425-6c211c038248/projects/list"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); {
"success": true,
"data": {
"projects": [
{
"id": 188,
"slug": "b5fad061-ef75-487c-b2b5-2086581c368a",
"name": "Мой первый проект в O!task (демо)",
"status_id": 100,
"client_id": 89,
"position": "0.000113250312499999999742671120",
"is_pinned": false,
"end_at_regular": null,
"members": []
}
]
},
"message": "success"
}
Получить проекты сгруппированные по колонкам
Заголовки
Параметры URL
Slug пространства
Параметры запроса
id метки или completed для получения завершенных проектов
Поиск по названию
ID участника проекта
ID клиента
Тип группировки
managerstags
const url = new URL(
"https://api.otask.ru/api/v1/ws/d823e13a-b255-431e-b425-6c211c038248/projects/grouped-by-manager"
);
const params = {
"status_id": "1",
"query": "Проект",
"is_regular": "1",
"member": "1",
"client": "1",
"type": "managers",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); {
"success": true,
"data": {
"columns": [
{
"id": null,
"name": "Без меток",
"color": "#182037",
"has_more": false,
"count": 0
},
{
"id": 151,
"name": "Новая метка (Edited)",
"color": "#E4BF00",
"user_id": 18,
"slug": "c65478c1-3dd0-440c-b230-4193b631ab28",
"created_at": "2024-06-19T17:17:49.000000Z",
"updated_at": "2024-06-19T17:18:31.000000Z",
"team_id": 35,
"bg_color": "#FFFAE9",
"model_type": "App\\Models\\Project",
"position": "0.000113250312500000000000000000",
"has_more": false,
"count": 1
},
{
"id": 150,
"name": "new",
"color": "#8910D9",
"user_id": 18,
"slug": "ef92869c-bf00-48fd-86c9-0af503025bf5",
"created_at": "2024-06-18T16:16:05.000000Z",
"updated_at": "2024-06-18T16:16:05.000000Z",
"team_id": 35,
"bg_color": "#F7E8FF",
"model_type": "App\\Models\\Project",
"position": "0.000113250312500000000000000000",
"has_more": false,
"count": 1
}
],
"projects": [
{
"id": 188,
"name": "Мой первый проект в O!task (демо)",
"priority_id": 200,
"description": null,
"status_id": 100,
"client_id": 89,
"is_regular_amount": false,
"start_at": "2024-06-11T10:51:38.000000Z",
"deleted_at": null,
"end_at": "2024-12-30T19:00:00.000000Z",
"user_id": 18,
"slug": "b5fad061-ef75-487c-b2b5-2086581c368a",
"team_id": 35,
"completed_at": null,
"position": "0.000113250312499999999742671120",
"is_pinned": false,
"amount": "300000.00",
"paid": "274 000.00",
"end_at_regular": "2024-12-30T22:00:00+03:00",
"owner": {
"id": 18,
"first_name": null,
"last_name": null,
"email": "example@example.example",
"full_name": "example",
"full_name_short": "example",
"isonline": true,
"avatar": "https://example.example/storage/uploads/users/0493d251-bd37-43f4-824e-8e1f6074c56f.jpg"
},
"members": [],
"managers": [],
"tags": [
{
"id": 150,
"name": "new",
"color": "#8910D9",
"user_id": 18,
"slug": "ef92869c-bf00-48fd-86c9-0af503025bf5",
"created_at": "2024-06-18T16:16:05.000000Z",
"updated_at": "2024-06-18T16:16:05.000000Z",
"team_id": 35,
"bg_color": "#F7E8FF",
"model_type": "App\\Models\\Project",
"position": "0.000113250312500000000000000000"
},
{
"id": 151,
"name": "Новая метка (Edited)",
"color": "#E4BF00",
"user_id": 18,
"slug": "c65478c1-3dd0-440c-b230-4193b631ab28",
"created_at": "2024-06-19T17:17:49.000000Z",
"updated_at": "2024-06-19T17:18:31.000000Z",
"team_id": 35,
"bg_color": "#FFFAE9",
"model_type": "App\\Models\\Project",
"position": "0.000113250312500000000000000000"
}
]
}
],
"options": {
"members": [],
"clients": [
{
"id": 89,
"first_name": "ОАО «Ромашка»",
"full_name": "ОАО «Ромашка»",
"income": 20000
}
]
},
"has_regular_project": false
},
"message": "success"
}
Получить проекты для колонки
Заголовки
Параметры URL
Slug пространства
Параметры тела запроса
const url = new URL(
"https://api.otask.ru/api/v1/ws/d823e13a-b255-431e-b425-6c211c038248/projects/grouped-by-manager/load-more"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status_id": 1,
"query": "Проект",
"is_regular": 1,
"member": 1,
"client": 1,
"type": "managers",
"exclude_project_ids": [
1,
2,
3
],
"column_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); {
"success": true,
"data": {
"projects": [
{
"id": 188,
"name": "Мой первый проект в O!task (демо)",
"priority_id": 200,
"description": null,
"status_id": 100,
"client_id": 89,
"is_regular_amount": false,
"start_at": "2024-06-11T10:51:38.000000Z",
"deleted_at": null,
"end_at": "2024-12-30T19:00:00.000000Z",
"user_id": 18,
"slug": "b5fad061-ef75-487c-b2b5-2086581c368a",
"team_id": 35,
"completed_at": null,
"position": "-0.999886749687500020478125861700",
"is_pinned": false,
"amount": "300000.00",
"paid": "274 000.00",
"end_at_regular": "2024-12-30T22:00:00+03:00",
"owner": {
"id": 18,
"first_name": null,
"last_name": null,
"middle_name": null,
"email": "example@example.example",
"sex": null,
"created_at": "2024-06-11T10:51:38.000000Z",
"last_activity": "2024-06-19T17:23:40.000000Z",
"currency_id": 1,
"position": null,
"full_name": "example",
"full_name_short": "example",
"isonline": true,
"avatar": "https://api.otask.ru/storage/uploads/users/0493d251-bd37-43f4-824e-8e1f6074c56f.jpg"
},
"members": [],
"managers": [],
"tags": [
{
"id": 150,
"name": "new",
"color": "#8910D9",
"user_id": 18,
"slug": "ef92869c-bf00-48fd-86c9-0af503025bf5",
"created_at": "2024-06-18T16:16:05.000000Z",
"updated_at": "2024-06-18T16:16:05.000000Z",
"team_id": 35,
"bg_color": "#F7E8FF",
"model_type": "App\\Models\\Project",
"position": "0.000113250312500000000000000000"
}
]
}
],
"has_more": false
},
"message": "success"
}
Создать проект
Заголовки
Параметры URL
Slug пространства
Параметры тела запроса
const url = new URL(
"https://api.otask.ru/api/v1/ws/d823e13a-b255-431e-b425-6c211c038248/projects/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Проект",
"amount": 50000.5,
"end_at": "19.06.2024",
"client_id": 1,
"is_regular_amount": true,
"status_id": 300,
"tags": [
1,
2,
3
],
"members": [
1,
2,
3
],
"managers": [
1
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); {
"success": true,
"data": {
"name": "Новый проект",
"amount": null,
"is_regular_amount": false,
"start_at": "2024-06-19T17:24:49.000000Z",
"end_at": null,
"client_id": null,
"user_id": 18,
"status_id": 100,
"position": "-1.999886749687500131500428324216",
"completed_at": null,
"team_id": 35,
"slug": "a15a3efc-de69-4598-9081-f15c66013616",
"updated_at": "2024-06-19T17:24:49.000000Z",
"created_at": "2024-06-19T17:24:49.000000Z",
"id": 198,
"paid": "0.00",
"priority_id": 200,
"end_at_regular": null,
"managers": [],
"members": [],
"owner": {
"id": 18,
"first_name": null,
"last_name": null,
"middle_name": null,
"email": "example@example.example",
"sex": null,
"created_at": "2024-06-11T10:51:38.000000Z",
"last_activity": "2024-06-19T17:24:49.000000Z",
"currency_id": 1,
"position": null,
"full_name": "example",
"full_name_short": "example",
"isonline": true,
"avatar": "https://example.example/storage/uploads/users/0493d251-bd37-43f4-824e-8e1f6074c56f.jpg"
},
"tags": []
},
"message": "success"
}
Экспорт проектов
Возвращает .csv файл
Заголовки
Параметры URL
Slug пространства
Параметры запроса
id метки или completed для получения завершенных проектов
Поиск по названию
ID участника проекта
ID клиента
const url = new URL(
"https://api.otask.ru/api/v1/ws/d823e13a-b255-431e-b425-6c211c038248/projects/export"
);
const params = {
"status_id": "1",
"query": "Проект",
"is_regular": "1",
"member": "1",
"client": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json()); OK
Скачать пример файла для импорта проектов
Возвращает временную ссылку на