Method: setWebAndAppActivityControl
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
POST https://actions.googleapis.com/v2:setWebAndAppActivityControl
网址采用 gRPC 转码语法。
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"enabled": boolean
} |
字段 |
enabled |
boolean
应将设置设为启用状态还是停用状态。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eEnables or disables Web & App Activity control for service accounts, required for using call Actions.\u003c/p\u003e\n"],["\u003cp\u003eThis setting is persistent and needs to be enabled only once per account unless later disabled.\u003c/p\u003e\n"],["\u003cp\u003eReturns an error if used by non-service accounts; user accounts manage this setting through the Activity Controls page.\u003c/p\u003e\n"],["\u003cp\u003eThe request body uses a simple JSON structure with a boolean field "enabled" to set the desired state.\u003c/p\u003e\n"],["\u003cp\u003eA successful operation results in an empty response body.\u003c/p\u003e\n"]]],[],null,["# Method: setWebAndAppActivityControl\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n\nSets the Web \\& App Activity control on a service account.\n\nIt is necessary to have this setting enabled in order to use call Actions. The setting is originally disabled for service accounts, and it is preserved until set to a different value. This means it only needs to be enabled once per account (and not necessarily once per test), unless it is later disabled.\n\nReturns an error if the caller is not a service account. User accounts can change this setting via the Activity Controls page. See \u003chttps://support.google.com/websearch/answer/54068\u003e.\n\n### HTTP request\n\n`POST https://actions.googleapis.com/v2:setWebAndAppActivityControl`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|--------------------------------|---|\n| ``` { \"enabled\": boolean } ``` |\n\n| Fields ||\n|-----------|------------------------------------------------------------------------------|\n| `enabled` | `boolean` Whether the setting should be set to an enabled or disabled state. |\n\n### Response body\n\nIf successful, the response body is empty."]]