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 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
project
|
path | True |
string |
要使用的項目名稱。 |
api-version
|
query | True |
string |
用戶端 API 版本。 |
maxpagesize
|
query |
integer int32 |
要包含在單一回應中的資源數目上限。 |
|
skip
|
query |
integer int32 |
要傳回之第一個資源的集合位移。 |
|
top
|
query |
integer int32 |
要從集合傳回的資源數目上限。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
專案的所有來源。 |
|
Other Status Codes |
錯誤回應。 |
安全性
AADToken
這些是 Azure Active Directory OAuth2 流程
若要實作案例,建議您檢視
筆記
- 此安全性定義 需要 使用
x-ms-client-id
標頭來指出應用程式要求存取的 Azure 地圖服務資源。 這可以從 地圖管理 API取得。
Authorization URL
專屬於 Azure 公用雲端實例。 主權雲端具有唯一的授權 URL 和 Azure Active Directory 設定。
* 透過 Azure 入口網站、PowerShell、CLI、Azure SDK 或 REST API,從 Azure 管理 平面設定 Azure 角色型存取控制。
* Azure 地圖服務 Web SDK 的使用方式允許針對多個使用案例設定應用程式。
- 目前,Azure Active Directory v1.0 或 v2.0 支援公司、學校和來賓,但不支持個人帳戶。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
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"
}
]
}
定義
名稱 | Description |
---|---|
Error |
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
error 物件。
名稱 | 類型 | Description |
---|---|---|
code |
其中一組伺服器定義的錯誤碼。 |
|
details |
Error[] |
導致此錯誤之特定錯誤的詳細數據陣列。 |
innererror |
物件,包含與目前對象有關錯誤更具體的資訊。 |
|
message |
string |
錯誤的人類可讀取表示法。 |
target |
string |
錯誤的目標。 |
ErrorCode
人類可讀取的錯誤碼。
名稱 | 類型 | Description |
---|---|---|
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
錯誤回應。
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
InnerErrorCode
人類可讀取的錯誤碼。
名稱 | 類型 | Description |
---|---|---|
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。
名稱 | 類型 | Description |
---|---|---|
code |
其中一組伺服器定義的錯誤碼。 |
|
details |
object |
錯誤詳細數據。 |
innererror |
物件,包含與目前對象有關錯誤更具體的資訊。 |
|
message |
string |
錯誤資訊。 |
target |
string |
錯誤目標。 |
QnaSourceRecord
具有上次更新日期時間的自訂來源記錄。
名稱 | 類型 | 預設值 | Description |
---|---|---|---|
contentStructureKind | Unstructured |
來源的內容結構類型。 |
|
displayName |
string |
來源的易記名稱。 |
|
lastUpdatedDateTime |
string |
上次更新 QnA 的日期時間。 |
|
source |
string |
唯一來源標識碼。 如果是 'file' 來源,則為檔案的名稱;否則,如果是 'url' 來源,則為完整的 URL。 |
|
sourceKind | url |
支援的來源類型。 |
|
sourceUri |
string |
檔案或 URL 的 URI 位置。 |
QnaSources
專案的所有 QnA 來源。
名稱 | 類型 | Description |
---|---|---|
nextLink |
string |
|
value |
從中擷取或明確新增 QnAs 的自定義來源。 |
sourceContentStructureKind
來源的內容結構類型。
名稱 | 類型 | Description |
---|---|---|
unstructured |
string |
sourceKind
支援的來源類型。
名稱 | 類型 | Description |
---|---|---|
file |
string |
|
url |
string |