Возвращает список документов.
GET /api/admin/v1/documents
int per_page, количество элементов в одной странице пагинации. По умолчанию 25 штук
int
string sort, поле, по которому нужно отсортировать документы
string
string dir, в каком направлении нужно отсортировать. desc – от большего к меньшему, asc – от меньшего к большему
int page, номер страницы пагинации
200 OK
OK
Успешный ответ
{ "data": [ { "id": 2, "title": "2>", "description": "1", "url": "https://vms.local/storage/downloads/documents/620261318effe/v1.3.docx", "version": "1", "is_public_download": false, "created_at": "2022-02-08 15:25:21" } ], "links": { "first": "https://vms.local/api/admin/v1/documents?per_page=25&page=1", "last": "https://vms.local/api/admin/v1/documents?per_page=25&page=1", "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "last_page": 1, "links": [ { "url": null, "label": "pagination.previous", "active": false }, { "url": "https://vms.local/api/admin/v1/documents?per_page=25&page=1", "label": "1", "active": true }, { "url": null, "label": "pagination.next", "active": false } ], "path": "https://vms.local/api/admin/v1/documents", "per_page": 25, "to": 1, "total": 1 } }
401 Unauthorized
Unauthorized
Токен авторизации не передан или не валидный Получение токена
curl -k --request POST \ --url 'https://your-domain/api/admin/v1/documents' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "per_page": 0, "sort": "string", "dir": "string", "page": 0 }'
$data = array ( 'per_page' => 0, 'sort' => 'string', 'dir' => 'string', 'page' => 0, ); $context = stream_context_create([ 'ssl'=>['verify_peer' => false], 'http' => [ 'method' => 'GET', 'header' => "Content-Type: application/json\r Accept: application/json", 'content'=>json_encode($data) ] ]); $result = file_get_contents('https://your-domain/api/admin/v1/documents', false, $context);
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.