Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Method: hashLists.batchGet
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://safebrowsing.googleapis.com/v5alpha1/hashLists:batchGet
网址采用 gRPC 转码语法。
查询参数
| 参数 |
names[] |
string
必需。特定哈希列表的名称。该列表可以是威胁列表,也可以是全局缓存。名称不得包含重复项;如果包含重复项,客户端将收到错误。
|
version[] |
string (bytes format)
客户端已有的哈希列表的版本。如果客户端是首次提取哈希列表,则应将此字段留空。否则,客户端应提供之前从服务器收到的版本。客户端不得操纵这些字节。 客户端无需按与相应列表名称相同的顺序发送版本。客户端在请求中发送的版本数量可能少于或多于名称数量。不过,客户端不得发送与同一名称对应的多个版本;如果发送,客户端会收到错误。 历史记录:在 API 的 V4 版本中,此属性名为 states;现在为了清晰起见,已重命名为 version。 使用 base64 编码的字符串。
|
sizeConstraints |
object (SizeConstraints)
每个列表的大小限制。如果省略,则表示没有限制。请注意,此处的大小是指每个列表的大小,而不是所有列表的总大小。
|
响应正文
包含多个哈希列表的响应。
如果成功,响应正文将包含结构如下的数据:
| JSON 表示法 |
{
"hashLists": [
{
object (HashList)
}
]
} |
| 字段 |
hashLists[] |
object (HashList)
哈希列表,按请求中给定的顺序排列。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-02-20。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2026-02-20。"],[],["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"]]