1. 接口描述
接口请求域名: lcic.tencentcloudapi.com 。
获取文档信息
默认接口请求频率限制:20次/秒。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:DescribeDocument。 |
Version | 是 | String | 公共参数,本接口取值:2022-08-17。 |
Region | 否 | String | 公共参数,此参数为可选参数。 |
DocumentId | 是 | String | 文档Id(唯一id) 示例值:rbbepxt |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
DocumentId | String | 文档Id 示例值:rbdfetg |
DocumentUrl | String | 文档原址url 示例值:http://ac53b-ba94-27a5bca82d6b.doc |
DocumentName | String | 文档名称 示例值:课堂文档 |
Owner | String | 文档所有者UserId 示例值:2eRdSQEsdsdadYUJdyslWUWPV |
SdkAppId | Integer | 应用Id 示例值:34829230 |
Permission | Integer | 文档权限 示例值:1 |
TranscodeResult | String | 转码结果,无需转码为空,转码成功为结果url,转码失败为错误码 示例值:1 |
TranscodeType | Integer | 转码类型 示例值:1 |
TranscodeProgress | Integer | 转码进度, 0 - 100 表示(0% - 100%) 示例值:1 |
TranscodeState | Integer | 转码状态,0为无需转码,1为正在转码,2为转码失败,3为转码成功 示例值:1 |
TranscodeInfo | String | 转码失败后的错误信息 示例值:err |
DocumentType | String | 文档类型 示例值:doc |
DocumentSize | Integer | 文档大小,单位:字节 示例值:1 |
UpdateTime | Integer | 更新的UNIX时间戳 示例值:1 |
Pages | Integer | 课件页数 示例值:1 |
Preview | String | 课件预览地址 示例值:url |
Resolution | String | 文档的分辨率 示例值:793x1122 |
MinScaleResolution | String | 转码后文档的最小分辨率,和创建文档时传入的参数一致。 示例值:1280x720 |
RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 示例
课件预览示例
输入示例
POST / HTTP/1.1
Host: lcic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDocument
<公共请求参数>
{
"DocumentId": "ntxsfrzk"
}
输出示例
{
"Response": {
"DocumentId": "ntxsfrzk",
"DocumentName": "test.pptx",
"DocumentSize": 15814364,
"DocumentType": "pptx",
"DocumentUrl": "https://tcic-source.qcloudclass.com/uploads/5390248a-5eb7-4fe8-be27-c43dbad1380f/3520371/1677202414_85bt9f0X.pptx",
"Owner": "2M04q0j5mhsbq1lAEbCW1dhRvA2",
"Pages": 2,
"Permission": 0,
"Preview": "https://class.qcloudclass.com/temp/preview.html?isppt=1&url=https://tcic-test-1257307760.qcloudclass.com/doc/gsutgbm7ssh31ns71sfc_tiw/h5/index.html&total=2",
"RequestId": "8a7bafba-bc67-4040-8203-475532db535f",
"SdkAppId": 3520371,
"TranscodeInfo": "Microsoft Macintosh PowerPoint",
"TranscodeProgress": 100,
"TranscodeResult": "https://tcic-test-1257307760.qcloudclass.com/doc/gsutgbm7ssh31ns71sfc_tiw/h5/index.html",
"TranscodeState": 3,
"TranscodeType": 1,
"UpdateTime": 1677202419
}
}
示例2 测试示例
pdf 示例
输入示例
POST / HTTP/1.1
Host: lcic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDocument
<公共请求参数>
{
"DocumentId": "omxxxsdc"
}
输出示例
{
"Response": {
"DocumentId": "omxxxsdc",
"DocumentName": "滴滴电子发票 (1).pdf",
"DocumentSize": 38673,
"DocumentType": "pdf",
"DocumentUrl": "https://tcic-source.qcloudclass.com/uploads/5390248a-5eb7-4fe8-be27-c43dbad1380f/3520371/1679021408_KzpMGD38.pdf",
"Owner": "2N1zP0mW7E3Vr3xJ2ZQ9GeFDK4t",
"Pages": 1,
"Permission": 0,
"RequestId": "ee3fdca0-c88c-43f1-81b4-4f51f9e50521",
"SdkAppId": 3520371,
"TranscodeInfo": "",
"TranscodeProgress": 100,
"TranscodeResult": "https://tcic-test-1257307760.qcloudclass.com/doc/01aq2v7djsh31noat9gc_tiw/picture/",
"TranscodeState": 3,
"TranscodeType": 1,
"UpdateTime": 1679021410
}
}
示例3 获取文档详情
示例
输入示例
POST / HTTP/1.1
Host: lcic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDocument
<公共请求参数>
{
"DocumentId": "ntxsfrzk"
}
输出示例
{
"Response": {
"DocumentId": "ntxsfrzk",
"DocumentName": "test.pptx",
"DocumentSize": 15814364,
"DocumentType": "pptx",
"DocumentUrl": "https://tcic-source.qcloudclass.com/uploads/5390248a-5eb7-4fe8-be27-c43dbad1380f/3520371/1677202414_85bt9f0X.pptx",
"Owner": "2M04q0j5mhsbq1lAEbCW1dhRvA2",
"Pages": 0,
"Permission": 0,
"RequestId": "d97f98d7-de89-455a-a1f3-b9dae84d84bb",
"SdkAppId": 3520371,
"TranscodeInfo": "Microsoft Macintosh PowerPoint",
"TranscodeProgress": 100,
"TranscodeResult": "https://tcic-test-1257307760.qcloudclass.com/doc/gsutgbm7ssh31ns71sfc_tiw/h5/index.html",
"TranscodeState": 3,
"TranscodeType": 1,
"UpdateTime": 1677202419
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: GitHub Gitee
- Tencent Cloud SDK 3.0 for Java: GitHub Gitee
- Tencent Cloud SDK 3.0 for PHP: GitHub Gitee
- Tencent Cloud SDK 3.0 for Go: GitHub Gitee
- Tencent Cloud SDK 3.0 for Node.js: GitHub Gitee
- Tencent Cloud SDK 3.0 for .NET: GitHub Gitee
- Tencent Cloud SDK 3.0 for C++: GitHub Gitee
- Tencent Cloud SDK 3.0 for Ruby: GitHub Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
InternalError | 内部错误。 |
ResourceNotFound.Document | 文档不存在。 |