Actions API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
适用于 Actions API 的 RESTful 服务。
服务:actions.googleapis.com
要调用此服务,我们建议您使用 Google 提供的客户端库。如果您的应用程序需要使用自己的库来调用此服务,请在发出 API 请求时使用以下信息。
发现文档
发现文档是用于说明和使用 REST API 的机器可读规范。它用于构建客户端库、IDE 插件以及与 Google API 交互的其他工具。一项服务可能会提供多个发现文档。此服务提供了以下发现文档:
服务端点
服务端点是指定 API 服务的网络地址的基本网址。一项服务可能有多个服务端点。此服务具有以下服务端点,下面的所有 URI 都与此服务端点相关:
https://actions.googleapis.com
方法 |
matchIntents |
POST /v2/{project=projects/*}:matchIntents
查找与给定查询匹配的 intent。 |
sendInteraction |
POST /v2/{project=projects/*}:sendInteraction
播放一轮对话。 |
方法 |
read |
POST /v2/{name=projects/*/draft}:read
阅读项目草稿的全部内容。 |
write |
POST /v2/{parent=projects/*}/draft:write
根据模型更新项目草稿。 |
方法 |
write |
POST /v2/{parent=projects/*}/preview:write
根据模型更新用户的项目预览。 |
方法 |
list |
GET /v2/{parent=projects/*}/releaseChannels
列出所有发布版本和对应的版本(如果有)。 |
方法 |
create |
POST /v2/{parent=projects/*}/versions:create
根据模型创建项目版本,并触发到指定发布渠道的部署(如果指定)。 |
list |
GET /v2/{parent=projects/*}/versions
列出所有版本及其当前状态。 |
read |
POST /v2/{name=projects/*/versions/*}:read
读取项目版本的全部内容。 |
方法 |
list |
GET /v2/sampleProjects
列出 gactions CLI 支持的所有示例项目。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThis is a RESTful API service for Google Actions, allowing developers to build and manage conversational experiences.\u003c/p\u003e\n"],["\u003cp\u003eIt provides access to various resources for tasks like intent matching, conversation interactions, project draft management, and version control.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage Google-provided client libraries or utilize the provided discovery document and service endpoint for custom integrations.\u003c/p\u003e\n"],["\u003cp\u003eThe service offers functionalities for encrypting/decrypting secrets, managing web and app activity control, and working with sample projects.\u003c/p\u003e\n"],["\u003cp\u003eAll API requests are relative to the service endpoint: \u003ccode\u003ehttps://actions.googleapis.com\u003c/code\u003e.\u003c/p\u003e\n"]]],["The Actions API offers a RESTful service with resources for managing projects, drafts, previews, release channels, and versions. Key actions include: decrypting/encrypting OAuth secrets, managing web and app activity controls, matching intents to queries, and simulating conversations. Project drafts can be read and updated. Project previews can be updated. Release channels and project versions can be listed, and project versions can be created and read. The service also provides a list of available sample projects.\n"],null,["# Actions API\n\nA RESTful service for the Actions API.\n\n- [REST Resource: v2](#v2)\n- [REST Resource: v2.projects](#v2.projects)\n- [REST Resource: v2.projects.draft](#v2.projects.draft)\n- [REST Resource: v2.projects.preview](#v2.projects.preview)\n- [REST Resource: v2.projects.releaseChannels](#v2.projects.releaseChannels)\n- [REST Resource: v2.projects.versions](#v2.projects.versions)\n- [REST Resource: v2.sampleProjects](#v2.sampleProjects)\n\nService: actions.googleapis.com\n-------------------------------\n\nTo call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.\n\n### Discovery document\n\nA [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:\n\n- \u003chttps://actions.googleapis.com/$discovery/rest?version=v2\u003e\n\n### Service endpoint\n\nA [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:\n\n- `https://actions.googleapis.com`\n\nREST Resource: [v2](/assistant/actions/api/reference/rest/v2/TopLevel)\n----------------------------------------------------------------------\n\n| Methods ||\n|--------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| [decryptSecret](/assistant/actions/api/reference/rest/v2/TopLevel/decryptSecret) | `POST /v2:decryptSecret` Decrypts the OAuth client secret used in account linking flows. |\n| [encryptSecret](/assistant/actions/api/reference/rest/v2/TopLevel/encryptSecret) | `POST /v2:encryptSecret` Encrypts the OAuth client secret used in account linking flows. |\n| [setWebAndAppActivityControl](/assistant/actions/api/reference/rest/v2/TopLevel/setWebAndAppActivityControl) | `POST /v2:setWebAndAppActivityControl` Sets the Web \\& App Activity control on a service account. |\n\nREST Resource: [v2.projects](/assistant/actions/api/reference/rest/v2/projects)\n-------------------------------------------------------------------------------\n\n| Methods ||\n|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [matchIntents](/assistant/actions/api/reference/rest/v2/projects/matchIntents) | `POST /v2/{project=projects/*}:matchIntents` Finds the intents that match a given query. |\n| [sendInteraction](/assistant/actions/api/reference/rest/v2/projects/sendInteraction) | `POST /v2/{project=projects/*}:sendInteraction` Plays one round of the conversation. |\n\nREST Resource: [v2.projects.draft](/assistant/actions/api/reference/rest/v2/projects.draft)\n-------------------------------------------------------------------------------------------\n\n| Methods ||\n|------------------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [read](/assistant/actions/api/reference/rest/v2/projects.draft/read) | `POST /v2/{name=projects/*/draft}:read` Reads the entire content of the project draft. |\n| [write](/assistant/actions/api/reference/rest/v2/projects.draft/write) | `POST /v2/{parent=projects/*}/draft:write` Updates the project draft based on the model. |\n\nREST Resource: [v2.projects.preview](/assistant/actions/api/reference/rest/v2/projects.preview)\n-----------------------------------------------------------------------------------------------\n\n| Methods ||\n|--------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| [write](/assistant/actions/api/reference/rest/v2/projects.preview/write) | `POST /v2/{parent=projects/*}/preview:write` Updates the user's project preview based on the model. |\n\nREST Resource: [v2.projects.releaseChannels](/assistant/actions/api/reference/rest/v2/projects.releaseChannels)\n---------------------------------------------------------------------------------------------------------------\n\n| Methods ||\n|--------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| [list](/assistant/actions/api/reference/rest/v2/projects.releaseChannels/list) | `GET /v2/{parent=projects/*}/releaseChannels` Lists all release channels and corresponding versions, if any. |\n\nREST Resource: [v2.projects.versions](/assistant/actions/api/reference/rest/v2/projects.versions)\n-------------------------------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [create](/assistant/actions/api/reference/rest/v2/projects.versions/create) | `POST /v2/{parent=projects/*}/versions:create` Creates a project version based on the model and triggers deployment to the specified release channel, if specified. |\n| [list](/assistant/actions/api/reference/rest/v2/projects.versions/list) | `GET /v2/{parent=projects/*}/versions` Lists all versions and their current states. |\n| [read](/assistant/actions/api/reference/rest/v2/projects.versions/read) | `POST /v2/{name=projects/*/versions/*}:read` Reads the entire content of a project version. |\n\nREST Resource: [v2.sampleProjects](/assistant/actions/api/reference/rest/v2/sampleProjects)\n-------------------------------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| [list](/assistant/actions/api/reference/rest/v2/sampleProjects/list) | `GET /v2/sampleProjects` Lists all the sample projects supported by the gactions CLI. |"]]