- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- UserContent
- GoogleDriveContent
- TextContent
- WebContent
- VideoContent
- AgentspaceContent
Creates a list of Source
s.
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 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 |
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. |
sourceName |
Should track this from Drive Picker. |
TextContent
The text content uploaded as source.
JSON representation |
---|
{ "sourceName": string, "content": string } |
Fields | |
---|---|
sourceName |
The name of the text source. |
content |
The content of the text 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 of the web 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 document name in Agentspace. |
engineName |
Optional. Engine to verify the permission of the document. |
ideaforgeIdeaName |
Optional. The full idea name for IdeaForge. |