Method: hashList.get
HTTP 要求
GET https://safebrowsing.googleapis.com/v5alpha1/hashList/{name}
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
name |
string
必要欄位。這個特定雜湊清單的名稱。可能是威脅清單,也可能是全球快取。
|
查詢參數
參數 |
version |
string (bytes format)
用戶端已擁有的雜湊清單版本。如果這是用戶端第一次擷取雜湊清單,則此欄位必須留空。否則,用戶端應提供先前從伺服器收到的版本。用戶端絕對不得操縱這些位元組。 第 5 版的新功能:在 API 的 4 版中,這個屬性稱為 states ;現在已重新命名為 version ,以利區分。 Base64 編碼字串。
|
desiredHashLength (deprecated) |
enum (HashLength )
所需雜湊前置字串長度 (以位元組為單位)。然後,伺服器會傳回所有指定長度的雜湊字首。 不同的雜湊清單對 desiredHashLength 欄位可接受的值有不同的規定。您可以在 HashListMetadata 的 supportedHashLengths 欄位中找到這項資訊。如果 desiredHashLength 未在 supportedHashLengths 中指定值,系統會傳回錯誤。
|
sizeConstraints |
object (SizeConstraints )
清單的大小限制。如果省略,則沒有任何限制。建議在所有處理能力、頻寬或儲存空間受限的裝置上使用限制。
|
回應主體
如果成功,回應主體會包含 HashList
的執行例項。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-06 (世界標準時間)。
[null,null,["上次更新時間:2025-03-06 (世界標準時間)。"],[[["Get the latest contents of a hash list, which can be a threat list or the Global Cache, using a standard GET method."],["The `name` path parameter specifies the hash list to retrieve."],["Provide the `version` query parameter to indicate the client's current hash list version or leave it empty for the initial fetch."],["Optionally, specify the desired hash prefix length using the `desiredHashLength` query parameter and set size constraints with the `sizeConstraints` parameter."],["The response body will contain the requested `HashList` data."]]],["This document details retrieving a hash list (threat or non-threat) using a `GET` request. The URL is structured as `https://safebrowsing.googleapis.com/v5alpha1/hashList/{name}`, with `name` being a required path parameter. Optional query parameters include `version` (client's current list version), `desiredHashLength` (hash prefix length), and `sizeConstraints` (list size limits). The request body is empty, and a successful response returns a `HashList` instance.\n"]]