Method: hashLists.batchGet
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אחזור של כמה רשימות גיבוב בבת אחת.
לרוב, לקוחות צריכים לקבל כמה רשימות גיבוב. מומלץ להשתמש בשיטה הזו במקום להשתמש מספר פעמים בשיטת Get הרגילה.
זוהי שיטה רגילה של אחזור (Get) באצווה כפי שמוגדרת בכתובת https://google.aip.dev/231, ושיטת ה-HTTP היא גם GET.
בקשת HTTP
GET https://safebrowsing.googleapis.com/v5/hashLists:batchGet
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של שאילתה
פרמטרים |
names[] |
string
חובה. השמות של רשימות הגיבוב הספציפיות. הרשימה עשויה להיות רשימת איומים או המטמון הגלובלי. אסור לכלול שמות כפולים. אם יהיו כאלה, הלקוח יקבל הודעת שגיאה.
|
version[] |
string (bytes format)
הגרסאות של רשימת הגיבוב שכבר קיימות אצל הלקוח. אם זו הפעם הראשונה שהלקוח מאחזר את רשימות הגיבוב, השדה צריך להישאר ריק. אחרת, הלקוח צריך לספק את הגרסאות שהתקבלו מהשרת בעבר. אסור ללקוח לבצע מניפולציה על הבייטים האלה. הלקוח לא צריך לשלוח את הגרסאות באותו סדר שבו מופיעים שמות הרשימות התואמים. הלקוח יכול לשלוח בבקשה פחות גרסאות מאשר שמות או יותר גרסאות מאשר שמות. עם זאת, אסור ללקוח לשלוח כמה גרסאות שתואמות לאותו שם. אם הוא יעשה זאת, יוצג לו הודעת שגיאה. הערה היסטורית: בגרסה 4 של ה-API, השם היה states . השם השתנה עכשיו ל-version כדי לשפר את הבהירות. מחרוזת בקידוד Base64.
|
sizeConstraints |
object (SizeConstraints )
מגבלות הגודל בכל רשימה. אם השדה הזה לא יצוין, לא יהיו אילוצים. חשוב לזכור שהגדלים האלה מוצגים לכל רשימה בנפרד, ולא מצטברים מכל הרשימות.
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
התשובה מכילה כמה רשימות גיבוב.
אם הפעולה מצליחה, גוף התגובה מכיל נתונים במבנה הבא:
ייצוג ב-JSON |
{
"hashLists": [
{
object (HashList )
}
]
} |
שדות |
hashLists[] |
object (HashList )
רשימות הגיבוב מופיעות באותו סדר שבו הן צוינו בבקשה.
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# Method: hashLists.batchGet\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BatchGetHashListsResponse.SCHEMA_REPRESENTATION)\n\nGet multiple hash lists at once.\n\nIt is very common for a client to need to get multiple hash lists. Using this method is preferred over using the regular Get method multiple times.\n\nThis is a standard batch Get method as defined by \u003chttps://google.aip.dev/231\u003e and the HTTP method is also GET.\n\n### HTTP request\n\n`GET https://safebrowsing.googleapis.com/v5/hashLists:batchGet`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `names[]` | `string` Required. The names of the particular hash lists. The list MAY be a threat list, or it may be the Global Cache. The names MUST NOT contain duplicates; if they did, the client will get an error. |\n| `version[]` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` The versions of the hash list that the client already has. If this is the first time the client is fetching the hash lists, the field should be left empty. Otherwise, the client should supply the versions previously received from the server. The client MUST NOT manipulate those bytes. The client need not send the versions in the same order as the corresponding list names. The client may send fewer or more versions in a request than there are names. However the client MUST NOT send multiple versions that correspond to the same name; if it did, the client will get an error. Historical note: in V4 of the API, this was called `states`; it is now renamed to `version` for clarity. A base64-encoded string. |\n| `sizeConstraints` | `object (`[SizeConstraints](/safe-browsing/reference/rest/v5/SizeConstraints)`)` The size constraints on each list. If omitted, there are no constraints. Note that the sizes here are per-list, not aggregated across all lists. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe response containing multiple hash lists.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------|\n| ``` { \"hashLists\": [ { object (/safe-browsing/reference/rest/v5/hashList#HashList) } ] } ``` |\n\n| Fields ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------|\n| `hashLists[]` | `object (`[HashList](/safe-browsing/reference/rest/v5/hashList#HashList)`)` The hash lists in the same order given in the request. |"]]