Mutate, Search ו-SearchStream הן השיטות הנפוצות ביותר ב-Google Ads API, אבל יש עוד הרבה שיטות למטרות ספציפיות. כל השירותים וממשקי ה-API שלהם מתועדים במסמכי העזר.
מיפויים של Protocol buffer RPC ל-REST
כל נקודות הקצה (endpoints) של השירות (בין אם נעשה בהן שימוש ב-REST או ב-gRPC) מוגדרות בסופו של דבר בקובצי .proto של חבילת השירותים באמצעות שפת הגדרת הממשק proto3.
דוגמה: ListAccessibleCustomers
לדוגמה, בקובץ customer_service.proto מוגדרת שיטה ListAccessibleCustomers, בנוסף לשיטה הרגילה Mutate. ההערה google.api.http שלו מתארת איך ה-method ממופה ל-HTTP. היא משתמשת ב-HTTP GET עם הפועל המותאם אישית listAccessibleCustomers:
rpc ListAccessibleCustomers(ListAccessibleCustomersRequest) returns (ListAccessibleCustomersResponse) { option (google.api.http) = { get: "/v22/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: "/v22/customers/{customer_id=*}:createCustomerClient" body: "*" }; option (google.api.method_signature) = "customer_id,customer_client"; }
המיפוי הזה מתבצע לשיטת ה-REST customers.createCustomerClient.