| 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="discoveryengine_v1alpha.html">Discovery Engine API</a> . <a href="discoveryengine_v1alpha.projects.html">projects</a> . <a href="discoveryengine_v1alpha.projects.locations.html">locations</a> . <a href="discoveryengine_v1alpha.projects.locations.notebooks.html">notebooks</a> . <a href="discoveryengine_v1alpha.projects.locations.notebooks.sources.html">sources</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#batchCreate">batchCreate(parent, body=None, x__xgafv=None)</a></code></p> |
| 79 |
<p class="firstline">Creates a list of Sources.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#batchDelete">batchDelete(parent, body=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Deletes multiple sources</p> |
| 83 |
<p class="toc_element"> |
| 84 |
<code><a href="#close">close()</a></code></p> |
| 85 |
<p class="firstline">Close httplib2 connections.</p> |
| 86 |
<p class="toc_element"> |
| 87 |
<code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 88 |
<p class="firstline">Gets a Source.</p> |
| 89 |
<h3>Method Details</h3> |
| 90 |
<div class="method"> |
| 91 |
<code class="details" id="batchCreate">batchCreate(parent, body=None, x__xgafv=None)</code> |
| 92 |
<pre>Creates a list of Sources. |
| 93 |
|
| 94 |
Args: |
| 95 |
parent: string, Required. The parent resource where the sources will be created. Format: projects/{project}/locations/{location}/notebooks/{notebook} (required) |
| 96 |
body: object, The request body. |
| 97 |
The object takes the form of: |
| 98 |
|
| 99 |
{ # Request for SourceService.BatchCreateSources method. |
| 100 |
"userContents": [ # Required. The UserContents to be uploaded. |
| 101 |
{ # The "Content" messages refer to data the user wants to upload. |
| 102 |
"agentspaceContent": { # Agentspace content uploaded as source. # Agentspace content uploaded as source. |
| 103 |
"documentName": "A String", # Optional. The full resource name of the Agentspace document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. |
| 104 |
"engineName": "A String", # Optional. Engine to verify the permission of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`. |
| 105 |
"ideaforgeIdeaName": "A String", # Optional. Resource name of the idea forge instance. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/ideaForgeInstances/{instance}` |
| 106 |
}, |
| 107 |
"googleDriveContent": { # The content from Google Drive. # The content from Google Drive. |
| 108 |
"documentId": "A String", # The document id of the selected document. |
| 109 |
"mimeType": "A String", # The mime type of the selected document. This can be used to differentiate type of content selected in the drive picker. Use application/vnd.google-apps.document for Google Docs or application/vnd.google-apps.presentation for Google Slides. |
| 110 |
"sourceName": "A String", # The name to be displayed for the source. |
| 111 |
}, |
| 112 |
"textContent": { # The text content uploaded as source. # The text content uploaded as source. |
| 113 |
"content": "A String", # The name to be displayed for the source. |
| 114 |
"sourceName": "A String", # The display name of the text source. |
| 115 |
}, |
| 116 |
"videoContent": { # Video content uploaded as source. # The video content uploaded as source. |
| 117 |
"youtubeUrl": "A String", # The youtube url of the video content. |
| 118 |
}, |
| 119 |
"webContent": { # The web content uploaded as source. # The web content uploaded as source. |
| 120 |
"sourceName": "A String", # The name to be displayed for the source. |
| 121 |
"url": "A String", # If URL is supplied, will fetch the webpage in the backend. |
| 122 |
}, |
| 123 |
}, |
| 124 |
], |
| 125 |
} |
| 126 |
|
| 127 |
x__xgafv: string, V1 error format. |
| 128 |
Allowed values |
| 129 |
1 - v1 error format |
| 130 |
2 - v2 error format |
| 131 |
|
| 132 |
Returns: |
| 133 |
An object of the form: |
| 134 |
|
| 135 |
{ # Response for SourceService.BatchCreateSources method. |
| 136 |
"sources": [ # The Sources. |
| 137 |
{ # Source represents a single source of content. |
| 138 |
"metadata": { # Represents the metadata of a source and some additional information. # Output only. Metadata about the source. |
| 139 |
"agentspaceMetadata": { # Metadata about an agentspace source. # Metadata for an agentspace source. |
| 140 |
"documentName": "A String", # Output only. The full document name in Agentspace. |
| 141 |
"documentTitle": "A String", # Output only. The title of the document. |
| 142 |
}, |
| 143 |
"googleDocsMetadata": { # Metadata about a google doc source. # Metadata for a google doc source. |
| 144 |
"documentId": "A String", # Output only. The document id of the google doc. |
| 145 |
"revisionId": "A String", # Output only. Revision id for the doc. |
| 146 |
}, |
| 147 |
"sourceAddedTimestamp": "A String", # The timestamp the source was added. |
| 148 |
"tokenCount": 42, # The number of tokens in the source. |
| 149 |
"wordCount": 42, # The word count of the source. |
| 150 |
"youtubeMetadata": { # Metadata about a youtube video source. # Metadata for a youtube video source. |
| 151 |
"channelName": "A String", # Output only. The channel name of the youtube video. |
| 152 |
"videoId": "A String", # Output only. The id of the youtube video. |
| 153 |
}, |
| 154 |
}, |
| 155 |
"name": "A String", # Identifier. The full resource name of the source. Format: `projects/{project}/locations/{location}/notebooks/{notebook}/sources/{source_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
| 156 |
"settings": { # Allows extension of Source Settings in the BatchCreateSources (Formerly AddSource request). # Output only. Status of the source, and any failure reasons. |
| 157 |
"failureReason": { # Failure reason containing details about why a source failed to ingest. # Failure reason containing details about why a source failed to ingest. |
| 158 |
"audioTranscriptionError": { # An audio file transcription specific error. # An audio file transcription specific error. |
| 159 |
"languageDetectionFailed": { # Could not detect language of the file (it may not be speech). # Could not detect language of the file (it may not be speech). |
| 160 |
}, |
| 161 |
"noAudioDetected": { # No audio was detected in the input file. # No audio was detected in the input file (it may have been a video). |
| 162 |
}, |
| 163 |
}, |
| 164 |
"domainBlocked": { # Error to indicate that the source was removed because the domain was blocked. # Error if the user tries to add a source from a blocked domain. |
| 165 |
}, |
| 166 |
"googleDriveError": { # A google drive specific error. # A google drive specific error. |
| 167 |
"downloadPrevented": { # The user was prevented from downloading the file. # The user was prevented from downloading the file. |
| 168 |
}, |
| 169 |
}, |
| 170 |
"ingestionError": { # Indicates an error occurred while ingesting the source. # Indicates an error occurred while ingesting the source. |
| 171 |
}, |
| 172 |
"mimeTypeBlocked": { # Indicates that the source MIME type is blocked. # Indicates that the source MIME type is blocked. |
| 173 |
}, |
| 174 |
"paywallError": { # Indicates that the source is paywalled and cannot be ingested. # Indicates that the source is paywalled and cannot be ingested. |
| 175 |
}, |
| 176 |
"policyCheckFailed": { # Indicates that the policy check failed. # Indicates that the policy check failed. |
| 177 |
}, |
| 178 |
"sourceEmpty": { # Indicates that the source is empty. # Indicates that the source is empty. |
| 179 |
}, |
| 180 |
"sourceLimitExceeded": { # Indicates that the user does not have space for this source. # Error if the user tries to update beyond their limits. |
| 181 |
}, |
| 182 |
"sourceTooLong": { # Indicates source word count exceeded the user's limit. # Indicates source word count exceeded the user's limit. |
| 183 |
"wordCount": 42, # The number of words in the source. |
| 184 |
"wordLimit": 42, # The word count limit for the current user at the time of the upload. |
| 185 |
}, |
| 186 |
"sourceUnreachable": { # Indicates that the source is unreachable. This is primarily used for sources that are added via URL. # Indicates that the source is unreachable. |
| 187 |
"errorDetails": "A String", # Describes why the source is unreachable. |
| 188 |
}, |
| 189 |
"unknown": { # Indicates an unknown error occurred. # Indicates an unknown error occurred. |
| 190 |
}, |
| 191 |
"uploadError": { # Indicates an error occurred while uploading the source. # Indicates an error occurred while uploading the source. |
| 192 |
}, |
| 193 |
"youtubeError": { # A youtube specific error. # A youtube specific error. |
| 194 |
"videoDeleted": { # Error to indicate that the source was removed because the video was deleted. # Error to indicate that the source was removed because the video was deleted. |
| 195 |
}, |
| 196 |
}, |
| 197 |
}, |
| 198 |
"status": "A String", # Status of the source. |
| 199 |
}, |
| 200 |
"sourceId": { # SourceId is the last segment of the source's resource name. # Optional. Output only. Source id, which is the last segment of the source's resource name. |
| 201 |
"id": "A String", # The id of the source. |
| 202 |
}, |
| 203 |
"title": "A String", # Optional. Title of the source. |
| 204 |
}, |
| 205 |
], |
| 206 |
}</pre> |
| 207 |
</div> |
| 208 |
|
| 209 |
<div class="method"> |
| 210 |
<code class="details" id="batchDelete">batchDelete(parent, body=None, x__xgafv=None)</code> |
| 211 |
<pre>Deletes multiple sources |
| 212 |
|
| 213 |
Args: |
| 214 |
parent: string, Required. The parent resource where the sources will be deleted. Format: projects/{project}/locations/{location}/notebooks/{notebook} (required) |
| 215 |
body: object, The request body. |
| 216 |
The object takes the form of: |
| 217 |
|
| 218 |
{ # Request for BatchDeleteSourcesRequest method. |
| 219 |
"names": [ # Required. Names of sources to be deleted. Format: projects/{project}/locations/{location}/notebooks/{notebook}/sources/{source} |
| 220 |
"A String", |
| 221 |
], |
| 222 |
} |
| 223 |
|
| 224 |
x__xgafv: string, V1 error format. |
| 225 |
Allowed values |
| 226 |
1 - v1 error format |
| 227 |
2 - v2 error format |
| 228 |
|
| 229 |
Returns: |
| 230 |
An object of the form: |
| 231 |
|
| 232 |
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
| 233 |
}</pre> |
| 234 |
</div> |
| 235 |
|
| 236 |
<div class="method"> |
| 237 |
<code class="details" id="close">close()</code> |
| 238 |
<pre>Close httplib2 connections.</pre> |
| 239 |
</div> |
| 240 |
|
| 241 |
<div class="method"> |
| 242 |
<code class="details" id="get">get(name, x__xgafv=None)</code> |
| 243 |
<pre>Gets a Source. |
| 244 |
|
| 245 |
Args: |
| 246 |
name: string, Required. The resource name for source Format: projects/{project}/locations/{location}/notebooks/{notebook}/sources/{source} (required) |
| 247 |
x__xgafv: string, V1 error format. |
| 248 |
Allowed values |
| 249 |
1 - v1 error format |
| 250 |
2 - v2 error format |
| 251 |
|
| 252 |
Returns: |
| 253 |
An object of the form: |
| 254 |
|
| 255 |
{ # Source represents a single source of content. |
| 256 |
"metadata": { # Represents the metadata of a source and some additional information. # Output only. Metadata about the source. |
| 257 |
"agentspaceMetadata": { # Metadata about an agentspace source. # Metadata for an agentspace source. |
| 258 |
"documentName": "A String", # Output only. The full document name in Agentspace. |
| 259 |
"documentTitle": "A String", # Output only. The title of the document. |
| 260 |
}, |
| 261 |
"googleDocsMetadata": { # Metadata about a google doc source. # Metadata for a google doc source. |
| 262 |
"documentId": "A String", # Output only. The document id of the google doc. |
| 263 |
"revisionId": "A String", # Output only. Revision id for the doc. |
| 264 |
}, |
| 265 |
"sourceAddedTimestamp": "A String", # The timestamp the source was added. |
| 266 |
"tokenCount": 42, # The number of tokens in the source. |
| 267 |
"wordCount": 42, # The word count of the source. |
| 268 |
"youtubeMetadata": { # Metadata about a youtube video source. # Metadata for a youtube video source. |
| 269 |
"channelName": "A String", # Output only. The channel name of the youtube video. |
| 270 |
"videoId": "A String", # Output only. The id of the youtube video. |
| 271 |
}, |
| 272 |
}, |
| 273 |
"name": "A String", # Identifier. The full resource name of the source. Format: `projects/{project}/locations/{location}/notebooks/{notebook}/sources/{source_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
| 274 |
"settings": { # Allows extension of Source Settings in the BatchCreateSources (Formerly AddSource request). # Output only. Status of the source, and any failure reasons. |
| 275 |
"failureReason": { # Failure reason containing details about why a source failed to ingest. # Failure reason containing details about why a source failed to ingest. |
| 276 |
"audioTranscriptionError": { # An audio file transcription specific error. # An audio file transcription specific error. |
| 277 |
"languageDetectionFailed": { # Could not detect language of the file (it may not be speech). # Could not detect language of the file (it may not be speech). |
| 278 |
}, |
| 279 |
"noAudioDetected": { # No audio was detected in the input file. # No audio was detected in the input file (it may have been a video). |
| 280 |
}, |
| 281 |
}, |
| 282 |
"domainBlocked": { # Error to indicate that the source was removed because the domain was blocked. # Error if the user tries to add a source from a blocked domain. |
| 283 |
}, |
| 284 |
"googleDriveError": { # A google drive specific error. # A google drive specific error. |
| 285 |
"downloadPrevented": { # The user was prevented from downloading the file. # The user was prevented from downloading the file. |
| 286 |
}, |
| 287 |
}, |
| 288 |
"ingestionError": { # Indicates an error occurred while ingesting the source. # Indicates an error occurred while ingesting the source. |
| 289 |
}, |
| 290 |
"mimeTypeBlocked": { # Indicates that the source MIME type is blocked. # Indicates that the source MIME type is blocked. |
| 291 |
}, |
| 292 |
"paywallError": { # Indicates that the source is paywalled and cannot be ingested. # Indicates that the source is paywalled and cannot be ingested. |
| 293 |
}, |
| 294 |
"policyCheckFailed": { # Indicates that the policy check failed. # Indicates that the policy check failed. |
| 295 |
}, |
| 296 |
"sourceEmpty": { # Indicates that the source is empty. # Indicates that the source is empty. |
| 297 |
}, |
| 298 |
"sourceLimitExceeded": { # Indicates that the user does not have space for this source. # Error if the user tries to update beyond their limits. |
| 299 |
}, |
| 300 |
"sourceTooLong": { # Indicates source word count exceeded the user's limit. # Indicates source word count exceeded the user's limit. |
| 301 |
"wordCount": 42, # The number of words in the source. |
| 302 |
"wordLimit": 42, # The word count limit for the current user at the time of the upload. |
| 303 |
}, |
| 304 |
"sourceUnreachable": { # Indicates that the source is unreachable. This is primarily used for sources that are added via URL. # Indicates that the source is unreachable. |
| 305 |
"errorDetails": "A String", # Describes why the source is unreachable. |
| 306 |
}, |
| 307 |
"unknown": { # Indicates an unknown error occurred. # Indicates an unknown error occurred. |
| 308 |
}, |
| 309 |
"uploadError": { # Indicates an error occurred while uploading the source. # Indicates an error occurred while uploading the source. |
| 310 |
}, |
| 311 |
"youtubeError": { # A youtube specific error. # A youtube specific error. |
| 312 |
"videoDeleted": { # Error to indicate that the source was removed because the video was deleted. # Error to indicate that the source was removed because the video was deleted. |
| 313 |
}, |
| 314 |
}, |
| 315 |
}, |
| 316 |
"status": "A String", # Status of the source. |
| 317 |
}, |
| 318 |
"sourceId": { # SourceId is the last segment of the source's resource name. # Optional. Output only. Source id, which is the last segment of the source's resource name. |
| 319 |
"id": "A String", # The id of the source. |
| 320 |
}, |
| 321 |
"title": "A String", # Optional. Title of the source. |
| 322 |
}</pre> |
| 323 |
</div> |
| 324 |
|
| 325 |
</body></html> |