Lists
Lists make tasks easier to navigate and share by organizing them into groups.
You can find more information on lists in Help.
Methods
- GET/
listsGet all lists - GET/
lists/ {list-id}Get specified list - GET/
lists/ {list-id}/ tasksGet all tasks in the list - PUT/
lists/ {list-id}Changing the list - GET/
inboxGet all inbox tasks
GET /lists
This Method returns all the lists that are available to the user.
GET https://api.pyrus.com/v4 /lists
Response body
{
"lists": [
{
"id": 1352,
"name": "Branch offices",
"children": [
{
"id": 1465,
"name": "Moscow"
},
{
"id": 3763,
"name": "San Francisco"
}
]
},
{
"id": 2144,
"name": "Personal"
}
]
}
curl
curl -X GET \ https://api.pyrus.com/v4/lists \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
GET /lists/{list-id}
This method returns the specified list.
GET https://api.pyrus.com/v4 /lists /1352 ?item_count=100
Response body
{
"id": 1352,
"name": "Branch offices",
"children": [
{
"id": 1465,
"name": "Moscow"
},
{
"id": 3763,
"name": "San Francisco"
}
]
}
curl
curl -X GET \ https://api.pyrus.com/v4/lists/1352 \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
GET /lists/{list-id}/tasks
This method returns all the tasks in the specified list.
GET https://api.pyrus.com/v4 /lists /2144 /tasks ?item_count=100 &include_archived=y &modified_before=2022-04-21T15:51:27z &modified_after=2022-03-11T15:51:25Z
Response body
{
"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",
"due_date": "2022-04-13"
},
{
"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
curl -X GET \ https://api.pyrus.com/v4/lists/2144/tasks \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
Parameters
| item_count | The maximum number of tasks in the response, the default is 200. |
| include_archived | Specify "y" if you want to include archived tasks in the response. |
| modified_before | Tasks modified before specified date in UTC (inclusive).Date format: YYYY-MM-DDThh:mm:ssZ |
| modified_after | Tasks modified after specified date in UTC (inclusive).Date format: YYYY-MM-DDThh:mm:ssZ |
POST /lists/{list-id}
The method changes the list metadata — the name and the list of members and administrators.
POST https://api.pyrus.com/v4 /lists /43082
Request body
{
"removed_managers": [],
"removed_members": [],
"added_managers": [18498],
"added_members": [1733]
}
Response body
{
"id": 43082,
"name": "api spisok",
"version": 90090,
"list_type": "private",
"color": "#4CAF50",
"member_ids": [
1733
],
"manager_ids": [
1731,
18498
]
}
curl
curl -X POST \ https://api.pyrus.com/v4/lists/43082 \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
Параметры
| removed_managers | array of user IDs, removing administrators. |
| removed_removed_members | array of user IDs, removing members. |
| added_managers | array of user IDs, adding administrators. |
| added_members | array of user IDs, adding members. |
GET /inbox
This method returns all inbox tasks, including tasks organized into groups.
GET https://api.pyrus.com/v4 /inbox ?item_count=100 &group_item_count=50
Response body
{
"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",
"due_date": "2022-04-13"
},
{
"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,
"task_groups": [
{
"id": 10,
"name": "group",
"has_more": false,
"tasks": [
{
"id": 9991,
"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"
}
}
]
}
]
}
curl
curl -X GET \ https://api.pyrus.com/v4/inbox ?item_count=100&group_item_count=50 \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
Parameters
| item_count | The maximum number of tasks in the response, the default is 50. |
| group_item_count | The maximum number of tasks in the response, the default is 50. |