Method: hashLists.batchGet
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
한 번에 여러 해시 목록을 가져옵니다.
클라이언트가 여러 해시 목록을 가져와야 하는 경우가 매우 흔합니다. 일반 Get 메서드를 여러 번 사용하는 것보다 이 메서드를 사용하는 것이 좋습니다.
이는 https://google.aip.dev/231에 정의된 표준 일괄 GET 메서드이며 HTTP 메서드도 GET입니다.
HTTP 요청
GET https://safebrowsing.googleapis.com/v5/hashLists:batchGet
URL은 gRPC 트랜스코딩 구문을 사용합니다.
쿼리 매개변수
Parameters |
names[] |
string
필수 항목입니다. 특정 해시 목록의 이름입니다. 이 목록은 위협 목록일 수도 있고 글로벌 캐시일 수도 있습니다. 이름에 중복이 없어야 합니다. 중복이 있으면 클라이언트에 오류가 발생합니다.
|
version[] |
string (bytes format)
클라이언트에 이미 있는 해시 목록의 버전입니다. 클라이언트가 해시 목록을 가져오는 것이 처음인 경우 이 필드는 비워 두어야 합니다. 그렇지 않으면 클라이언트는 이전에 서버에서 수신한 버전을 제공해야 합니다. 클라이언트는 이러한 바이트를 조작하면 안 됩니다. 클라이언트는 버전을 해당 목록 이름과 동일한 순서로 전송하지 않아도 됩니다. 클라이언트는 요청에 이름보다 적은 수 또는 더 많은 버전을 전송할 수 있습니다. 그러나 클라이언트는 동일한 이름에 해당하는 여러 버전을 전송해서는 안 됩니다. 전송하면 클라이언트에 오류가 발생합니다. 이전 참고사항: API의 V4에서는 이 속성을 states 라고 했지만 이제 명확성을 위해 version 로 이름이 변경되었습니다. base64 인코딩 문자열입니다.
|
sizeConstraints |
object (SizeConstraints )
각 목록의 크기 제약 조건입니다. 생략하면 제약 조건이 없습니다. 여기서 표시되는 크기는 모든 목록에서 집계된 것이 아니라 목록별로 표시됩니다.
|
응답 본문
여러 해시 목록이 포함된 응답입니다.
성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.
JSON 표현 |
{
"hashLists": [
{
object (HashList )
}
]
} |
필드 |
hashLists[] |
object (HashList )
요청에 지정된 순서와 동일한 해시 목록입니다.
|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 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. |"]]