Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="safebrowsing_v4.html">Safe Browsing API</a> . <a href="safebrowsing_v4.encodedUpdates.html">encodedUpdates</a></h1> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 81 | <code><a href="#get">get(encodedRequest, clientId=None, clientVersion=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 82 | <p class="firstline"></p> |
| 83 | <h3>Method Details</h3> |
| 84 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 85 | <code class="details" id="close">close()</code> |
| 86 | <pre>Close httplib2 connections.</pre> |
| 87 | </div> |
| 88 | |
| 89 | <div class="method"> |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 90 | <code class="details" id="get">get(encodedRequest, clientId=None, clientVersion=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 91 | <pre> |
| 92 | |
| 93 | Args: |
| 94 | encodedRequest: string, A serialized FetchThreatListUpdatesRequest proto. (required) |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 95 | clientId: string, A client ID that uniquely identifies the client implementation of the Safe Browsing API. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 96 | clientVersion: string, The version of the client implementation. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 97 | x__xgafv: string, V1 error format. |
| 98 | Allowed values |
| 99 | 1 - v1 error format |
| 100 | 2 - v2 error format |
| 101 | |
| 102 | Returns: |
| 103 | An object of the form: |
| 104 | |
| 105 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 106 | "listUpdateResponses": [ # The list updates requested by the clients. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 107 | { # An update to an individual list. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 108 | "responseType": "A String", # The type of response. This may indicate that an action is required by the client when the response is received. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 109 | "checksum": { # The expected state of a client's local database. # The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided update. If the client state doesn't match the expected state, the client must disregard this update and retry later. |
| 110 | "sha256": "A String", # The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 111 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 112 | "threatEntryType": "A String", # The format of the threats. |
| 113 | "newClientState": "A String", # The new client state, in encrypted format. Opaque to clients. |
| 114 | "additions": [ # A set of entries to add to a local threat type's list. Repeated to allow for a combination of compressed and raw data to be sent in a single response. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 115 | { # A set of threats that should be added or removed from a client's local database. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 116 | "compressionType": "A String", # The compression type for the entries in this set. |
| 117 | "riceHashes": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices. # The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding. The hashes are converted to uint32, sorted in ascending order, then delta encoded and stored as encoded_data. |
| 118 | "encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder. |
| 119 | "riceParameter": 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if `num_entries` is zero. |
| 120 | "firstValue": "A String", # The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value. If the field is empty or missing, assume zero. |
| 121 | "numEntries": 42, # The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in `first_value`. |
| 122 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 123 | "rawIndices": { # A set of raw indices to remove from a local list. # The raw removal indices for a local list. |
| 124 | "indices": [ # The indices to remove from a lexicographically-sorted local list. |
| 125 | 42, |
| 126 | ], |
| 127 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 128 | "rawHashes": { # The uncompressed threat entries in hash format of a particular prefix length. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URL. Used for sending ThreatEntrySet to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression. # The raw SHA256-formatted entries. |
| 129 | "rawHashes": "A String", # The hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded. |
| 130 | "prefixSize": 42, # The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 131 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 132 | "riceIndices": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices. # The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices. The removal indices (uint32) are sorted in ascending order, then delta encoded and stored as encoded_data. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 133 | "encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder. |
| 134 | "riceParameter": 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if `num_entries` is zero. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 135 | "firstValue": "A String", # The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value. If the field is empty or missing, assume zero. |
| 136 | "numEntries": 42, # The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in `first_value`. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 137 | }, |
| 138 | }, |
| 139 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 140 | "removals": [ # A set of entries to remove from a local threat type's list. In practice, this field is empty or contains exactly one ThreatEntrySet. |
| 141 | { # A set of threats that should be added or removed from a client's local database. |
| 142 | "compressionType": "A String", # The compression type for the entries in this set. |
| 143 | "riceHashes": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices. # The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding. The hashes are converted to uint32, sorted in ascending order, then delta encoded and stored as encoded_data. |
| 144 | "encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder. |
| 145 | "riceParameter": 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if `num_entries` is zero. |
| 146 | "firstValue": "A String", # The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value. If the field is empty or missing, assume zero. |
| 147 | "numEntries": 42, # The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in `first_value`. |
| 148 | }, |
| 149 | "rawIndices": { # A set of raw indices to remove from a local list. # The raw removal indices for a local list. |
| 150 | "indices": [ # The indices to remove from a lexicographically-sorted local list. |
| 151 | 42, |
| 152 | ], |
| 153 | }, |
| 154 | "rawHashes": { # The uncompressed threat entries in hash format of a particular prefix length. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URL. Used for sending ThreatEntrySet to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression. # The raw SHA256-formatted entries. |
| 155 | "rawHashes": "A String", # The hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded. |
| 156 | "prefixSize": 42, # The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). |
| 157 | }, |
| 158 | "riceIndices": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices. # The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices. The removal indices (uint32) are sorted in ascending order, then delta encoded and stored as encoded_data. |
| 159 | "encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder. |
| 160 | "riceParameter": 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if `num_entries` is zero. |
| 161 | "firstValue": "A String", # The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value. If the field is empty or missing, assume zero. |
| 162 | "numEntries": 42, # The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in `first_value`. |
| 163 | }, |
| 164 | }, |
| 165 | ], |
| 166 | "threatType": "A String", # The threat type for which data is returned. |
| 167 | "platformType": "A String", # The platform type for which data is returned. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 168 | }, |
| 169 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 170 | "minimumWaitDuration": "A String", # The minimum duration the client must wait before issuing any update request. If this field is not set clients may update as soon as they want. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 171 | }</pre> |
| 172 | </div> |
| 173 | |
| 174 | </body></html> |