blob: af50082778eb889468252247e60ec8923d46db0d [file] [log] [blame]
<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.encodedUpdates.html">encodedUpdates</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#get">get(encodedRequest, clientVersion=None, clientId=None, x__xgafv=None)</a></code></p>
<p class="firstline"></p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="get">get(encodedRequest, clientVersion=None, clientId=None, x__xgafv=None)</code>
<pre>
Args:
encodedRequest: string, A serialized FetchThreatListUpdatesRequest proto. (required)
clientVersion: string, The version of the client implementation.
clientId: string, A client ID that uniquely identifies the client implementation of the Safe
Browsing API.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{
&quot;listUpdateResponses&quot;: [ # The list updates requested by the clients.
{ # An update to an individual list.
&quot;checksum&quot;: { # The expected state of a client&#x27;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&#x27;t match the expected state, the client must
# disregard this update and retry later.
&quot;sha256&quot;: &quot;A String&quot;, # The SHA256 hash of the client state; that is, of the sorted list of all
# hashes present in the database.
},
&quot;threatType&quot;: &quot;A String&quot;, # The threat type for which data is returned.
&quot;platformType&quot;: &quot;A String&quot;, # The platform type for which data is returned.
&quot;newClientState&quot;: &quot;A String&quot;, # The new client state, in encrypted format. Opaque to clients.
&quot;responseType&quot;: &quot;A String&quot;, # The type of response. This may indicate that an action is required by the
# client when the response is received.
&quot;threatEntryType&quot;: &quot;A String&quot;, # The format of the threats.
&quot;removals&quot;: [ # A set of entries to remove from a local threat type&#x27;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&#x27;s local
# database.
&quot;riceHashes&quot;: { # 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.
&quot;firstValue&quot;: &quot;A String&quot;, # The offset of the first entry in the encoded data, or, if only a single
# integer was encoded, that single integer&#x27;s value. If the field is empty or
# missing, assume zero.
&quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
&quot;numEntries&quot;: 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`.
&quot;riceParameter&quot;: 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.
},
&quot;compressionType&quot;: &quot;A String&quot;, # The compression type for the entries in this set.
&quot;rawIndices&quot;: { # A set of raw indices to remove from a local list. # The raw removal indices for a local list.
&quot;indices&quot;: [ # The indices to remove from a lexicographically-sorted local list.
42,
],
},
&quot;riceIndices&quot;: { # 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.
&quot;firstValue&quot;: &quot;A String&quot;, # The offset of the first entry in the encoded data, or, if only a single
# integer was encoded, that single integer&#x27;s value. If the field is empty or
# missing, assume zero.
&quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
&quot;numEntries&quot;: 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`.
&quot;riceParameter&quot;: 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.
},
&quot;rawHashes&quot;: { # 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.
&quot;rawHashes&quot;: &quot;A String&quot;, # The hashes, in binary format, concatenated into one long string. Hashes are
# sorted in lexicographic order. For JSON API users, hashes are
# base64-encoded.
&quot;prefixSize&quot;: 42, # The number of bytes for each prefix encoded below. This field can be
# anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
},
},
],
&quot;additions&quot;: [ # A set of entries to add to a local threat type&#x27;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&#x27;s local
# database.
&quot;riceHashes&quot;: { # 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.
&quot;firstValue&quot;: &quot;A String&quot;, # The offset of the first entry in the encoded data, or, if only a single
# integer was encoded, that single integer&#x27;s value. If the field is empty or
# missing, assume zero.
&quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
&quot;numEntries&quot;: 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`.
&quot;riceParameter&quot;: 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.
},
&quot;compressionType&quot;: &quot;A String&quot;, # The compression type for the entries in this set.
&quot;rawIndices&quot;: { # A set of raw indices to remove from a local list. # The raw removal indices for a local list.
&quot;indices&quot;: [ # The indices to remove from a lexicographically-sorted local list.
42,
],
},
&quot;riceIndices&quot;: { # 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.
&quot;firstValue&quot;: &quot;A String&quot;, # The offset of the first entry in the encoded data, or, if only a single
# integer was encoded, that single integer&#x27;s value. If the field is empty or
# missing, assume zero.
&quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
&quot;numEntries&quot;: 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`.
&quot;riceParameter&quot;: 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.
},
&quot;rawHashes&quot;: { # 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.
&quot;rawHashes&quot;: &quot;A String&quot;, # The hashes, in binary format, concatenated into one long string. Hashes are
# sorted in lexicographic order. For JSON API users, hashes are
# base64-encoded.
&quot;prefixSize&quot;: 42, # The number of bytes for each prefix encoded below. This field can be
# anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
},
},
],
},
],
&quot;minimumWaitDuration&quot;: &quot;A String&quot;, # 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>