Method: hashLists.batchGet
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Ricevi più elenchi di hash contemporaneamente.
È molto comune che un cliente debba ottenere più elenchi di hash. L'utilizzo di questo metodo è preferibile all'utilizzo ripetuto del metodo Get standard.
Si tratta di un metodo Get batch standard come definito da https://google.aip.dev/231 e il metodo HTTP è anche GET.
Richiesta HTTP
GET https://safebrowsing.googleapis.com/v5/hashLists:batchGet
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri di query
Parametri |
names[] |
string
Obbligatorio. I nomi dei singoli elenchi di hash. L'elenco POTREBBE essere un elenco di minacce o la cache globale. I nomi NON DEVONO contenere duplicati. In caso contrario, il cliente riceverà un errore.
|
version[] |
string (bytes format)
Le versioni dell'elenco di hash già in possesso del client. Se è la prima volta che il client recupera gli elenchi di hash, il campo deve essere lasciato vuoto. In caso contrario, il client deve fornire le versioni ricevute in precedenza dal server. Il client NON DEVE manipolare questi byte. Il cliente non deve inviare le versioni nello stesso ordine dei nomi degli elenchi corrispondenti. Il cliente può inviare in una richiesta meno o più versioni rispetto al numero di nomi. Tuttavia, il client NON DEVE inviare più versioni corrispondenti allo stesso nome, altrimenti riceverà un errore. Nota storica: nella versione 4 dell'API, questo valore si chiamava states ; ora è stato rinominato version per maggiore chiarezza. Una stringa con codifica Base64.
|
sizeConstraints |
object (SizeConstraints )
I limiti di dimensione per ogni elenco. Se omesso, non ci sono vincoli. Tieni presente che le dimensioni riportate si riferiscono a ciascun elenco e non sono aggregate in tutti gli elenchi.
|
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
La risposta contenente più elenchi di hash.
In caso di esito positivo, il corpo della risposta contiene dati con la seguente struttura:
Rappresentazione JSON |
{
"hashLists": [
{
object (HashList )
}
]
} |
Campi |
hashLists[] |
object (HashList )
Gli hash sono elencati nello stesso ordine indicato nella richiesta.
|
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 2025-07-25 UTC."],[],[],null,["# Method: hashLists.batchGet\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BatchGetHashListsResponse.SCHEMA_REPRESENTATION)\n\nGet multiple hash lists at once.\n\nIt is very common for a client to need to get multiple hash lists. Using this method is preferred over using the regular Get method multiple times.\n\nThis is a standard batch Get method as defined by \u003chttps://google.aip.dev/231\u003e and the HTTP method is also GET.\n\n### HTTP request\n\n`GET https://safebrowsing.googleapis.com/v5/hashLists:batchGet`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `names[]` | `string` Required. The names of the particular hash lists. The list MAY be a threat list, or it may be the Global Cache. The names MUST NOT contain duplicates; if they did, the client will get an error. |\n| `version[]` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` The versions of the hash list that the client already has. If this is the first time the client is fetching the hash lists, the field should be left empty. Otherwise, the client should supply the versions previously received from the server. The client MUST NOT manipulate those bytes. The client need not send the versions in the same order as the corresponding list names. The client may send fewer or more versions in a request than there are names. However the client MUST NOT send multiple versions that correspond to the same name; if it did, the client will get an error. Historical note: 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/v5/SizeConstraints)`)` The size constraints on each list. If omitted, there are no constraints. Note that the sizes here are per-list, not aggregated across all lists. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe response containing multiple hash lists.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------|\n| ``` { \"hashLists\": [ { object (/safe-browsing/reference/rest/v5/hashList#HashList) } ] } ``` |\n\n| Fields ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------|\n| `hashLists[]` | `object (`[HashList](/safe-browsing/reference/rest/v5/hashList#HashList)`)` The hash lists in the same order given in the request. |"]]