blob: 5e5289351b507558313a542a0b3f7a0803a68e93 [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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700143 "infoType": { # Type of information detected by the API. # The specific type of info the string might be.
144 "name": "A String", # Name of the information type, provided by the API call ListInfoTypes.
145 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700146 "location": { # Specifies the location of a finding within its source item. # Location of the info found.
147 "fieldId": { # General identifier of a data field in a storage service. # Field id of the field containing the finding.
148 "columnName": "A String", # Column name describing the field.
149 },
150 "imageBoxes": [ # Location within an image's pixels.
151 { # Bounding box encompassing detected text within an image.
152 "width": 42, # Width of the bounding box in pixels.
153 "top": 42, # Top coordinate of the bounding box. (0,0) is upper left.
154 "left": 42, # Left coordinate of the bounding box. (0,0) is upper left.
155 "height": 42, # Height of the bounding box in pixels.
156 },
157 ],
158 "codepointRange": { # Generic half-open interval [start, end) # Character offsets within a content item, included when content type
159 # is a text. Default charset assumed to be UTF-8.
160 "start": "A String", # Index of the first character of the range (inclusive).
161 "end": "A String", # Index of the last character of the range (exclusive).
162 },
163 "recordKey": { # Message for a unique key indicating a record that contains a finding. # Key of the finding.
164 "cloudStorageKey": { # Record key for a finding in a Cloud Storage file.
165 "startOffset": "A String", # Byte offset of the referenced data in the file.
166 "filePath": "A String", # Path to the file.
167 },
168 "datastoreKey": { # Record key for a finding in Cloud Datastore.
169 "entityKey": { # A unique identifier for a Datastore entity. # Datastore entity key.
170 # If a key's partition ID or any of its path kinds or names are
171 # reserved/read-only, the key is reserved/read-only.
172 # A reserved/read-only key is forbidden in certain documented contexts.
173 "path": [ # The entity path.
174 # An entity path consists of one or more elements composed of a kind and a
175 # string or numerical identifier, which identify entities. The first
176 # element identifies a _root entity_, the second element identifies
177 # a _child_ of the root entity, the third element identifies a child of the
178 # second entity, and so forth. The entities identified by all prefixes of
179 # the path are called the element's _ancestors_.
180 #
181 # A path can never be empty, and a path can have at most 100 elements.
182 { # A (kind, ID/name) pair used to construct a key path.
183 #
184 # If either name or ID is set, the element is complete.
185 # If neither is set, the element is incomplete.
186 "kind": "A String", # The kind of the entity.
187 # A kind matching regex `__.*__` is reserved/read-only.
188 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
189 # Cannot be `""`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700190 "name": "A String", # The name of the entity.
191 # A name matching regex `__.*__` is reserved/read-only.
192 # A name must not be more than 1500 bytes when UTF-8 encoded.
193 # Cannot be `""`.
Thomas Coffee2f245372017-03-27 10:39:26 -0700194 "id": "A String", # The auto-allocated ID of the entity.
195 # Never equal to zero. Values less than zero are discouraged and may not
196 # be supported in the future.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700197 },
198 ],
199 "partitionId": { # Datastore partition ID. # Entities are partitioned into subsets, currently identified by a project
200 # ID and namespace ID.
201 # Queries are scoped to a single partition.
202 # A partition ID identifies a grouping of entities. The grouping is always
203 # by project and namespace, however the namespace ID may be empty.
204 #
205 # A partition ID contains several dimensions:
206 # project ID and namespace ID.
207 "projectId": "A String", # The ID of the project to which the entities belong.
208 "databaseId": "A String", # If not empty, the ID of the database to which the entities
209 # belong.
210 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
211 },
212 },
213 },
214 },
215 "byteRange": { # Generic half-open interval [start, end) # Zero-based byte offsets within a content item.
216 "start": "A String", # Index of the first character of the range (inclusive).
217 "end": "A String", # Index of the last character of the range (exclusive).
218 },
219 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700220 "likelihood": "A String", # Estimate of how likely it is that the info_type is correct.
221 "createTime": "A String", # Timestamp when finding was detected.
222 "quote": "A String", # The specific string that may be potentially sensitive info.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700223 },
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 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700250 "replaceConfigs": [ # The strings to replace findings with. Must specify at least one.
251 {
252 "replaceWith": "A String", # Content replacing sensitive information of given type. Max 256 chars.
253 "infoType": { # Type of information detected by the API. # Type of information to replace. Only one ReplaceConfig per info_type
254 # should be provided. If ReplaceConfig does not have an info_type, we'll
255 # match it against all info_types that are found but not specified in
256 # another ReplaceConfig.
257 "name": "A String", # Name of the information type, provided by the API call ListInfoTypes.
258 },
259 },
260 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700261 "inspectConfig": { # Configuration description of the scanning process. # Configuration for the inspector.
262 # When used with redactContent only info_types and min_likelihood are currently
263 # used.
264 "minLikelihood": "A String", # Only return findings equal or above this threshold.
265 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding will
266 # be included in the response; see Finding.quote.
267 "excludeTypes": True or False, # When true, exclude type information of the findings.
268 "infoTypes": [ # Restrict what info_types to look for. The values must correspond to
269 # InfoType values returned by ListInfoTypes or found in documentation.
270 # Empty info_types runs all enabled detectors.
271 { # Type of information detected by the API.
272 "name": "A String", # Name of the information type, provided by the API call ListInfoTypes.
273 },
274 ],
275 "maxFindings": 42, # Limit the number of findings per content item.
276 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700277 }
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>