Method: projects.locations.notebooks.sources.batchCreate

Erstellt eine Liste mit Source.

HTTP-Anfrage

POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/notebooks/*}/sources:batchCreate

Die URL verwendet die Syntax der gRPC-Transcodierung.

Pfadparameter

Parameter
parent

string

Erforderlich. Die übergeordnete Ressource, in der die Quellen erstellt werden. Format: projects/{project}/locations/{location}/notebooks/{notebook}

Anfragetext

Der Anfragetext enthält Daten mit folgender Struktur:

JSON-Darstellung
{
  "userContents": [
    {
      object (UserContent)
    }
  ]
}
Felder
userContents[]

object (UserContent)

Erforderlich. Die UserContent, die hochgeladen werden sollen.

Antworttext

Antwort für die Methode SourceService.BatchCreateSources.

Bei Erfolg enthält der Antworttext Daten mit der folgenden Struktur:

JSON-Darstellung
{
  "sources": [
    {
      object (Source)
    }
  ]
}
Felder
sources[]

object (Source)

Die Source.

Autorisierungsbereiche

Erfordert einen der folgenden OAuth-Bereiche:

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

Weitere Informationen finden Sie unter Authentication Overview.

IAM-Berechtigungen

Erfordert die folgende IAM-Berechtigung für die Ressource parent:

  • discoveryengine.sources.create

Weitere Informationen finden Sie in der IAM-Dokumentation.

UserContent

Die Meldungen vom Typ „Inhalt“ beziehen sich auf Daten, die der Nutzer hochladen möchte.

JSON-Darstellung
{

  // 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.
}
Felder
Union-Feld content. Die Nutzerinhalte. Für content ist nur einer der folgenden Werte zulässig:
googleDriveContent

object (GoogleDriveContent)

Die Inhalte aus Google Drive.

textContent

object (TextContent)

Der als Quelle hochgeladene Textinhalt.

webContent

object (WebContent)

Die als Quelle hochgeladenen Webinhalte.

videoContent

object (VideoContent)

Die als Quelle hochgeladenen Videoinhalte.

agentspaceContent

object (AgentspaceContent)

Als Quelle hochgeladene Agentspace-Inhalte.

GoogleDriveContent

Die Inhalte aus Google Drive.

JSON-Darstellung
{
  "documentId": string,
  "mimeType": string,
  "sourceName": string
}
Felder
documentId

string

Die Dokument-ID des ausgewählten Dokuments.

mimeType

string

Der MIME-Typ des ausgewählten Dokuments.

Damit kann der Typ des im Laufwerk-Picker ausgewählten Inhalts unterschieden werden. Verwenden Sie „application/vnd.google-apps.document“ für Google Docs oder „application/vnd.google-apps.presentation“ für Google Präsentationen.

sourceName

string

Der Name, der für die Quelle angezeigt werden soll.

TextContent

Der als Quelle hochgeladene Textinhalt.

JSON-Darstellung
{
  "sourceName": string,
  "content": string
}
Felder
sourceName

string

Der Anzeigename der Textquelle.

content

string

Der Name, der für die Quelle angezeigt werden soll.

WebContent

Die als Quelle hochgeladenen Webinhalte.

JSON-Darstellung
{
  "url": string,
  "sourceName": string
}
Felder
url

string

Wenn eine URL angegeben wird, wird die Webseite im Backend abgerufen.

sourceName

string

Der Name, der für die Quelle angezeigt werden soll.

VideoContent

Als Quelle hochgeladene Videoinhalte

JSON-Darstellung
{

  // Union field format can be only one of the following:
  "youtubeUrl": string
  // End of list of possible types for union field format.
}
Felder
Union-Feld format. Gibt das Format der Videoinhalte an. format kann nur einer der folgenden Werte sein:
youtubeUrl

string

Die YouTube-URL des Videoinhalts.

AgentspaceContent

Als Quelle hochgeladene Agentspace-Inhalte.

JSON-Darstellung
{
  "documentName": string,
  "engineName": string,
  "ideaforgeIdeaName": string
}
Felder
documentName

string

Optional. Der vollständige Ressourcenname des Agentspace-Dokuments. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}.

engineName

string

Optional. Engine zum Überprüfen der Berechtigung für das Dokument. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}.

ideaforgeIdeaName

string

Optional. Ressourcenname der Idea Forge-Instanz. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/ideaForgeInstances/{instance}