Method: hashList.get
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
รับเนื้อหาล่าสุดของรายการแฮช รายการแฮชอาจเป็นรายการภัยคุกคามหรือรายการที่ไม่ใช่ภัยคุกคาม เช่น แคชส่วนกลาง
นี่คือเมธอด Get มาตรฐานตามที่ระบุไว้ใน https://google.aip.dev/131 และเมธอด HTTP ก็เป็น GET ด้วย
คำขอ HTTP
GET https://safebrowsing.googleapis.com/v5alpha1/hashList/{name}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
name |
string
ต้องระบุ ชื่อของรายการแฮชนี้ ซึ่งอาจเป็นรายการภัยคุกคามหรือแคชส่วนกลางก็ได้
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
version |
string (bytes format)
เวอร์ชันของรายการแฮชที่ไคลเอ็นต์มีอยู่แล้ว หากเป็นครั้งที่ 1 ที่ไคลเอ็นต์ดึงข้อมูลรายการแฮช ช่องนี้ต้องว่างเปล่า ไม่เช่นนั้นไคลเอ็นต์ควรระบุเวอร์ชันที่ได้รับจากเซิร์ฟเวอร์ก่อนหน้านี้ ไคลเอ็นต์ต้องไม่ดัดแปลงไบต์เหล่านั้น มีอะไรใหม่ในเวอร์ชัน 5: ใน API เวอร์ชัน 4 ฟีเจอร์นี้เรียกว่า states แต่ตอนนี้เปลี่ยนชื่อเป็น version เพื่อให้ชัดเจน สตริงที่เข้ารหัส Base64
|
sizeConstraints |
object (SizeConstraints )
ข้อจำกัดด้านขนาดในรายการ หากไม่ระบุ ระบบจะไม่มีข้อจำกัด เราขอแนะนำให้ใช้ข้อจำกัดกับอุปกรณ์ทั้งหมดที่มีกำลังการประมวลผล แบนด์วิดท์ หรือพื้นที่เก็บข้อมูลจำกัด
|
เนื้อความของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ HashList
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 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)."]]