1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
|
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="safebrowsing_v4.html">Safe Browsing API</a> . <a href="safebrowsing_v4.threatListUpdates.html">threatListUpdates</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#fetch">fetch(body, x__xgafv=None)</a></code></p>
<p class="firstline">Fetches the most recent threat list updates. A client can request updates</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="fetch">fetch(body, x__xgafv=None)</code>
<pre>Fetches the most recent threat list updates. A client can request updates
for multiple lists at once.
Args:
body: object, The request body. (required)
The object takes the form of:
{ # Describes a Safe Browsing API update request. Clients can request updates for
# multiple lists in a single request.
# NOTE: Field index 2 is unused.
# NEXT: 5
"client": { # The client metadata associated with Safe Browsing API requests. # The client metadata.
"clientVersion": "A String", # The version of the client implementation.
"clientId": "A String", # A client ID that (hopefully) uniquely identifies the client implementation
# of the Safe Browsing API.
},
"listUpdateRequests": [ # The requested threat list updates.
{ # A single list update request.
"threatType": "A String", # The type of threat posed by entries present in the list.
"state": "A String", # The current state of the client for the requested list (the encrypted
# client state that was received from the last successful list update).
"threatEntryType": "A String", # The types of entries present in the list.
"platformType": "A String", # The type of platform at risk by entries present in the list.
"constraints": { # The constraints for this update. # The constraints associated with this request.
"language": "A String", # Requests the lists for a specific language. Expects ISO 639 alpha-2
# format.
"maxDatabaseEntries": 42, # Sets the maximum number of entries that the client is willing to have
# in the local database. This should be a power of 2 between 2**10 and
# 2**20. If zero, no database size limit is set.
"region": "A String", # Requests the list for a specific geographic location. If not set the
# server may pick that value based on the user's IP address. Expects ISO
# 3166-1 alpha-2 format.
"maxUpdateEntries": 42, # The maximum size in number of entries. The update will not contain more
# entries than this value. This should be a power of 2 between 2**10 and
# 2**20. If zero, no update size limit is set.
"supportedCompressions": [ # The compression types supported by the client.
"A String",
],
"deviceLocation": "A String", # A client's physical location, expressed as a ISO 31166-1 alpha-2
# region code.
},
},
],
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{
"listUpdateResponses": [ # The list updates requested by the clients.
{ # An update to an individual list.
"responseType": "A String", # The type of response. This may indicate that an action is required by the
# client when the response is received.
"threatType": "A String", # The threat type for which data is returned.
"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.
{ # A set of threats that should be added or removed from a client's local
# database.
"compressionType": "A String", # The compression type for the entries in this set.
"rawIndices": { # A set of raw indices to remove from a local list. # The raw removal indices for a local list.
"indices": [ # The indices to remove from a lexicographically-sorted local list.
42,
],
},
"rawHashes": { # The uncompressed threat entries in hash format of a particular prefix length. # The raw SHA256-formatted entries.
# 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.
"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).
"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.
},
"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
# Golomb-Rice encoding. The hashes are converted to uint32, sorted in
# ascending order, then delta encoded and stored as encoded_data.
# compressed removal indices.
"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.
"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`.
"encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder.
"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.
},
"riceIndices": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or # 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.
# compressed removal indices.
"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.
"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`.
"encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder.
"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.
},
},
],
"newClientState": "A String", # The new client state, in encrypted format. Opaque to clients.
"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.
"sha256": "A String", # The SHA256 hash of the client state; that is, of the sorted list of all
# hashes present in the database.
},
"threatEntryType": "A String", # The format of the threats.
"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.
{ # A set of threats that should be added or removed from a client's local
# database.
"compressionType": "A String", # The compression type for the entries in this set.
"rawIndices": { # A set of raw indices to remove from a local list. # The raw removal indices for a local list.
"indices": [ # The indices to remove from a lexicographically-sorted local list.
42,
],
},
"rawHashes": { # The uncompressed threat entries in hash format of a particular prefix length. # The raw SHA256-formatted entries.
# 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.
"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).
"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.
},
"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
# Golomb-Rice encoding. The hashes are converted to uint32, sorted in
# ascending order, then delta encoded and stored as encoded_data.
# compressed removal indices.
"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.
"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`.
"encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder.
"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.
},
"riceIndices": { # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or # 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.
# compressed removal indices.
"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.
"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`.
"encodedData": "A String", # The encoded deltas that are encoded using the Golomb-Rice coder.
"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.
},
},
],
"platformType": "A String", # The platform type for which data is returned.
},
],
"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.
}</pre>
</div>
</body></html>
|