Method: hashLists.batchGet
HTTP 要求
GET https://safebrowsing.googleapis.com/v5alpha1/hashLists:batchGet
這個網址使用 gRPC 轉碼語法。
查詢參數
參數 |
names[] |
string
必要欄位。特定雜湊清單的名稱。這份清單可能是威脅清單,也可能是全球快取。名稱不得重複,否則用戶端會收到錯誤訊息。
|
version[] |
string (bytes format)
用戶端已擁有的雜湊清單版本。如果這是用戶端第一次擷取雜湊清單,則應將欄位留空。否則,用戶端應提供先前從伺服器收到的版本。用戶端絕對不得操縱這些位元組。 用戶端傳送的版本順序不必與對應的清單名稱相同。用戶端在請求中傳送的版本可能多於或少於名稱。不過,用戶端不得傳送多個與相同名稱相對應的版本,否則會收到錯誤。 歷史備註:在 API 的 4 版中,這個值稱為 states ;現在已重新命名為 version ,以便清楚表示。 Base64 編碼字串。
|
desiredHashLength (deprecated) |
enum (HashLength )
所需雜湊前置字串長度 (以位元組為單位)。然後,伺服器會傳回所有指定長度的雜湊字首。 不同的雜湊清單對 desiredHashLength 欄位可接受的值有不同的規定。您可以在 HashListMetadata 的 supportedHashLengths 欄位中找到這項資訊。如果 desiredHashLength 未在 supportedHashLengths 中指定值,系統會向用戶端傳回錯誤。 具體來說,對於 BatchGetHashListsRequest ,用戶端無法為不同的清單指定不同的 desiredHashLength 。如果需要這樣做,用戶端應分割成多個 BatchGetHashListsRequest 。
|
sizeConstraints |
object (SizeConstraints )
每個清單的大小限制。如果省略,則沒有任何限制。請注意,這裡的大小是每個清單的大小,並未匯總所有清單的大小。
|
回應主體
回應包含多個雜湊清單。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"hashLists": [
{
object (HashList )
}
]
} |
欄位 |
hashLists[] |
object (HashList )
請按照要求中提供的順序列出雜湊清單。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-06 (世界標準時間)。
[null,null,["上次更新時間:2025-03-06 (世界標準時間)。"],[[["Batch retrieve multiple hash lists efficiently, rather than using individual Get requests."],["Specify desired hash lists by name, versions (if previously fetched), desired hash prefix length, and optionally, size constraints."],["Receive a response containing the requested hash lists in the specified order."],["This method adheres to the standard batch Get method as defined by Google AIP and uses the GET HTTP method."],["Request body should be empty for this operation."]]],["This document details the `batchGet` method for retrieving multiple hash lists via a `GET` HTTP request to `safebrowsing.googleapis.com/v5alpha1/hashLists:batchGet`. Required parameters include `names[]` for specifying hash lists and `version[]` for indicating existing versions. `desiredHashLength` defines the desired hash prefix length, and `sizeConstraints` limits list sizes. The request body is empty, and the response contains an array `hashLists[]`, ordered as requested.\n"]]