Method: accounts.reports.search
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Pobiera raport zdefiniowany przez zapytanie. Odpowiedź może zawierać mniej wierszy niż określono w parametry pageSize
. Aby określić, czy są jeszcze inne wiersze, na które można wysłać żądanie, użyj wartości nextPageToken
.
Żądanie HTTP
POST https://merchantapi.googleapis.com/reports/v1beta/{parent=accounts/*}/reports:search
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
parent |
string
Wymagane. Identyfikator konta nawiązującego połączenie. Musi to być samodzielne konto lub subkonto MCA. Format: accounts/{account}
|
Treść żądania
Treść żądania zawiera dane o następującej strukturze:
Zapis JSON |
{
"query": string,
"pageSize": integer,
"pageToken": string
} |
Pola |
query |
string
Wymagane. Zapytanie określające raport do pobrania. Szczegółowe informacje o składaniu zapytań znajdziesz w przewodniku po języku zapytań. Pełną listę dostępnych tabel i pol znajdziesz w sekcji Dostępne pola.
|
pageSize |
integer
Opcjonalnie: Liczba ReportRows do pobrania na jednej stronie. Domyślna wartość to 1000. Wartości powyżej 5000 są przymusowo ustawiane na 5000.
|
pageToken |
string
Opcjonalnie: Token strony do pobrania. Jeśli nie określisz tej wartości, zwrócona zostanie pierwsza strona wyników. Aby zażądać następnej strony wyników, należy użyć wartości uzyskanej z nextPageToken w poprzedniej odpowiedzi.
|
Treść odpowiedzi
wiadomość z odpowiedzią dla metody ReportService.Search
.
W przypadku powodzenia treść żądania zawiera dane o następującej strukturze:
Zapis JSON |
{
"results": [
{
object (ReportRow )
}
],
"nextPageToken": string
} |
Pola |
results[] |
object (ReportRow )
Wiersze pasujące do zapytania.
|
nextPageToken |
string
Token, który można wysłać jako pageToken , aby pobrać następną stronę. Jeśli pominiesz to pole, nie będzie kolejnych stron.
|
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
https://www.googleapis.com/auth/content
Więcej informacji znajdziesz w OAuth 2.0 Overview.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-01-23 UTC.
[null,null,["Ostatnia aktualizacja: 2025-01-23 UTC."],[[["\u003cp\u003eRetrieves a report based on a search query, returning results potentially across multiple pages using pagination.\u003c/p\u003e\n"],["\u003cp\u003eRequires a search query in the request body and allows specifying the desired page size and page token.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes matching report rows and a token for retrieving the next page if available.\u003c/p\u003e\n"],["\u003cp\u003eThe API utilizes gRPC Transcoding syntax and needs authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eReport data is structured using \u003ccode\u003eReportRow\u003c/code\u003e objects within the response body.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.reports.search\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SearchResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nRetrieves a report defined by a search query. The response might contain fewer rows than specified by `pageSize`. Rely on `nextPageToken` to determine if there are more rows to be requested.\n\n### HTTP request\n\n`POST https://merchantapi.googleapis.com/reports/v1beta/{parent=accounts/*}/reports:search`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. Id of the account making the call. Must be a standalone account or an MCA subaccount. Format: accounts/{account} |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------|\n| ``` { \"query\": string, \"pageSize\": integer, \"pageToken\": string } ``` |\n\n| Fields ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `query` | `string` Required. Query that defines a report to be retrieved. For details on how to construct your query, see the [Query Language guide](/merchant/api/guides/reports/query-language). For the full list of available tables and fields, see the [Available fields](/merchant/api/reference/rest/reports_{apiVersion}/accounts.reports). |\n| `pageSize` | `integer` Optional. Number of `ReportRows` to retrieve in a single page. Defaults to 1000. Values above 5000 are coerced to 5000. |\n| `pageToken` | `string` Optional. Token of the page to retrieve. If not specified, the first page of results is returned. In order to request the next page of results, the value obtained from `nextPageToken` in the previous response should be used. |\n\n### Response body\n\nResponse message for the `ReportService.Search` method.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"results\": [ { object (/merchant/api/reference/rest/reports_v1beta/accounts.reports#ReportRow) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| `results[]` | `object (`[ReportRow](/merchant/api/reference/rest/reports_v1beta/accounts.reports#ReportRow)`)` Rows that matched the search query. |\n| `nextPageToken` | `string` Token which can be sent as `pageToken` to retrieve the next page. If omitted, there are no subsequent pages. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]