你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Question Answering Projects - Export
导出项目元数据和资产。
POST {Endpoint}/language/query-knowledgebases/projects/{projectName}/:export?api-version=2021-10-01
POST {Endpoint}/language/query-knowledgebases/projects/{projectName}/:export?api-version=2021-10-01&format={format}&assetKind={assetKind}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
Endpoint
|
path | True |
string |
支持的认知服务终结点 (例如 https://.api.cognitiveservices.azure.com). |
project
|
path | True |
string |
要使用的项目的名称。 |
api-version
|
query | True |
string |
客户端 API 版本。 |
asset
|
query |
string |
项目的资产类型。 |
|
format
|
query |
知识库导入或导出格式。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
导出作业状态、项目元数据和资产。 |
|
202 Accepted |
带有用于检查作业状态的 Operation-Location 标头的成功调用结果。 Headers Operation-Location: string |
|
Other Status Codes |
错误响应。 |
安全性
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
示例
Successful query
Sample Request
POST {Endpoint}/language/query-knowledgebases/projects/proj1/:export?api-version=2021-10-01
Sample Response
{
"errors": [],
"createdDateTime": "2021-05-01T17:21:14Z",
"expirationDateTime": "2021-05-01T17:21:14Z",
"jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
"lastUpdatedDateTime": "2021-05-01T17:21:14Z",
"status": "succeeded",
"resultUrl": "https://<resource-endpoint>/language/authoring/query-knowledgebases/projects/proj1/export/jobs/job1/result?api-version=2021-10-01"
}
Operation-Location: https:///language/authoring/query-knowledgebases/projects/proj1/export/jobs/job1?api-version=2021-10-01
定义
名称 | 说明 |
---|---|
Error |
错误对象。 |
Error |
用户可读的错误代码。 |
Error |
错误响应。 |
Export |
导出作业状态、项目元数据和资产。 |
format |
知识库导入或导出格式。 |
Inner |
用户可读的错误代码。 |
Inner |
包含有关错误的更具体信息的对象。 根据 Microsoft One API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。 |
job |
作业状态。 |
Error
错误对象。
名称 | 类型 | 说明 |
---|---|---|
code |
服务器定义的一组错误代码中的一个。 |
|
details |
Error[] |
有关导致此项报告错误的特定错误的详细信息数组。 |
innererror |
一个 对象,该对象包含比当前对象更具体的错误信息。 |
|
message |
string |
错误的用户可读表示形式。 |
target |
string |
错误的目标。 |
ErrorCode
用户可读的错误代码。
名称 | 类型 | 说明 |
---|---|---|
AzureCognitiveSearchIndexLimitReached |
string |
|
AzureCognitiveSearchIndexNotFound |
string |
|
AzureCognitiveSearchNotFound |
string |
|
AzureCognitiveSearchThrottling |
string |
|
Forbidden |
string |
|
InternalServerError |
string |
|
InvalidArgument |
string |
|
InvalidRequest |
string |
|
NotFound |
string |
|
OperationNotFound |
string |
|
ProjectNotFound |
string |
|
ServiceUnavailable |
string |
|
TooManyRequests |
string |
|
Unauthorized |
string |
ErrorResponse
错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
ExportJobState
导出作业状态、项目元数据和资产。
名称 | 类型 | 说明 |
---|---|---|
createdDateTime |
string |
|
errors |
Error[] |
错误对象。 |
expirationDateTime |
string |
|
jobId |
string |
|
lastUpdatedDateTime |
string |
|
resultUrl |
string |
用于下载导出作业结果的 URL。 |
status |
作业状态。 |
format
知识库导入或导出格式。
名称 | 类型 | 说明 |
---|---|---|
excel |
string |
导出或导入知识库 副本 (replica) 包括 Tsv 格式的所有资产和元数据。 |
json |
string |
以 JSON 格式导出或导入 QnA 资产。 |
tsv |
string |
导出或导入知识库 副本 (replica) 包括 Excel 格式的所有资产和元数据。 |
InnerErrorCode
用户可读的错误代码。
名称 | 类型 | 说明 |
---|---|---|
AzureCognitiveSearchNotFound |
string |
|
AzureCognitiveSearchThrottling |
string |
|
ExtractionFailure |
string |
|
InvalidParameterValue |
string |
|
InvalidRequest |
string |
|
KnowledgeBaseNotFound |
string |
InnerErrorModel
包含有关错误的更具体信息的对象。 根据 Microsoft One API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。
名称 | 类型 | 说明 |
---|---|---|
code |
服务器定义的一组错误代码中的一个。 |
|
details |
object |
错误详细信息。 |
innererror |
一个 对象,该对象包含比当前对象更具体的错误信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
jobStatus
作业状态。
名称 | 类型 | 说明 |
---|---|---|
cancelled |
string |
|
cancelling |
string |
|
failed |
string |
|
notStarted |
string |
|
partiallyCompleted |
string |
|
running |
string |
|
succeeded |
string |