---
id: "zh/api-get-nd-api-file-file-logs"
title: "文件日志"
language: "zh"
description: "GET /nd/api/file/file_logs：文件日志 接口说明，包含路径、方法、参数和返回信息。"
canonical_url: "https://www.babel.cc/public/babelwiki/zh/api-get-nd-api-file-file-logs.html"
markdown_url: "https://www.babel.cc/public/babelwiki/ai/zh/api-get-nd-api-file-file-logs.md"
alternates: {"en": "https://www.babel.cc/public/babelwiki/ai/en/api-get-nd-api-file-file-logs.md", "zh": "https://www.babel.cc/public/babelwiki/ai/zh/api-get-nd-api-file-file-logs.md"}
reading_note: "文档记录不等于当前部署能力；以实际版本、授权模块与配置为准。保留原文的可选、限制及待确认说明，勿补猜接口。 / Documentation is not a guarantee for every deployment. Preserve optional-module requirements, limitations and unresolved API contracts."
---

# 文件日志

| 属性 | 值 |
| --- | --- |
| HTTP 方法 | `GET` |
| 接口路径 | `/nd/api/file/file_logs` |
| 所属分类 | 文件 API |

## 接口说明




#### URL 查询参数

| 参数 | 类型 | 说明（保留原资料的必填、默认值及范围） |
| --- | --- | --- |
| `file_id` | `string` | 必填；单个文件的 ID，不是数组。 |
| `startIndex` | `int` | 获取日志的起始顺序 第几条日志开始返回（选填）  默认 0， |
| `pageSize` | `int` | 每页返回的个数（选填） |
| `type` | `int` | 日志类型(选填)  默认 0, 查看所有记录， 1 仅查看访问记录，2 仅查看上传下载，3 仅查看匿名用户，4 仅查看分享及邀请，5 仅查看删除记录 |
| `userName` | `string` | 某个用户名 (选填) , 返回某个用户的日志 |
| `lang` | `string` | 语言(选填) 默认 cn,  返回日志的语言 cn(中文) en(英文) |

#### 返回信息如下

```json
{"code":0,"success":true, "logs":[], "total":50}
```

## 调用说明

- 调用前需完成 [获取 token](https://www.babel.cc/public/babelwiki/zh/api-post-api-token-do.html) 或相应免登录认证，并在请求 Header 中携带 `Authorization: Bearer <access_token>`。
- 参数和返回字段如因部署版本存在差异，应以实际私有云 API 文档和联调结果为准。
- 所属分类：文件 API。
