blob: af50082778eb889468252247e60ec8923d46db0d [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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 Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="safebrowsing_v4.html">Safe Browsing API</a> . <a href="safebrowsing_v4.encodedUpdates.html">encodedUpdates</a></h1>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070078 <code><a href="#get">get(encodedRequest, clientVersion=None, clientId=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040079<p class="firstline"></p>
80<h3>Method Details</h3>
81<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070082 <code class="details" id="get">get(encodedRequest, clientVersion=None, clientId=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040083 <pre>
84
85Args:
86 encodedRequest: string, A serialized FetchThreatListUpdatesRequest proto. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -070087 clientVersion: string, The version of the client implementation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040088 clientId: string, A client ID that uniquely identifies the client implementation of the Safe
89Browsing API.
90 x__xgafv: string, V1 error format.
91 Allowed values
92 1 - v1 error format
93 2 - v2 error format
94
95Returns:
96 An object of the form:
97
98 {
Bu Sun Kim65020912020-05-20 12:08:20 -070099 &quot;listUpdateResponses&quot;: [ # The list updates requested by the clients.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400100 { # An update to an individual list.
Bu Sun Kim65020912020-05-20 12:08:20 -0700101 &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
102 # of all hashes present in the database after applying the provided update.
103 # If the client state doesn&#x27;t match the expected state, the client must
104 # disregard this update and retry later.
105 &quot;sha256&quot;: &quot;A String&quot;, # The SHA256 hash of the client state; that is, of the sorted list of all
106 # hashes present in the database.
107 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700108 &quot;threatType&quot;: &quot;A String&quot;, # The threat type for which data is returned.
109 &quot;platformType&quot;: &quot;A String&quot;, # The platform type for which data is returned.
110 &quot;newClientState&quot;: &quot;A String&quot;, # The new client state, in encrypted format. Opaque to clients.
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 &quot;responseType&quot;: &quot;A String&quot;, # The type of response. This may indicate that an action is required by the
112 # client when the response is received.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700113 &quot;threatEntryType&quot;: &quot;A String&quot;, # The format of the threats.
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 &quot;removals&quot;: [ # A set of entries to remove from a local threat type&#x27;s list. In practice,
115 # this field is empty or contains exactly one ThreatEntrySet.
116 { # A set of threats that should be added or removed from a client&#x27;s local
117 # database.
Bu Sun Kim65020912020-05-20 12:08:20 -0700118 &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
119 # Golomb-Rice encoding. The hashes are converted to uint32, sorted in
120 # ascending order, then delta encoded and stored as encoded_data.
121 # compressed removal indices.
122 &quot;firstValue&quot;: &quot;A String&quot;, # The offset of the first entry in the encoded data, or, if only a single
123 # integer was encoded, that single integer&#x27;s value. If the field is empty or
124 # missing, assume zero.
125 &quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
126 &quot;numEntries&quot;: 42, # The number of entries that are delta encoded in the encoded data. If only a
127 # single integer was encoded, this will be zero and the single value will be
128 # stored in `first_value`.
129 &quot;riceParameter&quot;: 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field
130 # is missing (that is, zero) if `num_entries` is zero.
131 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700132 &quot;compressionType&quot;: &quot;A String&quot;, # The compression type for the entries in this set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700133 &quot;rawIndices&quot;: { # A set of raw indices to remove from a local list. # The raw removal indices for a local list.
134 &quot;indices&quot;: [ # The indices to remove from a lexicographically-sorted local list.
135 42,
136 ],
137 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700138 &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
139 # Golomb-Rice encoding. Used for sending compressed removal indices. The
140 # removal indices (uint32) are sorted in ascending order, then delta encoded
141 # and stored as encoded_data.
142 # compressed removal indices.
143 &quot;firstValue&quot;: &quot;A String&quot;, # The offset of the first entry in the encoded data, or, if only a single
144 # integer was encoded, that single integer&#x27;s value. If the field is empty or
145 # missing, assume zero.
146 &quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
147 &quot;numEntries&quot;: 42, # The number of entries that are delta encoded in the encoded data. If only a
148 # single integer was encoded, this will be zero and the single value will be
149 # stored in `first_value`.
150 &quot;riceParameter&quot;: 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field
151 # is missing (that is, zero) if `num_entries` is zero.
152 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700153 &quot;rawHashes&quot;: { # The uncompressed threat entries in hash format of a particular prefix length. # The raw SHA256-formatted entries.
154 # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4
155 # bytes, but some hashes are lengthened if they collide with the hash of a
156 # popular URL.
157 #
158 # Used for sending ThreatEntrySet to clients that do not support compression,
159 # or when sending non-4-byte hashes to clients that do support compression.
160 &quot;rawHashes&quot;: &quot;A String&quot;, # The hashes, in binary format, concatenated into one long string. Hashes are
161 # sorted in lexicographic order. For JSON API users, hashes are
162 # base64-encoded.
163 &quot;prefixSize&quot;: 42, # The number of bytes for each prefix encoded below. This field can be
164 # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
165 },
166 },
167 ],
168 &quot;additions&quot;: [ # A set of entries to add to a local threat type&#x27;s list. Repeated to allow
169 # for a combination of compressed and raw data to be sent in a single
170 # response.
171 { # A set of threats that should be added or removed from a client&#x27;s local
172 # database.
173 &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
174 # Golomb-Rice encoding. The hashes are converted to uint32, sorted in
175 # ascending order, then delta encoded and stored as encoded_data.
176 # compressed removal indices.
177 &quot;firstValue&quot;: &quot;A String&quot;, # The offset of the first entry in the encoded data, or, if only a single
178 # integer was encoded, that single integer&#x27;s value. If the field is empty or
179 # missing, assume zero.
180 &quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
181 &quot;numEntries&quot;: 42, # The number of entries that are delta encoded in the encoded data. If only a
182 # single integer was encoded, this will be zero and the single value will be
183 # stored in `first_value`.
184 &quot;riceParameter&quot;: 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field
185 # is missing (that is, zero) if `num_entries` is zero.
186 },
187 &quot;compressionType&quot;: &quot;A String&quot;, # The compression type for the entries in this set.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700188 &quot;rawIndices&quot;: { # A set of raw indices to remove from a local list. # The raw removal indices for a local list.
189 &quot;indices&quot;: [ # The indices to remove from a lexicographically-sorted local list.
190 42,
191 ],
192 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700193 &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
194 # Golomb-Rice encoding. Used for sending compressed removal indices. The
195 # removal indices (uint32) are sorted in ascending order, then delta encoded
196 # and stored as encoded_data.
197 # compressed removal indices.
198 &quot;firstValue&quot;: &quot;A String&quot;, # The offset of the first entry in the encoded data, or, if only a single
199 # integer was encoded, that single integer&#x27;s value. If the field is empty or
200 # missing, assume zero.
201 &quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
202 &quot;numEntries&quot;: 42, # The number of entries that are delta encoded in the encoded data. If only a
203 # single integer was encoded, this will be zero and the single value will be
204 # stored in `first_value`.
205 &quot;riceParameter&quot;: 42, # The Golomb-Rice parameter, which is a number between 2 and 28. This field
206 # is missing (that is, zero) if `num_entries` is zero.
207 },
208 &quot;rawHashes&quot;: { # The uncompressed threat entries in hash format of a particular prefix length. # The raw SHA256-formatted entries.
209 # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4
210 # bytes, but some hashes are lengthened if they collide with the hash of a
211 # popular URL.
212 #
213 # Used for sending ThreatEntrySet to clients that do not support compression,
214 # or when sending non-4-byte hashes to clients that do support compression.
215 &quot;rawHashes&quot;: &quot;A String&quot;, # The hashes, in binary format, concatenated into one long string. Hashes are
216 # sorted in lexicographic order. For JSON API users, hashes are
217 # base64-encoded.
218 &quot;prefixSize&quot;: 42, # The number of bytes for each prefix encoded below. This field can be
219 # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
220 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700221 },
222 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400223 },
224 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 &quot;minimumWaitDuration&quot;: &quot;A String&quot;, # The minimum duration the client must wait before issuing any update
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400226 # request. If this field is not set clients may update as soon as they want.
227 }</pre>
228</div>
229
230</body></html>