blob: 76cbb5689260f6c36e3b3d05b8dde0cb6d2ebb75 [file] [log] [blame]
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001<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
75<h1><a href="dlp_v2beta1.html">DLP API</a> . <a href="dlp_v2beta1.content.html">content</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#inspect">inspect(body, x__xgafv=None)</a></code></p>
79<p class="firstline">Find potentially sensitive info in a list of strings.</p>
80<p class="toc_element">
81 <code><a href="#redact">redact(body, x__xgafv=None)</a></code></p>
82<p class="firstline">Redact potentially sensitive info from a list of strings.</p>
83<h3>Method Details</h3>
84<div class="method">
85 <code class="details" id="inspect">inspect(body, x__xgafv=None)</code>
86 <pre>Find potentially sensitive info in a list of strings.
87This method has limits on input size, processing time, and output size.
88
89Args:
90 body: object, The request body. (required)
91 The object takes the form of:
92
93{ # Request to search for potentially sensitive info in a list of items.
94 "items": [ # The list of items to inspect. Items in a single request are
95 # considered "related" unless inspect_config.independent_inputs is true.
96 # Up to 100 are allowed per request.
97 { # Container structure for the content to inspect.
98 "type": "A String", # Type of the content, as defined in Content-Type HTTP header.
99 # Supported types are: all "text" types, octet streams, PNG images,
100 # JPEG images.
101 "data": "A String", # Content data to inspect or redact.
102 "value": "A String", # String data to inspect or redact.
103 },
104 ],
105 "inspectConfig": { # Configuration description of the scanning process. # Configuration for the inspector.
106 # When used with redactContent only info_types and min_likelihood are currently
107 # used.
108 "minLikelihood": "A String", # Only return findings equal or above this threshold.
109 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding will
110 # be included in the response; see Finding.quote.
111 "excludeTypes": True or False, # When true, exclude type information of the findings.
112 "infoTypes": [ # Restrict what info_types to look for. The values must correspond to
113 # InfoType values returned by ListInfoTypes or found in documentation.
114 # Empty info_types runs all enabled detectors.
115 { # Type of information detected by the API.
116 "name": "A String", # Name of the information type, provided by the API call ListInfoTypes.
117 },
118 ],
119 "maxFindings": 42, # Limit the number of findings per content item.
120 },
121 }
122
123 x__xgafv: string, V1 error format.
124 Allowed values
125 1 - v1 error format
126 2 - v2 error format
127
128Returns:
129 An object of the form:
130
131 { # Results of inspecting a list of items.
132 "results": [ # Each content_item from the request will have a result in this list, in the
133 # same order as the request.
134 { # All the findings for a single scanned item.
135 "findingsTruncated": True or False, # If true, then this item might have more findings than were returned,
136 # and the findings returned are an arbitrary subset of all findings.
137 # The findings list might be truncated because the input items were too
138 # large, or because the server reached the maximum amount of resources
139 # allowed for a single API call. For best results, divide the input into
140 # smaller batches.
141 "findings": [ # List of findings for an item.
142 { # Container structure describing a single finding within a string or image.
143 "quote": "A String", # The specific string that may be potentially sensitive info.
144 "likelihood": "A String", # Estimate of how likely it is that the info_type is correct.
145 "infoType": { # Type of information detected by the API. # The specific type of info the string might be.
146 "name": "A String", # Name of the information type, provided by the API call ListInfoTypes.
147 },
148 "createTime": "A String", # Timestamp when finding was detected.
149 "location": { # Specifies the location of a finding within its source item. # Location of the info found.
150 "fieldId": { # General identifier of a data field in a storage service. # Field id of the field containing the finding.
151 "columnName": "A String", # Column name describing the field.
152 },
153 "imageBoxes": [ # Location within an image's pixels.
154 { # Bounding box encompassing detected text within an image.
155 "width": 42, # Width of the bounding box in pixels.
156 "top": 42, # Top coordinate of the bounding box. (0,0) is upper left.
157 "left": 42, # Left coordinate of the bounding box. (0,0) is upper left.
158 "height": 42, # Height of the bounding box in pixels.
159 },
160 ],
161 "codepointRange": { # Generic half-open interval [start, end) # Character offsets within a content item, included when content type
162 # is a text. Default charset assumed to be UTF-8.
163 "start": "A String", # Index of the first character of the range (inclusive).
164 "end": "A String", # Index of the last character of the range (exclusive).
165 },
166 "recordKey": { # Message for a unique key indicating a record that contains a finding. # Key of the finding.
167 "cloudStorageKey": { # Record key for a finding in a Cloud Storage file.
168 "startOffset": "A String", # Byte offset of the referenced data in the file.
169 "filePath": "A String", # Path to the file.
170 },
171 "datastoreKey": { # Record key for a finding in Cloud Datastore.
172 "entityKey": { # A unique identifier for a Datastore entity. # Datastore entity key.
173 # If a key's partition ID or any of its path kinds or names are
174 # reserved/read-only, the key is reserved/read-only.
175 # A reserved/read-only key is forbidden in certain documented contexts.
176 "path": [ # The entity path.
177 # An entity path consists of one or more elements composed of a kind and a
178 # string or numerical identifier, which identify entities. The first
179 # element identifies a _root entity_, the second element identifies
180 # a _child_ of the root entity, the third element identifies a child of the
181 # second entity, and so forth. The entities identified by all prefixes of
182 # the path are called the element's _ancestors_.
183 #
184 # A path can never be empty, and a path can have at most 100 elements.
185 { # A (kind, ID/name) pair used to construct a key path.
186 #
187 # If either name or ID is set, the element is complete.
188 # If neither is set, the element is incomplete.
189 "kind": "A String", # The kind of the entity.
190 # A kind matching regex `__.*__` is reserved/read-only.
191 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
192 # Cannot be `""`.
193 "id": "A String", # The auto-allocated ID of the entity.
194 # Never equal to zero. Values less than zero are discouraged and may not
195 # be supported in the future.
196 "name": "A String", # The name of the entity.
197 # A name matching regex `__.*__` is reserved/read-only.
198 # A name must not be more than 1500 bytes when UTF-8 encoded.
199 # Cannot be `""`.
200 },
201 ],
202 "partitionId": { # Datastore partition ID. # Entities are partitioned into subsets, currently identified by a project
203 # ID and namespace ID.
204 # Queries are scoped to a single partition.
205 # A partition ID identifies a grouping of entities. The grouping is always
206 # by project and namespace, however the namespace ID may be empty.
207 #
208 # A partition ID contains several dimensions:
209 # project ID and namespace ID.
210 "projectId": "A String", # The ID of the project to which the entities belong.
211 "databaseId": "A String", # If not empty, the ID of the database to which the entities
212 # belong.
213 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
214 },
215 },
216 },
217 },
218 "byteRange": { # Generic half-open interval [start, end) # Zero-based byte offsets within a content item.
219 "start": "A String", # Index of the first character of the range (inclusive).
220 "end": "A String", # Index of the last character of the range (exclusive).
221 },
222 },
223 },
224 ],
225 },
226 ],
227 }</pre>
228</div>
229
230<div class="method">
231 <code class="details" id="redact">redact(body, x__xgafv=None)</code>
232 <pre>Redact potentially sensitive info from a list of strings.
233This method has limits on input size, processing time, and output size.
234
235Args:
236 body: object, The request body. (required)
237 The object takes the form of:
238
239{ # Request to search for potentially sensitive info in a list of items
240 # and replace it with a default or provided content.
241 "items": [ # The list of items to inspect. Up to 100 are allowed per request.
242 { # Container structure for the content to inspect.
243 "type": "A String", # Type of the content, as defined in Content-Type HTTP header.
244 # Supported types are: all "text" types, octet streams, PNG images,
245 # JPEG images.
246 "data": "A String", # Content data to inspect or redact.
247 "value": "A String", # String data to inspect or redact.
248 },
249 ],
250 "inspectConfig": { # Configuration description of the scanning process. # Configuration for the inspector.
251 # When used with redactContent only info_types and min_likelihood are currently
252 # used.
253 "minLikelihood": "A String", # Only return findings equal or above this threshold.
254 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding will
255 # be included in the response; see Finding.quote.
256 "excludeTypes": True or False, # When true, exclude type information of the findings.
257 "infoTypes": [ # Restrict what info_types to look for. The values must correspond to
258 # InfoType values returned by ListInfoTypes or found in documentation.
259 # Empty info_types runs all enabled detectors.
260 { # Type of information detected by the API.
261 "name": "A String", # Name of the information type, provided by the API call ListInfoTypes.
262 },
263 ],
264 "maxFindings": 42, # Limit the number of findings per content item.
265 },
266 "replaceConfigs": [ # The strings to replace findings with. Must specify at least one.
267 {
268 "replaceWith": "A String", # Content replacing sensitive information of given type. Max 256 chars.
269 "infoType": { # Type of information detected by the API. # Type of information to replace. Only one ReplaceConfig per info_type
270 # should be provided. If ReplaceConfig does not have an info_type, we'll
271 # match it against all info_types that are found but not specified in
272 # another ReplaceConfig.
273 "name": "A String", # Name of the information type, provided by the API call ListInfoTypes.
274 },
275 },
276 ],
277 }
278
279 x__xgafv: string, V1 error format.
280 Allowed values
281 1 - v1 error format
282 2 - v2 error format
283
284Returns:
285 An object of the form:
286
287 { # Results of deidentifying a list of items.
288 "items": [ # The redacted content.
289 { # Container structure for the content to inspect.
290 "type": "A String", # Type of the content, as defined in Content-Type HTTP header.
291 # Supported types are: all "text" types, octet streams, PNG images,
292 # JPEG images.
293 "data": "A String", # Content data to inspect or redact.
294 "value": "A String", # String data to inspect or redact.
295 },
296 ],
297 }</pre>
298</div>
299
300</body></html>