调用UploadDocument上传问题数据或者文章数据。支持多次调用增量导入。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
DocumentFileUrl | String | 是 | http://xxx/file.xlsx |
问题/文章excel文件地址,参考示例中的示例文件。参考:https://help.aliyun.com/document_detail/149310.htm |
ProjectId | String | 是 | bqhxd1qf4bcnhjh8 |
项目ID,是访问项目的唯一标识。 |
DocumentData | String | 否 | [{"stdQuestion":"积分怎么充话费","extQuestions":["积分咋充话费","积分充话费的方式"]}] |
文档/文章文本数据(JSON格式),参考示例中的文本数据示例。参考:https://help.aliyun.com/document_detail/149310.htm |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
请求ID。 |
ProjectId | String | bqhxd1qf4bcnhjh8 |
项目ID,是访问项目的唯一标识。 |
TotalCount | Integer | 10 |
总共解析数据条数。 |
FileDataCount | Integer | 8 |
文件解析数据条数。 |
JsonDataCount | Integer | 2 |
JSON文本解析数据条数。 |
示例
请求示例
http(s)://[Endpoint]/?Action=UploadDocument
&DocumentFileUrl=http://iqa-console.oss-cn-hangzhou.aliyuncs.com/example/iqa_example_shorttext.xlsx?Expires=2179036688&OSSAccessKeyId=LTAI2WA8174xk3ii&Signature=967zD%2BonZHoVbSZqkmxx8KVcEeI%3D
&ProjectId=bqhxd1qf4bcnhjh8
&<公共请求参数>
正常返回示例
XML
格式
<TotalCount>11</TotalCount>
<JsonDataCount>3</JsonDataCount>
<RequestId>57D071C2-A9C3-4465-AA7B-C21D8AD552A9</RequestId>
<ProjectId>bqhxd1qf4bcnhjh8</ProjectId>
<FileDataCount>8</FileDataCount>
JSON
格式
{
"TotalCount": 11,
"JsonDataCount": 3,
"RequestId": "57D071C2-A9C3-4465-AA7B-C21D8AD552A9",
"ProjectId": "bqhxd1qf4bcnhjh8",
"FileDataCount": 8
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
403 | Forbbiden | You are not authorized to operate on the specified resource. | 用户未被授权操作指定的资源。 |
500 | InternalError | An error occurred while processing your request. | 未知错误。 |
400 | InvalidAccountStatus.ServiceUnavailable | The Intelligent Semantic Understanding service has not been activated. | 用户未开通智能语义理解服务。 |
400 | InvalidDataFileFormat | The data file format is invalid. | 数据文件格式不合法。 |
400 | InvalidDataFileSize | The data file size cannot exceed 10 MB. | 数据文件大小不能超过10M。 |
400 | InvalidParameter.FileUrl | The specified fileUrl is invalid. | 参数fileUrl不合法。 |
400 | InvalidParameter.ProjectId | The specified projectId is invalid. | 参数projectId不合法。 |
400 | MissingParameter.Dictionary | Either dictionaryFileUrl or dictionaryData must be specified. | 参数dictionaryFileUrl或dictionaryData必须指定一个。 |
400 | MissingParameter.Document | Either documentFileUrl or documentData must be specified. | 参数documentFileUrl或documentData必须指定一个。 |
400 | ParseDataFileError | An error occurred while parsing the data file. Please check that the data file URL is valid. | 解析数据文件失败,请确认数据文件地址是正确的。 |
404 | ResourceNotFound | The specified project does not exist. | 指定的项目不存在。 |
503 | ServiceUnavailable | An error occurred while processing your request. | 服务内部错误。 |
访问错误中心查看更多错误码。
在文档使用中是否遇到以下问题
更多建议
匿名提交