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 |
enum (HashLength )
傳回雜湊的所需雜湊前置字元長度 (以位元組為單位)。伺服器就會傳回符合指定長度的所有雜湊前置字串。 各種雜湊清單對 desiredHashLength 欄位可接受的值設有不同的規定。您可以在 HashListMetadata 的 supportedHashLengths 欄位找到這項資訊。如果 desiredHashLength 沒有在 supportedHashLengths 內指定值,系統會傳回錯誤。
|
sizeConstraints |
object (SizeConstraints )
清單的大小限制。如果省略,就不會有限制。我們建議在所有具備處理能力、頻寬或儲存空間有限的裝置上皆使用限制條件。
|
回應主體
如果成功,回應主體會包含 HashList
的執行例項。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-04-01 (世界標準時間)。
[null,null,["上次更新時間:2024-04-01 (世界標準時間)。"],[[["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"]]