- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- UserContent
- GoogleDriveContent
- TextContent
- WebContent
- VideoContent
- AgentspaceContent
Creates a list of Sources.
HTTP request
POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/notebooks/*}/sources:batchCreate
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The parent resource where the sources will be created. Format: projects/{project}/locations/{location}/notebooks/{notebook} |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"userContents": [
{
object ( |
| Fields | |
|---|---|
userContents[] |
Required. The |
Response body
Response for SourceService.BatchCreateSources method.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"sources": [
{
object ( |
| Fields | |
|---|---|
sources[] |
The |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/discoveryengine.readwrite
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent resource:
discoveryengine.sources.create
For more information, see the IAM documentation.
UserContent
The "Content" messages refer to data the user wants to upload.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field content. The user content. content can be only one of the following: |
|
googleDriveContent |
The content from Google Drive. |
textContent |
The text content uploaded as source. |
webContent |
The web content uploaded as source. |
videoContent |
The video content uploaded as source. |
agentspaceContent |
Agentspace content uploaded as source. |
GoogleDriveContent
The content from Google Drive.
| JSON representation |
|---|
{ "documentId": string, "mimeType": string, "sourceName": string } |
| Fields | |
|---|---|
documentId |
The document id of the selected document. |
mimeType |
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. |
sourceName |
The name to be displayed for the source. |
TextContent
The text content uploaded as source.
| JSON representation |
|---|
{ "sourceName": string, "content": string } |
| Fields | |
|---|---|
sourceName |
The display name of the text source. |
content |
The name to be displayed for the source. |
WebContent
The web content uploaded as source.
| JSON representation |
|---|
{ "url": string, "sourceName": string } |
| Fields | |
|---|---|
url |
If URL is supplied, will fetch the webpage in the backend. |
sourceName |
The name to be displayed for the source. |
VideoContent
Video content uploaded as source.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field format. Specifies the format of the video content format can be only one of the following: |
|
youtubeUrl |
The youtube url of the video content. |
AgentspaceContent
Agentspace content uploaded as source.
| JSON representation |
|---|
{ "documentName": string, "engineName": string, "ideaforgeIdeaName": string } |
| Fields | |
|---|---|
documentName |
Optional. The full resource name of the Agentspace document. Format: |
engineName |
Optional. Engine to verify the permission of the document. Format: |
ideaforgeIdeaName |
Optional. Resource name of the idea forge instance. Format: |