你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Question Answering Projects - List Projects

获取用户的所有项目。

GET {Endpoint}/language/query-knowledgebases/projects?api-version=2021-10-01
GET {Endpoint}/language/query-knowledgebases/projects?api-version=2021-10-01&top={top}&skip={skip}&maxpagesize={maxpagesize}

URI 参数

名称 必需 类型 说明
Endpoint
path True

string

支持的认知服务终结点(例如 https://.api.cognitiveservices.azure.com).

api-version
query True

string

客户端 API 版本。

maxpagesize
query

integer (int32)

单个响应中要包含的最大资源数。

skip
query

integer (int32)

要返回的第一个资源的集合中的偏移量。

top
query

integer (int32)

要从集合返回的最大资源数。

请求头

名称 必需 类型 说明
Ocp-Apim-Subscription-Key True

string

响应

名称 类型 说明
200 OK

ProjectsMetadata

所有项目的元数据。

Other Status Codes

ErrorResponse

错误响应。

安全性

Ocp-Apim-Subscription-Key

类型: apiKey
在: header

示例

Successful query

示例请求

GET {Endpoint}/language/query-knowledgebases/projects?api-version=2021-10-01

示例响应

{
  "value": [
    {
      "projectName": "proj1",
      "description": "proj1 is a test project.",
      "language": "en",
      "multilingualResource": true,
      "createdDateTime": "2021-05-01T15:13:22Z",
      "lastModifiedDateTime": "2021-05-01T15:13:22Z",
      "lastDeployedDateTime": "2021-05-01T15:13:22Z"
    },
    {
      "projectName": "proj2",
      "description": "proj2 is a test project.",
      "language": "fr",
      "multilingualResource": true,
      "createdDateTime": "2021-05-01T15:13:22Z",
      "lastModifiedDateTime": "2021-05-01T15:13:22Z",
      "lastDeployedDateTime": "2021-05-01T15:13:22Z"
    }
  ]
}

定义

名称 说明
Error

错误对象。

ErrorCode

人工可读错误代码。

ErrorResponse

错误响应。

InnerErrorCode

人工可读错误代码。

InnerErrorModel

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

ProjectMetadata

表示项目。

ProjectSettings

项目的可配置设置。

ProjectsMetadata

项目元数据和全局设置的集合。

Error

错误对象。

名称 类型 说明
code

ErrorCode

服务器定义的错误代码集之一。

details

Error[]

导致此报告错误的特定错误的详细信息数组。

innererror

InnerErrorModel

包含与当前对象有关错误的更具体信息的对象。

message

string

错误的人工可读表示形式。

target

string

错误的目标。

ErrorCode

人工可读错误代码。

说明
AzureCognitiveSearchIndexLimitReached
AzureCognitiveSearchIndexNotFound
AzureCognitiveSearchNotFound
AzureCognitiveSearchThrottling
Forbidden
InternalServerError
InvalidArgument
InvalidRequest
NotFound
OperationNotFound
ProjectNotFound
ServiceUnavailable
TooManyRequests
Unauthorized

ErrorResponse

错误响应。

名称 类型 说明
error

Error

错误对象。

InnerErrorCode

人工可读错误代码。

说明
AzureCognitiveSearchNotFound
AzureCognitiveSearchThrottling
ExtractionFailure
InvalidParameterValue
InvalidRequest
KnowledgeBaseNotFound

InnerErrorModel

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

名称 类型 说明
code

InnerErrorCode

服务器定义的错误代码集之一。

details

object

错误详细信息。

innererror

InnerErrorModel

包含与当前对象有关错误的更具体信息的对象。

message

string

错误信息。

target

string

错误目标。

ProjectMetadata

表示项目。

名称 类型 说明
createdDateTime

string (date-time)

项目创建日期时间。

description

string

项目的说明。

language

string

文本记录的语言。 这是语言的 BCP-47 表示形式。 例如,将“en”用于英语;西班牙语等的“es”。如果未设置,请将“en”用于英语作为默认值。

lastDeployedDateTime

string (date-time)

表示上次部署日期时间的项目。

lastModifiedDateTime

string (date-time)

表示上次修改的日期时间的项目。

multilingualResource

boolean

为跨项目启用多种语言的资源。

projectName

string

项目的名称。

settings

ProjectSettings

项目的可配置设置。

ProjectSettings

项目的可配置设置。

名称 类型 说明
defaultAnswer

string

在知识库中找不到良好匹配项时,默认应答响应。

ProjectsMetadata

项目元数据和全局设置的集合。

名称 类型 说明
nextLink

string

value

ProjectMetadata[]

表示项目。