Списки помогают группировать задачи, чтобы было проще в них ориентироваться и делиться с коллегами.
Подробнее о списках можно прочитать в справке.
Метод возвращает все доступные пользователю списки.
GET https://api.pyrus.com/v4/lists
{ "lists": [ { "id": 1352, "name": "Branch offices", "children": [ { "id": 1465, "name": "Moscow" }, { "id": 3763, "name": "San Francisco" } ] }, { "id": 2144, "name": "Personal" } ] }
curl -X GET \ https://api.pyrus.com/v4/lists \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
Метод возвращает все задачи в списке.
GET https://api.pyrus.com/v4/lists/2144/tasks ?item_count=100 &include_archived=y
{ "tasks": [ { "id": 7991, "create_date": "2018-02-28T07:34:23Z", "last_modified_date": "2018-02-28T07:34:23Z", "author": { "id": 1731, "first_name": "Bob", "last_name": "Smith", "email": "Bob.Smith@gmail.com", "type": "user" }, "responsible": { "id": 1731, "first_name": "Bob", "last_name": "Smith", "email": "Bob.Smith@gmail.com", "type": "user" }, "text": "Prepare Presentation" }, { "id": 7992, "create_date": "2018-02-27T17:42:42Z", "last_modified_date": "2018-02-27T17:42:42Z", "author": { "id": 1731, "first_name": "Bob", "last_name": "Smith", "email": "Bob.Smith@gmail.com", "type": "user" }, "responsible": { "id": 1731, "first_name": "Bob", "last_name": "Smith", "email": "Bob.Smith@gmail.com", "type": "user" }, "text": "Order office supplies" } ], "has_more": false }
curl -X GET \ https://api.pyrus.com/v4/lists/2144/tasks \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
item_count | Максимальное количество задач в ответе, по умолчанию 200. |
include_archived | Укажите "y", если хотите включить в результат архивные задачи. |
Метод возвращает все задачи в папке входящие.
GET https://api.pyrus.com/v4/inbox ?item_count=100
{ "tasks": [ { "id": 7991, "create_date": "2018-02-28T07:34:23Z", "last_modified_date": "2018-02-28T07:34:23Z", "author": { "id": 1731, "first_name": "Bob", "last_name": "Smith", "email": "Bob.Smith@gmail.com", "type": "user" }, "responsible": { "id": 1731, "first_name": "Bob", "last_name": "Smith", "email": "Bob.Smith@gmail.com", "type": "user" }, "text": "Prepare Presentation" }, { "id": 7992, "create_date": "2018-02-27T17:42:42Z", "last_modified_date": "2018-02-27T17:42:42Z", "author": { "id": 1731, "first_name": "Bob", "last_name": "Smith", "email": "Bob.Smith@gmail.com", "type": "user" }, "responsible": { "id": 1731, "first_name": "Bob", "last_name": "Smith", "email": "Bob.Smith@gmail.com", "type": "user" }, "text": "Order office supplies" } ], "has_more": false }
curl -X GET \ https://api.pyrus.com/v4/inbox \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
item_count | Максимальное количество задач в ответе, по умолчанию 50. |