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 | |
| 75 | <h1><a href="safebrowsing_v4.html">Google Safe Browsing API</a> . <a href="safebrowsing_v4.encodedUpdates.html">encodedUpdates</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#get">get(encodedRequest, clientVersion=None, clientId=None, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline"></p> |
| 80 | <h3>Method Details</h3> |
| 81 | <div class="method"> |
| 82 | <code class="details" id="get">get(encodedRequest, clientVersion=None, clientId=None, x__xgafv=None)</code> |
| 83 | <pre> |
| 84 | |
| 85 | Args: |
| 86 | encodedRequest: string, A serialized FetchThreatListUpdatesRequest proto. (required) |
| 87 | clientVersion: string, The version of the client implementation. |
| 88 | clientId: string, A client ID that uniquely identifies the client implementation of the Safe |
| 89 | Browsing API. |
| 90 | x__xgafv: string, V1 error format. |
| 91 | Allowed values |
| 92 | 1 - v1 error format |
| 93 | 2 - v2 error format |
| 94 | |
| 95 | Returns: |
| 96 | An object of the form: |
| 97 | |
| 98 | { |
| 99 | "listUpdateResponses": [ # The list updates requested by the clients. |
| 100 | { # An update to an individual list. |
| 101 | "responseType": "A String", # The type of response. This may indicate that an action is required by the |
| 102 | # client when the response is received. |
| 103 | "threatType": "A String", # The threat type for which data is returned. |
| 104 | "removals": [ # A set of entries to remove from a local threat type's list. In practice, |
| 105 | # this field is empty or contains exactly one ThreatEntrySet. |
| 106 | { # A set of threats that should be added or removed from a client's local |
| 107 | # database. |
| 108 | "compressionType": "A String", # The compression type for the entries in this set. |
| 109 | "riceIndices": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or # The encoded local, lexicographically-sorted list indices, using a |
| 110 | # Golomb-Rice encoding. Used for sending compressed removal indices. The |
| 111 | # removal indices (uint32) are sorted in ascending order, then delta encoded |
| 112 | # and stored as encoded_data. |
| 113 | # compressed removal indices. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 114 | "encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 115 | "numEntries": 42, # The number of entries that are delta encoded in the encoded data. If only a |
| 116 | # single integer was encoded, this will be zero and the single value will be |
| 117 | # stored in `first_value`. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 118 | "riceParameter": 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field |
| 119 | # is missing (that is, zero) if `num_entries` is zero. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 120 | "firstValue": "A String", # The offset of the first entry in the encoded data, or, if only a single |
| 121 | # integer was encoded, that single integer's value. |
| 122 | }, |
| 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 | }, |
| 128 | "riceHashes": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or # The encoded 4-byte prefixes of SHA256-formatted entries, using a |
| 129 | # Golomb-Rice encoding. The hashes are converted to uint32, sorted in |
| 130 | # ascending order, then delta encoded and stored as encoded_data. |
| 131 | # compressed removal indices. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 132 | "encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 133 | "numEntries": 42, # The number of entries that are delta encoded in the encoded data. If only a |
| 134 | # single integer was encoded, this will be zero and the single value will be |
| 135 | # stored in `first_value`. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 136 | "riceParameter": 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field |
| 137 | # is missing (that is, zero) if `num_entries` is zero. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 138 | "firstValue": "A String", # The offset of the first entry in the encoded data, or, if only a single |
| 139 | # integer was encoded, that single integer's value. |
| 140 | }, |
| 141 | "rawHashes": { # The uncompressed threat entries in hash format of a particular prefix length. # The raw SHA256-formatted entries. |
| 142 | # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 |
| 143 | # bytes, but some hashes are lengthened if they collide with the hash of a |
| 144 | # popular URL. |
| 145 | # |
| 146 | # Used for sending ThreatEntrySet to clients that do not support compression, |
| 147 | # or when sending non-4-byte hashes to clients that do support compression. |
| 148 | "prefixSize": 42, # The number of bytes for each prefix encoded below. This field can be |
| 149 | # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). |
| 150 | "rawHashes": "A String", # The hashes, in binary format, concatenated into one long string. Hashes are |
| 151 | # sorted in lexicographic order. For JSON API users, hashes are |
| 152 | # base64-encoded. |
| 153 | }, |
| 154 | }, |
| 155 | ], |
| 156 | "newClientState": "A String", # The new client state, in encrypted format. Opaque to clients. |
| 157 | "checksum": { # The expected state of a client's local database. # The expected SHA256 hash of the client state; that is, of the sorted list |
| 158 | # of all hashes present in the database after applying the provided update. |
| 159 | # If the client state doesn't match the expected state, the client must |
| 160 | # disregard this update and retry later. |
| 161 | "sha256": "A String", # The SHA256 hash of the client state; that is, of the sorted list of all |
| 162 | # hashes present in the database. |
| 163 | }, |
| 164 | "threatEntryType": "A String", # The format of the threats. |
| 165 | "additions": [ # A set of entries to add to a local threat type's list. Repeated to allow |
| 166 | # for a combination of compressed and raw data to be sent in a single |
| 167 | # response. |
| 168 | { # A set of threats that should be added or removed from a client's local |
| 169 | # database. |
| 170 | "compressionType": "A String", # The compression type for the entries in this set. |
| 171 | "riceIndices": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or # The encoded local, lexicographically-sorted list indices, using a |
| 172 | # Golomb-Rice encoding. Used for sending compressed removal indices. The |
| 173 | # removal indices (uint32) are sorted in ascending order, then delta encoded |
| 174 | # and stored as encoded_data. |
| 175 | # compressed removal indices. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 176 | "encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 177 | "numEntries": 42, # The number of entries that are delta encoded in the encoded data. If only a |
| 178 | # single integer was encoded, this will be zero and the single value will be |
| 179 | # stored in `first_value`. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 180 | "riceParameter": 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field |
| 181 | # is missing (that is, zero) if `num_entries` is zero. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 182 | "firstValue": "A String", # The offset of the first entry in the encoded data, or, if only a single |
| 183 | # integer was encoded, that single integer's value. |
| 184 | }, |
| 185 | "rawIndices": { # A set of raw indices to remove from a local list. # The raw removal indices for a local list. |
| 186 | "indices": [ # The indices to remove from a lexicographically-sorted local list. |
| 187 | 42, |
| 188 | ], |
| 189 | }, |
| 190 | "riceHashes": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or # The encoded 4-byte prefixes of SHA256-formatted entries, using a |
| 191 | # Golomb-Rice encoding. The hashes are converted to uint32, sorted in |
| 192 | # ascending order, then delta encoded and stored as encoded_data. |
| 193 | # compressed removal indices. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 194 | "encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 195 | "numEntries": 42, # The number of entries that are delta encoded in the encoded data. If only a |
| 196 | # single integer was encoded, this will be zero and the single value will be |
| 197 | # stored in `first_value`. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 198 | "riceParameter": 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field |
| 199 | # is missing (that is, zero) if `num_entries` is zero. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 200 | "firstValue": "A String", # The offset of the first entry in the encoded data, or, if only a single |
| 201 | # integer was encoded, that single integer's value. |
| 202 | }, |
| 203 | "rawHashes": { # The uncompressed threat entries in hash format of a particular prefix length. # The raw SHA256-formatted entries. |
| 204 | # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 |
| 205 | # bytes, but some hashes are lengthened if they collide with the hash of a |
| 206 | # popular URL. |
| 207 | # |
| 208 | # Used for sending ThreatEntrySet to clients that do not support compression, |
| 209 | # or when sending non-4-byte hashes to clients that do support compression. |
| 210 | "prefixSize": 42, # The number of bytes for each prefix encoded below. This field can be |
| 211 | # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). |
| 212 | "rawHashes": "A String", # The hashes, in binary format, concatenated into one long string. Hashes are |
| 213 | # sorted in lexicographic order. For JSON API users, hashes are |
| 214 | # base64-encoded. |
| 215 | }, |
| 216 | }, |
| 217 | ], |
| 218 | "platformType": "A String", # The platform type for which data is returned. |
| 219 | }, |
| 220 | ], |
| 221 | "minimumWaitDuration": "A String", # The minimum duration the client must wait before issuing any update |
| 222 | # request. If this field is not set clients may update as soon as they want. |
| 223 | }</pre> |
| 224 | </div> |
| 225 | |
| 226 | </body></html> |