Method: projects.locations.collections.engines.assistants.agents.list

列出调用者在 Assistant 下创建的所有 Agent

HTTP 请求

GET https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*/assistants/*}/agents

网址采用 gRPC 转码语法。

路径参数

参数
parent

string

必需。父级资源名称。格式:projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

查询参数

参数
pageSize

integer

可选。要返回的 Agent 数量上限。如果未指定,则默认为 100。允许的最大值为 1000;任何高于该值的值都会强制转换为 1000。

pageToken

string

可选。从之前的 AgentService.ListAgents 调用接收的页面令牌 ListAgentsResponse.next_page_token。利用其进行后续页面检索。

进行分页时,提供给 agents.list 的所有其他参数必须与提供页面令牌的调用匹配。

orderBy

string

可选。以英文逗号分隔的排序依据字段列表,按升序排序。在字段名称后使用“desc”表示降序。支持的字段:

  • updateTime
  • isPinned

示例:

  • “updateTime desc”
  • “isPinned desc,updateTime desc”:先按 isPinned 列出代理,然后按 updateTime 列出代理。

请求正文

请求正文必须为空。

响应正文

如果成功,则响应正文包含一个 ListAgentsResponse 实例。

授权范围

需要以下 OAuth 范围之一:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite

如需了解详情,请参阅 Authentication Overview

IAM 权限

需要拥有 parent 资源的以下 IAM 权限:

  • discoveryengine.agents.list

如需了解详情,请参阅 IAM 文档