Method: hashList.get
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Ruft den aktuellen Inhalt einer Hash-Liste ab. Eine Hash-Liste kann entweder eine Bedrohungsliste oder eine Liste ohne Bedrohung sein, z. B. der globale Cache.
Dies ist eine standardmäßige Get-Methode gemäß https://google.aip.dev/131 und die HTTP-Methode ist ebenfalls GET.
HTTP-Anfrage
GET https://safebrowsing.googleapis.com/v5alpha1/hashList/{name}
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
name |
string
Erforderlich. Der Name dieser Hash-Liste. Es kann sich um eine Bedrohungsliste oder den globalen Cache handeln.
|
Abfrageparameter
Parameter |
version |
string (bytes format)
Die Version der Hash-Liste, die der Client bereits hat. Wenn der Client die Hash-Liste zum ersten Mal abruft, MUSS dieses Feld leer sein. Andernfalls MUSS der Client die Version angeben, die er zuvor vom Server erhalten hat. Der Client darf diese Bytes NICHT manipulieren. Neuerungen in Version 5: In Version 4 der API hieß dieses Feld states . Es wurde umbenannt, um Verwechslungen zu vermeiden.version Ein base64-codierter String.
|
sizeConstraints |
object (SizeConstraints )
Die Größenbeschränkungen für die Liste. Wenn sie weggelassen wird, gelten keine Einschränkungen. Einschränkungen werden für alle Geräte mit begrenzter Verarbeitungsleistung, Bandbreite oder Speicher empfohlen.
|
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von HashList
.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-25 (UTC)."],[[["\u003cp\u003eGet the latest contents of a hash list, which can be a threat list or the Global Cache, using a standard GET method.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e path parameter specifies the hash list to retrieve.\u003c/p\u003e\n"],["\u003cp\u003eProvide the \u003ccode\u003eversion\u003c/code\u003e query parameter to indicate the client's current hash list version or leave it empty for the initial fetch.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, specify the desired hash prefix length using the \u003ccode\u003edesiredHashLength\u003c/code\u003e query parameter and set size constraints with the \u003ccode\u003esizeConstraints\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe response body will contain the requested \u003ccode\u003eHashList\u003c/code\u003e data.\u003c/p\u003e\n"]]],["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"],null,["# Method: hashList.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n\nGet the latest contents of a hash list. A hash list may either by a threat list or a non-threat list such as the Global Cache.\n\nThis is a standard Get method as defined by \u003chttps://google.aip.dev/131\u003e and the HTTP method is also GET.\n\n### HTTP request\n\n`GET https://safebrowsing.googleapis.com/v5alpha1/hashList/{name}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The name of this particular hash list. It may be a threat list, or it may be the Global Cache. |\n\n### Query parameters\n\n| Parameters ||\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `version` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` The version of the hash list that the client already has. If this is the first time the client is fetching the hash list, this field MUST be left empty. Otherwise, the client SHOULD supply the version previously received from the server. The client MUST NOT manipulate those bytes. **What's new in V5** : in V4 of the API, this was called `states`; it is now renamed to `version` for clarity. A base64-encoded string. |\n| `sizeConstraints` | `object (`[SizeConstraints](/safe-browsing/reference/rest/v5alpha1/SizeConstraints)`)` The size constraints on the list. If omitted, there are no constraints. Constraints are recommended on all devices with limited processing power, bandwidth, or storage. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [HashList](/safe-browsing/reference/rest/v5alpha1/hashList#HashList)."]]