Other Methods

While get, mutate, search, and searchStream are the most common methods in the Google Ads API, there are many others for specific purposes. All services and their APIs are defined in the .proto files of the services package using the proto3 Interface Definition Language.

You can also inspect the API's discovery document to get a full list of services, information about their URLs, and request and response formats.

For example, the customer_service.proto file defines listAccessibleCustomers and createCustomerClient methods, in addition to the standard mutate and get methods explained above.

// Returns resource names of customers directly accessible by the
// user authenticating the call.
rpc ListAccessibleCustomers(ListAccessibleCustomersRequest) returns (ListAccessibleCustomersResponse) {
  option (google.api.http) = {
    get: "/v4/customers:listAccessibleCustomers"
  };
}

// Creates a new client under manager. The new client customer is returned.
rpc CreateCustomerClient(CreateCustomerClientRequest) returns (CreateCustomerClientResponse) {
  option (google.api.http) = {
    post: "/v4/customers/{customer_id=*}:createCustomerClient"
    body: "*"
  };
  option (google.api.method_signature) = "customer_id,customer_client";
}

The google.api.http annotation defines the HTTP verb (POST), custom method name (listAccessibleCustomers), and base URL pattern (/v4/customers/{customer_id=*}:listAccessibleCustomers) for REST API calls.