चेतावनी: आप एपीआई के REST इंटरफ़ेस के बारे में दस्तावेज़ देख रहे हैं. हमारी ज़्यादातर आधिकारिक क्लाइंट लाइब्रेरी, gRPC का इस्तेमाल करती हैं. ज़्यादा जानकारी के लिए,
REST के बारे में जानकारी देखें.
अन्य तरीके
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Google Ads API में, Mutate
, Search
, और SearchStream
सबसे ज़्यादा इस्तेमाल किए जाने वाले तरीके हैं. हालांकि, खास मकसद के लिए कई अन्य तरीके भी उपलब्ध हैं. सभी सेवाओं और उनके एपीआई के बारे में रेफ़रंस दस्तावेज़ में बताया गया है.
प्रोटोकॉल बफ़र आरपीसी से REST मैपिंग
सभी सेवा एंडपॉइंट (चाहे REST और gRPC का इस्तेमाल किया जा रहा हो) को आखिर में, सेवाओं के पैकेज की .proto फ़ाइलों में तय किया जाता है. इसके लिए, proto3 इंटरफ़ेस डेफ़िनिशन लैंग्वेज का इस्तेमाल किया जाता है.
उदाहरण: ListAccessibleCustomers
उदाहरण के लिए, customer_service.proto
फ़ाइल, स्टैंडर्ड Mutate
के अलावा ListAccessibleCustomers
तरीके को भी तय करती है. इसके google.api.http
एनोटेशन में बताया गया है कि यह तरीका एचटीटीपी से कैसे मैप होता है. यह कस्टम वर्ब listAccessibleCustomers
के साथ एचटीटीपी GET
का इस्तेमाल करता है:
rpc ListAccessibleCustomers(ListAccessibleCustomersRequest)
returns (ListAccessibleCustomersResponse) {
option (google.api.http) = {
get: "/v21/customers:listAccessibleCustomers"
};
}
यह customers.listAccessibleCustomers REST तरीके पर मैप होता है.
उदाहरण: CreateCustomerClient
customer_service.proto
का एक और उदाहरण CreateCustomerClient
तरीका है. इसके google.api.http
एनोटेशन में, कस्टम वर्ब createCustomerClient
का इस्तेमाल करके POST
एचटीटीपी के बारे में बताया गया है:
rpc CreateCustomerClient(CreateCustomerClientRequest)
returns (CreateCustomerClientResponse) {
option (google.api.http) = {
post: "/v21/customers/{customer_id=*}:createCustomerClient"
body: "*"
};
option (google.api.method_signature) = "customer_id,customer_client";
}
यह customers.createCustomerClient REST तरीके पर मैप होता है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-27 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-27 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eWhile \u003ccode\u003eMutate\u003c/code\u003e, \u003ccode\u003eSearch\u003c/code\u003e, and \u003ccode\u003eSearchStream\u003c/code\u003e are commonly used, the Google Ads API offers a wide range of methods for specific tasks, all documented in the REST reference documentation.\u003c/p\u003e\n"],["\u003cp\u003eAll Google Ads API service endpoints, including REST and gRPC, are defined in .proto files using the proto3 Interface Definition Language.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egoogle.api.http\u003c/code\u003e annotation within these .proto files details how each method maps to HTTP for RESTful interactions, including examples like \u003ccode\u003eListAccessibleCustomers\u003c/code\u003e and \u003ccode\u003eCreateCustomerClient\u003c/code\u003e.\u003c/p\u003e\n"]]],["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"],null,["# Other Methods\n\nWhile `Mutate`, `Search`, and `SearchStream` are the most common methods\nin the Google Ads API, there are many others for specific purposes. All services and\ntheir APIs are documented in the\n[reference documentation](/google-ads/api/reference/rpc/v21/overview).\n\nProtocol buffer RPC to REST mappings\n------------------------------------\n\nAll the service endpoints (whether using REST and gRPC) are ultimately defined\nin the\n[.proto files of the services package](https://github.com/googleapis/googleapis/tree/master/google/ads/googleads/v21/services)\nusing the\n[proto3 Interface Definition Language](//cloud.google.com/apis/design/proto3).\n\n### Example: ListAccessibleCustomers\n\nFor example, the [`customer_service.proto`](https://github.com/googleapis/googleapis/tree/master/google/ads/googleads/v21/services/customer_service.proto) file\ndefines a `ListAccessibleCustomers` method, in addition to the standard `Mutate`\n. Its [`google.api.http`](//google.aip.dev/127) annotation describes\nhow the method maps to HTTP. It uses an HTTP `GET` with the custom verb\n`listAccessibleCustomers`: \n\n```css+lasso\nrpc ListAccessibleCustomers(ListAccessibleCustomersRequest)\n returns (ListAccessibleCustomersResponse) {\n option (google.api.http) = {\n get: \"/v21/customers:listAccessibleCustomers\"\n };\n}\n```\n\nThis maps to the\n[customers.listAccessibleCustomers](/google-ads/api/reference/rpc/v21/CustomerService/ListAccessibleCustomers)\nREST method.\n\n### Example: CreateCustomerClient\n\nAnother example from [`customer_service.proto`](https://github.com/googleapis/googleapis/tree/master/google/ads/googleads/v21/services/customer_service.proto) is\nthe `CreateCustomerClient` method. Its `google.api.http` annotation describes an\nHTTP `POST` using the custom verb `createCustomerClient`: \n\n```css+lasso\nrpc CreateCustomerClient(CreateCustomerClientRequest)\n returns (CreateCustomerClientResponse) {\n option (google.api.http) = {\n post: \"/v21/customers/{customer_id=*}:createCustomerClient\"\n body: \"*\"\n };\n option (google.api.method_signature) = \"customer_id,customer_client\";\n}\n```\n\nThis maps to the [customers.createCustomerClient](/google-ads/api/reference/rpc/v21/CustomerService/CreateCustomerClient)\nREST method."]]