注意:您正在查看 API 的 REST 接口的文档。我们的大多数官方客户端库都使用 gRPC。如需了解详情,请参阅
REST 简介。
其他方法
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Mutate
、Search
和 SearchStream
是最常见的方法,
Google Ads API 中还有许多其他可用于特定用途的 API。所有服务和
其 API 均记录在
REST 参考文档。
协议缓冲区 RPC 到 REST 的映射
所有服务端点(无论是使用 REST 和 gRPC)最终都由
在
服务软件包的.proto 文件
使用
proto3 接口定义语言。
示例:ListAccessibleCustomers
例如,customer_service.proto
文件
除了标准 Mutate
之外,还定义了 ListAccessibleCustomers
方法
,了解所有最新动态。其 google.api.http
注解描述了
该方法映射到 HTTP 的方式它使用带有自定义动词的 HTTP GET
listAccessibleCustomers
:
rpc ListAccessibleCustomers(ListAccessibleCustomersRequest)
returns (ListAccessibleCustomersResponse) {
option (google.api.http) = {
get: "/v17/customers:listAccessibleCustomers"
};
}
这将映射到
customers.listAccessibleCustomers
REST 方法。
示例:CreateCustomerClient
customer_service.proto
中的另一个示例是
CreateCustomerClient
方法。其 google.api.http
注解描述的是
使用自定义动词 createCustomerClient
的 HTTP POST
:
rpc CreateCustomerClient(CreateCustomerClientRequest)
returns (CreateCustomerClientResponse) {
option (google.api.http) = {
post: "/v17/customers/{customer_id=*}:createCustomerClient"
body: "*"
};
option (google.api.method_signature) = "customer_id,customer_client";
}
这将映射到 customers.createCustomerClient
REST 方法。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-10。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
{"lastModified": "\u6700\u540e\u66f4\u65b0\u65f6\u95f4 (UTC)\uff1a2024-09-10\u3002"}
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-09-10。"]]