Get database list
Description
Retrieves a list of databases.
Request URL
Method: POST
https://example.com/api/v1.1/databases/list/
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
format | int | "json" | No | Response data format By default – json |
from_id | int | 1 | No | First database in the list ID By default – 1 |
limit | int | 1 | No | Limit for response entries By default – 1000 |
ui_tags | []String | [ "tag1", "tag2" ] | No | List of tags for search |
groups | []String | [ "group1", "group2" ] | No | List of access groups |
groups_id | []int | [ 0, 1 ] | No | List of access groups |
Request example
- JSON
- XML
{
"limit": 2,
"token": "abcdefghijklmnqrstuvwxyz"
}
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
<limit>2</limit>
<token>abcdefghijklmnqrstuvwxyz</token>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"id": 1,
"name": "Database #1",
"ui_tags": [],
"Groups": [
{
"Id": 0,
"Name": "main"
}
]
},
{
"id": 2,
"name": "Database #2",
"ui_tags": ["tag1", "tag2"],
"Groups": [
{
"Id": 1,
"Name": "subaccount"
}
]
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": 6,
"total_count": 4
}
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
<data>
<id>1</id>
<name>Database #1</name>
<ui_tags/>
<Groups>
<Id>0</Id>
<Name>main</Name>
</Groups>
</data>
<data>
<id>2</id>
<name>Database #2</name>
<ui_tags>tag1</ui_tags>
<ui_tags>tag2</ui_tags>
<Groups>
<Id>1</Id>
<Name>subaccount</Name>
</Groups>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
<next_from_id>6</next_from_id>
<total_count>4</total_count>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
next_from_id | int | The index must be passed in the next request to receive another piece of data, until the result output contains 0 history lines |
total_count | int | Total database count |
id | int | Database ID |
name | string | Database name |
ui_tags | []String | List of tags |
groups | []String | List of groups |