שיטות אחרות

Mutate, Search ו-SearchStream הן השיטות הנפוצות ביותר ב-Google Ads API, אבל יש הרבה שיטות נוספות למטרות ספציפיות. כל השירותים וממשקי ה-API שלהם מתועדים במסמכי התיעוד ל-REST.

מיפוי של פרוטוקול RPC ל-REST עם מאגר נתונים זמני

כל נקודות הקצה של השירות (בשימוש ב-REST וב-gRPC) מוגדרות בסופו של דבר בקובצי.proto של חבילת השירותים באמצעות proto3 Interface Definition Language.

דוגמה: ListAccessibleCustomers

לדוגמה, בקובץ customer_service.proto מוגדרת השיטה ListAccessibleCustomers, בנוסף ל-Mutate הרגיל. ההערה google.api.http שלה מתארת איך השיטה ממופה ל-HTTP. היא משתמשת ב-HTTP GET עם פועל מותאם אישית listAccessibleCustomers:

rpc ListAccessibleCustomers(ListAccessibleCustomersRequest)
    returns (ListAccessibleCustomersResponse) {
  option (google.api.http) = {
    get: "/v16/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: "/v16/customers/{customer_id=*}:createCustomerClient"
    body: "*"
  };
  option (google.api.method_signature) = "customer_id,customer_client";
}

המיפוי ממופה לשיטה customers.createCustomerClient REST.