Dikkat: API'nin REST arayüzüyle ilgili dokümanları görüntülüyorsunuz. Resmi istemci kitaplıklarımızın çoğu gTB kullanır. Ayrıntılar için
REST Tanıtımı'nı inceleyin.
Diğer Yöntemler
Mutate
, Search
ve SearchStream
, Google Ads API'de en yaygın yöntemler olsa da belirli amaçlar için kullanılabilecek başka yöntemler de vardır. Tüm hizmetler ve API'leri REST referans belgelerinde açıklanmıştır.
Protokol arabellek UPÇ'den REST eşlemeleri
Tüm hizmet uç noktaları (REST ve gRPC kullanılsın veya kullanılmasın) nihayetinde proto3 Arayüz Tanımlama Dili kullanılarak hizmetler paketinin.proto dosyalarında tanımlanır.
Örnek: ListAccessibleCustomers
Örneğin, customer_service.proto
dosyası standart Mutate
yöntemine ek olarak bir ListAccessibleCustomers
yöntemi tanımlar. google.api.http
ek açıklaması, yöntemin HTTP ile nasıl eşlendiği hakkında bilgi verir. Özel fiil listAccessibleCustomers
ile bir HTTP GET
kullanır:
rpc ListAccessibleCustomers(ListAccessibleCustomersRequest)
returns (ListAccessibleCustomersResponse) {
option (google.api.http) = {
get: "/v19/customers:listAccessibleCustomers"
};
}
Bu, customers.listAccessibleCustomers REST yöntemiyle eşlenir.
Örnek: CreateCustomerClient
customer_service.proto
'daki bir diğer örnek de CreateCustomerClient
yöntemidir. google.api.http
ek açıklaması, createCustomerClient
özel fiili kullanarak bir HTTP POST
'yi açıklar:
rpc CreateCustomerClient(CreateCustomerClientRequest)
returns (CreateCustomerClientResponse) {
option (google.api.http) = {
post: "/v19/customers/{customer_id=*}:createCustomerClient"
body: "*"
};
option (google.api.method_signature) = "customer_id,customer_client";
}
Bu, customers.createCustomerClient REST yöntemiyle eşlenir.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-04-15 UTC.
[null,null,["Son güncelleme tarihi: 2025-04-15 UTC."],[[["While `Mutate`, `Search`, and `SearchStream` are commonly used, the Google Ads API offers a wide range of methods for specific tasks, all documented in the REST reference documentation."],["All Google Ads API service endpoints, including REST and gRPC, are defined in .proto files using the proto3 Interface Definition Language."],["The `google.api.http` annotation within these .proto files details how each method maps to HTTP for RESTful interactions, including examples like `ListAccessibleCustomers` and `CreateCustomerClient`."]]],["The Google Ads API includes various methods beyond `Mutate`, `Search`, and `SearchStream`, all detailed in REST documentation. Service endpoints are defined in `.proto` files using proto3. `ListAccessibleCustomers` is a GET method, mapped using the `google.api.http` annotation in the `customer_service.proto` file, and uses custom verb `listAccessibleCustomers`. Similarly, `CreateCustomerClient`, a POST method, uses custom verb `createCustomerClient`, also defined in the same file.\n"]]