---
id: "en/api-get-nd-api-file-list-dir"
title: "Get file list"
language: "en"
description: "GET /nd/api/file/list_dir: Get the file list interface description, including path, method, parameters and return information."
canonical_url: "https://www.babel.cc/public/babelwiki/en/api-get-nd-api-file-list-dir.html"
markdown_url: "https://www.babel.cc/public/babelwiki/ai/en/api-get-nd-api-file-list-dir.md"
alternates: {"en": "https://www.babel.cc/public/babelwiki/ai/en/api-get-nd-api-file-list-dir.md", "zh": "https://www.babel.cc/public/babelwiki/ai/zh/api-get-nd-api-file-list-dir.md"}
reading_note: "文档记录不等于当前部署能力；以实际版本、授权模块与配置为准。保留原文的可选、限制及待确认说明，勿补猜接口。 / Documentation is not a guarantee for every deployment. Preserve optional-module requirements, limitations and unresolved API contracts."
---

# Get file list

| Properties | Values |
| --- | --- |
| HTTP methods | `GET` |
| Interface path | `/nd/api/file/list_dir` |
| Category | File API |

## Interface description

Interface path: `/nd/api/file/list_dir`

HTTP method: `GET`


**HTTP method:** `GET`

#### URL parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `parent_id` | `string` | Yes | Parent folder ID: 1 enterprise folder, 2 personal folder, 3 my projects, 4 shares I joined; other fileId values identify folders. |
| `page_size` | `number` | Not specified | Items per page |
| `page` | `number` | Not specified | Zero-based requested page number: `0` is the first page and `1` is the second. |
| `type` | `string` | Not specified | 1 - file, 2 - folder, 0 - all |

#### Return field description

| Field | Type | Description |
| --- | --- | --- |
| `files` | array | File information (source names `fileId` and `name`; remaining fields are unspecified) |
| `total` | `int` | Total count |
| `pages` | `int` | Current total number of pages, distinct from the requested page number in `page`. |
| `success` | `boolean` | Success flag |
| `code` | `int` | Error code; 0 indicates success |

The requested page number `page` differs from the total page count `pages`. For example, `pages: 3` corresponds to request page numbers `0`, `1` and `2`. This defines the starting index, not the default behavior when `page` is omitted.

## Call instructions

- Before calling, you need to complete [Get token](https://www.babel.cc/public/babelwiki/en/api-post-api-token-do.html) or the corresponding login-free authentication, and carry `Authorization: Bearer <access_token>` in the request header.
- If there are differences in parameters and return fields due to deployment versions, the actual private cloud API documents and joint debugging results should prevail.
- Category: File API.
