Method: projects.locations.notebooks.sources.batchCreate

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

string

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 (UserContent)
    }
  ]
}
Fields
userContents[]

object (UserContent)

Required. The UserContents to be uploaded.

Response body

Response for SourceService.BatchCreateSources method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "sources": [
    {
      object (Source)
    }
  ]
}
Fields
sources[]

object (Source)

The Sources.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

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 content can be only one of the following:
  "googleDriveContent": {
    object (GoogleDriveContent)
  },
  "textContent": {
    object (TextContent)
  },
  "webContent": {
    object (WebContent)
  },
  "videoContent": {
    object (VideoContent)
  },
  "agentspaceContent": {
    object (AgentspaceContent)
  }
  // End of list of possible types for union field content.
}
Fields
Union field content. The user content. content can be only one of the following:
googleDriveContent

object (GoogleDriveContent)

The content from Google Drive.

textContent

object (TextContent)

The text content uploaded as source.

webContent

object (WebContent)

The web content uploaded as source.

videoContent

object (VideoContent)

The video content uploaded as source.

agentspaceContent

object (AgentspaceContent)

Agentspace content uploaded as source.

GoogleDriveContent

The content from Google Drive.

JSON representation
{
  "documentId": string,
  "mimeType": string,
  "sourceName": string
}
Fields
documentId

string

The document id of the selected document.

mimeType

string

The mime type of the selected document.

This can be used to differentiate type of content selected in the drive picker.

sourceName

string

Should track this from Drive Picker.

TextContent

The text content uploaded as source.

JSON representation
{
  "sourceName": string,
  "content": string
}
Fields
sourceName

string

The name of the text source.

content

string

The content of the text source.

WebContent

The web content uploaded as source.

JSON representation
{
  "url": string,
  "sourceName": string
}
Fields
url

string

If URL is supplied, will fetch the webpage in the backend.

sourceName

string

The name of the web source.

VideoContent

Video content uploaded as source.

JSON representation
{

  // Union field format can be only one of the following:
  "youtubeUrl": string
  // End of list of possible types for union field format.
}
Fields
Union field format. Specifies the format of the video content format can be only one of the following:
youtubeUrl

string

The youtube url of the video content.

AgentspaceContent

Agentspace content uploaded as source.

JSON representation
{
  "documentName": string,
  "engineName": string,
  "ideaforgeIdeaName": string
}
Fields
documentName

string

Optional. The full document name in Agentspace.

engineName

string

Optional. Engine to verify the permission of the document.

ideaforgeIdeaName

string

Optional. The full idea name for IdeaForge.