Method: accounts.reports.search
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يسترجع تقريرًا محدّدًا من خلال طلب بحث. قد يحتوي الردّ على صفوف أقلّ من تلك المحدّدة في pageSize
. استخدِم nextPageToken
لتحديد ما إذا كان هناك المزيد من الصفوف المطلوب طلبها.
طلب HTTP
POST https://merchantapi.googleapis.com/reports/v1beta/{parent=accounts/*}/reports:search
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
parent |
string
مطلوب. رقم تعريف الحساب الذي يجري المكالمة يجب أن يكون حسابًا مستقلاً أو حسابًا فرعيًا لحساب متعدّد العملاء. التنسيق: accounts/{account}
|
نص الطلب
يحتوي نص الطلب على بيانات بالبنية التالية:
تمثيل JSON |
{
"query": string,
"pageSize": integer,
"pageToken": string
} |
الحقول |
query |
string
مطلوب. طلب بحث يحدِّد التقرير المطلوب استرجاعه لمعرفة التفاصيل حول كيفية إنشاء طلب البحث، اطّلِع على دليل لغة طلبات البحث. للحصول على القائمة الكاملة بالجداول والحقول المتاحة، اطّلِع على "الحقول المتاحة".
|
pageSize |
integer
اختيارية: عدد ReportRows التي سيتم استرجاعها في صفحة واحدة القيمة التلقائية هي 1000. يتم فرض القيم التي تزيد عن 5000 لتكون 5000.
|
pageToken |
string
اختيارية: الرمز المميّز للصفحة المطلوب استردادها إذا لم يتم تحديدها، يتم عرض الصفحة الأولى من النتائج. لطلب الصفحة التالية من النتائج، يجب استخدام القيمة التي تم الحصول عليها من nextPageToken في الاستجابة السابقة.
|
نص الاستجابة
رسالة الردّ على طريقة ReportService.Search
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تمثيل JSON |
{
"results": [
{
object (ReportRow )
}
],
"nextPageToken": string
} |
الحقول |
results[] |
object (ReportRow )
الصفوف التي تطابقت مع طلب البحث
|
nextPageToken |
string
رمز مميّز يمكن إرساله على شكل pageToken لاسترداد الصفحة التالية. في حال حذفها، لن تظهر أي صفحات لاحقة.
|
نطاقات التفويض
يجب توفير نطاق OAuth التالي:
https://www.googleapis.com/auth/content
لمزيد من المعلومات، يُرجى الاطّلاع على OAuth 2.0 Overview.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-01-23 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-01-23 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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)."]]