วิธีการอื่นๆ

แม้ว่า Mutate, Search และ SearchStream จะเป็นเมธอดที่ใช้กันมากที่สุดใน Google Ads API แต่ก็มีเมธอดอื่นๆ อีกมากมายสําหรับวัตถุประสงค์ที่เฉพาะเจาะจง บริการและ API ทั้งหมดมีอยู่ในเอกสารอ้างอิง REST

การแมป Protocol Buffer RPC กับ REST

ปลายทางบริการทั้งหมด (ไม่ว่าจะใช้ REST หรือ gRPC) จะได้รับการกําหนดในท้ายที่สุด ใน ไฟล์ .proto ของแพ็กเกจบริการ โดยใช้ภาษาคําจํากัดความอินเทอร์เฟซ proto3

ตัวอย่าง: ListAccessibleCustomers

เช่น ไฟล์ customer_service.proto จะกำหนดเมธอด ListAccessibleCustomers นอกเหนือจาก Mutate มาตรฐาน คําอธิบายประกอบ google.api.http จะอธิบายวิธีแมปเมธอดกับ HTTP โดยใช้ HTTP GET ที่มีคํากริยาที่กําหนดเอง listAccessibleCustomers

rpc ListAccessibleCustomers(ListAccessibleCustomersRequest)
    returns (ListAccessibleCustomersResponse) {
  option (google.api.http) = {
    get: "/v19/customers:listAccessibleCustomers"
  };
}

ซึ่งจะเชื่อมโยงกับเมธอด REST ของ customers.listAccessibleCustomers

ตัวอย่าง: CreateCustomerClient

อีกตัวอย่างหนึ่งจาก customer_service.proto คือ CreateCustomerClient คําอธิบายประกอบ google.api.http อธิบาย HTTP POST โดยใช้คํากริยาที่กําหนดเอง createCustomerClient ดังนี้

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";
}

ซึ่งจะเชื่อมโยงกับเมธอด customers.createCustomerClient REST