Debian Codegraph @

docs/dyn/webrisk_v1.threatLists.html

raw
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="webrisk_v1.html">Web Risk API</a> . <a href="webrisk_v1.threatLists.html">threatLists</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#computeDiff">computeDiff(constraints_maxDatabaseEntries=None, constraints_maxDiffEntries=None, constraints_supportedCompressions=None, threatType=None, versionToken=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Gets the most recent threat list diffs. These diffs should be applied to a local database of hashes to keep it up-to-date. If the local database is empty or excessively out-of-date, a complete snapshot of the database will be returned. This Method only updates a single ThreatList at a time. To update multiple ThreatList databases, this method needs to be called once for each list.</p>
83 <h3>Method Details</h3>
84 <div class="method">
85 <code class="details" id="close">close()</code>
86 <pre>Close httplib2 connections.</pre>
87 </div>
88
89 <div class="method">
90 <code class="details" id="computeDiff">computeDiff(constraints_maxDatabaseEntries=None, constraints_maxDiffEntries=None, constraints_supportedCompressions=None, threatType=None, versionToken=None, x__xgafv=None)</code>
91 <pre>Gets the most recent threat list diffs. These diffs should be applied to a local database of hashes to keep it up-to-date. If the local database is empty or excessively out-of-date, a complete snapshot of the database will be returned. This Method only updates a single ThreatList at a time. To update multiple ThreatList databases, this method needs to be called once for each list.
92
93 Args:
94 constraints_maxDatabaseEntries: integer, 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.
95 constraints_maxDiffEntries: integer, The maximum size in number of entries. The diff will not contain more entries than this value. This should be a power of 2 between 2**10 and 2**20. If zero, no diff size limit is set.
96 constraints_supportedCompressions: string, The compression types supported by the client. (repeated)
97 Allowed values
98 COMPRESSION_TYPE_UNSPECIFIED - Unknown.
99 RAW - Raw, uncompressed data.
100 RICE - Rice-Golomb encoded data.
101 threatType: string, Required. The threat list to update. Only a single ThreatType should be specified per request. If you want to handle multiple ThreatTypes, you must make one request per ThreatType.
102 Allowed values
103 THREAT_TYPE_UNSPECIFIED - No entries should match this threat type. This threat type is unused.
104 MALWARE - Malware targeting any platform.
105 SOCIAL_ENGINEERING - Social engineering targeting any platform.
106 UNWANTED_SOFTWARE - Unwanted software targeting any platform.
107 SOCIAL_ENGINEERING_EXTENDED_COVERAGE - A list of extended coverage social engineering URIs targeting any platform.
108 versionToken: string, The current version token of the client for the requested list (the client version that was received from the last successful diff). If the client does not have a version token (this is the first time calling ComputeThreatListDiff), this may be left empty and a full database snapshot will be returned.
109 x__xgafv: string, V1 error format.
110 Allowed values
111 1 - v1 error format
112 2 - v2 error format
113
114 Returns:
115 An object of the form:
116
117 {
118 &quot;additions&quot;: { # Contains the set of entries to add to a local database. May contain a combination of compressed and raw data in a single response. # A set of entries to add to a local threat type&#x27;s list.
119 &quot;rawHashes&quot;: [ # The raw SHA256-formatted entries. Repeated to allow returning sets of hashes with different prefix sizes.
120 { # The uncompressed threat entries in hash format. 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 URI. Used for sending ThreatEntryAdditons to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.
121 &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). In practice this is almost always 4, except in exceptional circumstances.
122 &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.
123 },
124 ],
125 &quot;riceHashes&quot;: { # 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.
126 &quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
127 &quot;entryCount&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`.
128 &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.
129 &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.
130 },
131 },
132 &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 diff. If the client state doesn&#x27;t match the expected state, the client must discard this diff and retry later.
133 &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.
134 },
135 &quot;newVersionToken&quot;: &quot;A String&quot;, # The new opaque client version token. This should be retained by the client and passed into the next call of ComputeThreatListDiff as &#x27;version_token&#x27;. A separate version token should be stored and used for each threatList.
136 &quot;recommendedNextDiff&quot;: &quot;A String&quot;, # The soonest the client should wait before issuing any diff request. Querying sooner is unlikely to produce a meaningful diff. Waiting longer is acceptable considering the use case. If this field is not set clients may update as soon as they want.
137 &quot;removals&quot;: { # Contains the set of entries to remove from a local database. # A set of entries to remove from a local threat type&#x27;s list. This field may be empty.
138 &quot;rawIndices&quot;: { # A set of raw indices to remove from a local list. # The raw removal indices for a local list.
139 &quot;indices&quot;: [ # The indices to remove from a lexicographically-sorted local list.
140 42,
141 ],
142 },
143 &quot;riceIndices&quot;: { # 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.
144 &quot;encodedData&quot;: &quot;A String&quot;, # The encoded deltas that are encoded using the Golomb-Rice coder.
145 &quot;entryCount&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`.
146 &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.
147 &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.
148 },
149 },
150 &quot;responseType&quot;: &quot;A String&quot;, # The type of response. This may indicate that an action must be taken by the client when the response is received.
151 }</pre>
152 </div>
153
154 </body></html>