你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Question Answering Projects - Get Sources
获取项目的所有源。
GET {Endpoint}/language/authoring/query-knowledgebases/projects/{projectName}/sources?api-version=2023-04-15-preview
GET {Endpoint}/language/authoring/query-knowledgebases/projects/{projectName}/sources?api-version=2023-04-15-preview&top={top}&skip={skip}&maxpagesize={maxpagesize}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
project
|
path | True |
string |
要使用的项目的名称。 |
api-version
|
query | True |
string |
客户端 API 版本。 |
maxpagesize
|
query |
integer int32 |
单个响应中要包含的最大资源数。 |
|
skip
|
query |
integer int32 |
要返回的第一个资源的集合中的偏移量。 |
|
top
|
query |
integer int32 |
要从集合返回的最大资源数。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
项目的所有源。 |
|
Other Status Codes |
错误响应。 |
安全性
AADToken
这些是 Azure Active Directory OAuth2 流
若要实现方案,建议查看
笔记
- 此安全定义 要求 使用
x-ms-client-id
标头来指示应用程序请求访问的 Azure Maps 资源。 这可以从 地图管理 API获取。
Authorization URL
特定于 Azure 公有云实例。 主权云具有唯一的授权 URL 和 Azure Active Directory 配置。
* Azure 基于角色的访问控制是通过 Azure 门户、PowerShell、CLI、Azure SDK 或 REST API 从 Azure 管理平面 配置的。
* 使用 azure Maps Web SDK
- 目前,Azure Active Directory v1.0 或 v2.0 支持工作、学校和来宾,但不支持个人帐户。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
https://cognitiveservices.azure.com/.default | https://cognitiveservices.azure.com/.default |
Ocp-Apim-Subscription-Key
语言服务资源的订阅密钥。
类型:
apiKey
在:
header
示例
Successful query
示例请求
GET {Endpoint}/language/authoring/query-knowledgebases/projects/proj1/sources?api-version=2023-04-15-preview
示例响应
{
"value": [
{
"displayName": "source1",
"sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview",
"sourceKind": "url",
"lastUpdatedDateTime": "2021-05-01T15:13:22Z",
"source": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview"
},
{
"displayName": "source2",
"sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf",
"sourceKind": "file",
"contentStructureKind": "unstructured",
"lastUpdatedDateTime": "2021-05-01T15:13:22Z",
"source": "surface-guide.pdf"
}
]
}
定义
名称 | 说明 |
---|---|
Error |
错误对象。 |
Error |
人工可读错误代码。 |
Error |
错误响应。 |
Inner |
人工可读错误代码。 |
Inner |
包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。 |
Qna |
具有上次更新时间的自定义源记录。 |
Qna |
项目的所有 QnA 源。 |
source |
源的内容类型。 |
source |
支持的源类型。 |
Error
错误对象。
名称 | 类型 | 说明 |
---|---|---|
code |
服务器定义的错误代码集之一。 |
|
details |
Error[] |
导致此报告错误的特定错误的详细信息数组。 |
innererror |
包含与当前对象有关错误的更具体信息的对象。 |
|
message |
string |
错误的人工可读表示形式。 |
target |
string |
错误的目标。 |
ErrorCode
人工可读错误代码。
名称 | 类型 | 说明 |
---|---|---|
AzureCognitiveSearchIndexLimitReached |
string |
|
AzureCognitiveSearchIndexNotFound |
string |
|
AzureCognitiveSearchNotFound |
string |
|
AzureCognitiveSearchThrottling |
string |
|
Conflict |
string |
|
Forbidden |
string |
|
InternalServerError |
string |
|
InvalidArgument |
string |
|
InvalidRequest |
string |
|
NotFound |
string |
|
OperationNotFound |
string |
|
ProjectNotFound |
string |
|
QuotaExceeded |
string |
|
ServiceUnavailable |
string |
|
Timeout |
string |
|
TooManyRequests |
string |
|
Unauthorized |
string |
|
Warning |
string |
ErrorResponse
错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
InnerErrorCode
人工可读错误代码。
名称 | 类型 | 说明 |
---|---|---|
AzureCognitiveSearchNotFound |
string |
|
AzureCognitiveSearchThrottling |
string |
|
EmptyRequest |
string |
|
ExtractionFailure |
string |
|
InvalidCountryHint |
string |
|
InvalidDocument |
string |
|
InvalidDocumentBatch |
string |
|
InvalidParameterValue |
string |
|
InvalidRequest |
string |
|
InvalidRequestBodyFormat |
string |
|
KnowledgeBaseNotFound |
string |
|
MissingInputDocuments |
string |
|
ModelVersionIncorrect |
string |
|
UnsupportedLanguageCode |
string |
InnerErrorModel
包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。
名称 | 类型 | 说明 |
---|---|---|
code |
服务器定义的错误代码集之一。 |
|
details |
object |
错误详细信息。 |
innererror |
包含与当前对象有关错误的更具体信息的对象。 |
|
message |
string |
错误信息。 |
target |
string |
错误目标。 |
QnaSourceRecord
具有上次更新时间的自定义源记录。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
contentStructureKind | Unstructured |
源的内容类型。 |
|
displayName |
string |
源的友好名称。 |
|
lastUpdatedDateTime |
string |
上次更新 QnA 的日期时间。 |
|
source |
string |
唯一源标识符。 文件的名称(如果是“file”源);否则,如果它是“url”源,则为完整 URL。 |
|
sourceKind | url |
支持的源类型。 |
|
sourceUri |
string |
文件或 URL 的 URI 位置。 |
QnaSources
项目的所有 QnA 源。
名称 | 类型 | 说明 |
---|---|---|
nextLink |
string |
|
value |
从中提取 QnA 或显式添加到项目的自定义源。 |
sourceContentStructureKind
源的内容类型。
名称 | 类型 | 说明 |
---|---|---|
unstructured |
string |
sourceKind
支持的源类型。
名称 | 类型 | 说明 |
---|---|---|
file |
string |
|
url |
string |