# List files `GET /api/v1/files` Lists file records in the workspace. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Files → Read**. ## Query parameters - `folder_id` (integer) — List the current folder. Omit it for the root. - `q` (string) — Search filenames and display names throughout the library. Alias search[value]. - `all_files` (integer) — Use 1 for a flat list containing files only. - `images` (integer) — Use 1 to return image files and folders. - `length` (integer) — Number of records to return. - `start` (integer) — Zero-based offset. - `draw` (string) — Optional request marker echoed in the response. - `sort` (string) — Sort by id, name, friendly_name, mime_type, size, views, tsc, or tsu. Prefix the field name with a minus sign for descending order. - `order` (string) — Direction for unprefixed sort fields. Use asc or desc. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --get \ --url "https://api.asdincloud.com/api/v1/files" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --data-urlencode "length=25" \ --data-urlencode "sort=name" ``` ## Response **200 OK** Returns the current folder listing, pagination counts, and a breadcrumb path from the root. Example with fictional data and selected fields. ```json { "status": "success", "data": [ { "id": 16, "sport_id": 3, "parent_id": null, "is_folder": false, "name": "welcome.pdf", "friendly_name": "Welcome guide", "description": "Club information", "mime_type": "application/pdf", "size": 12345, "url": "https://files.example.com/welcome.pdf" } ], "records_total": 1, "records_filtered": 1, "draw": null, "breadcrumbs": [] } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `422` — The folder ID is invalid or the folder does not exist.