Method: hashList.get
HTTP 请求
GET https://safebrowsing.googleapis.com/v5alpha1/hashList/{name}
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。此特定哈希列表的名称。它可以是威胁列表,也可以是全局缓存。
|
查询参数
参数 |
version |
string (bytes format)
客户端已有的哈希列表的版本。如果这是客户端首次提取哈希列表,则此字段必须留空。否则,客户端应提供之前从服务器收到的版本。客户端不得操纵这些字节。 v5 中的新变化:在 API 的 v4 中,此参数名为 states ;为清楚起见,现已重命名为 version 。 使用 base64 编码的字符串。
|
desiredHashLength (deprecated) |
enum (HashLength )
所需的返回哈希的哈希前缀长度(以字节为单位)。然后,服务器将返回此指定长度的所有哈希前缀。 不同的哈希列表对 desiredHashLength 字段的可接受值有不同的要求。您可以在 HashListMetadata 的 supportedHashLengths 字段中找到此代码。如果 desiredHashLength 未在 supportedHashLengths 中指定值,则系统将返回错误。
|
sizeConstraints |
object (SizeConstraints )
列表的大小限制。如果省略,则表示无限制。建议在处理能力、带宽或存储空间有限的所有设备上使用限制。
|
响应正文
如果成功,则响应正文包含一个 HashList
实例。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-06。
[null,null,["最后更新时间 (UTC):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"]]