---
title: Get file list
description: GET /nd/api/file/list_dir: Get the file list interface description, including path, method, parameters and return information.
slug: api-get-nd-api-file-list-dir
lang: en
category: File API
category_order: 8
order: 104
api_method: GET
api_path: /nd/api/file/list_dir
api_label: Get file list
keywords:
  - API
  - Get file list
  - /nd/api/file/list_dir
---

# 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 name Comment (description)
parent_id parent folder id (required) string When parent is 1, returns the contents of the corporate folder, 2 returns the contents of the personal folder, 3 returns my
Project, 4 returns the share I added, and other fileId returns the contents of the normal folder.
page_size page size number
page page number
type type: divided into three types: 1 - file, 2 - folder, 0 - all string
#### Return field description

Attribute name type description
files array file information {fileId, name, …}
total int total quantity
page int page capacity
success boolean gets the success mark
code int returns error code 0 indicates success

## Call instructions

- Before calling, you need to complete [Get token](api-post-api-token-do.md) 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.
