주의: 이 API의 REST 인터페이스에 대한 문서를 보고 있습니다. 대부분의 공식 클라이언트 라이브러리는 gRPC를 사용합니다. 자세한 내용은
REST 소개를 참조하세요.
기타 방법
Mutate
, Search
, SearchStream
가 Google Ads API에서 가장 일반적인 메서드이지만 특정 목적을 위한 다른 메서드도 많이 있습니다. 모든 서비스와 API는 REST 참조 문서에 설명되어 있습니다.
프로토콜 버퍼 RPC와 REST 매핑
모든 서비스 엔드포인트 (REST 및 gRPC 사용 여부와 관계없음)는 궁극적으로 proto3 인터페이스 정의 언어를 사용하여 서비스 패키지의.proto 파일에 정의됩니다.
예: ListAccessibleCustomers
예를 들어 customer_service.proto
파일은 표준 Mutate
외에 ListAccessibleCustomers
메서드를 정의합니다. google.api.http
주석은 메서드가 HTTP에 매핑되는 방식을 설명합니다. 맞춤 동사 listAccessibleCustomers
와 함께 HTTP GET
를 사용합니다.
rpc ListAccessibleCustomers(ListAccessibleCustomersRequest)
returns (ListAccessibleCustomersResponse) {
option (google.api.http) = {
get: "/v19/customers:listAccessibleCustomers"
};
}
이는 customers.listAccessibleCustomers REST 메서드에 매핑됩니다.
예: CreateCustomerClient
customer_service.proto
의 또 다른 예는 CreateCustomerClient
메서드입니다. google.api.http
주석은 맞춤 동사 createCustomerClient
를 사용하는 HTTP POST
를 설명합니다.
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 메서드에 매핑됩니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-03-08(UTC)
[null,null,["최종 업데이트: 2025-03-08(UTC)"],[[["While `Mutate`, `Search`, and `SearchStream` are commonly used, the Google Ads API offers a wide range of methods for specific tasks, all documented in the REST reference documentation."],["All Google Ads API service endpoints, including REST and gRPC, are defined in .proto files using the proto3 Interface Definition Language."],["The `google.api.http` annotation within these .proto files details how each method maps to HTTP for RESTful interactions, including examples like `ListAccessibleCustomers` and `CreateCustomerClient`."]]],["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"]]