Method: projects.locations.notebooks.sources.batchCreate

Source のリストを作成します。

HTTP リクエスト


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

この URL は gRPC Transcoding 構文を使用します。

パスパラメータ

パラメータ
parent

string

必須。ソースが作成される親リソース。形式: projects/{project}/locations/{location}/notebooks/{notebook}

リクエストの本文

リクエストの本文には、次の構造のデータが含まれます。

JSON 表現
{
  "userContents": [
    {
      object (UserContent)
    }
  ]
}
フィールド
userContents[]

object (UserContent)

必須。アップロードする UserContent。

レスポンスの本文

SourceService.BatchCreateSources メソッドに対するレスポンス。

成功した場合、レスポンスの本文には次の構造のデータが含まれます。

JSON 表現
{
  "sources": [
    {
      object (Source)
    }
  ]
}
フィールド
sources[]

object (Source)

Source。

認可スコープ

次の OAuth スコープのいずれかが必要です。

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

詳細については、Authentication Overview をご覧ください。

IAM 権限

parent リソースに対する次の IAM 権限が必要です。

  • discoveryengine.sources.create

詳細については、IAM のドキュメントをご覧ください。

UserContent

「コンテンツ」メッセージは、ユーザーがアップロードしようとしているデータを指します。

JSON 表現
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "googleDriveContent": {
    object (GoogleDriveContent)
  },
  "textContent": {
    object (TextContent)
  },
  "webContent": {
    object (WebContent)
  },
  "videoContent": {
    object (VideoContent)
  },
  "agentspaceContent": {
    object (AgentspaceContent)
  }
  // End of mutually exclusive fields.
}
フィールド
ユーザー コンテンツ。以下は、相互に排他的なフィールドのリストです。レスポンスに設定されるフィールドは、最大 1 つです。
googleDriveContent

object (GoogleDriveContent)

Google ドライブのコンテンツ。

textContent

object (TextContent)

ソースとしてアップロードされたテキスト コンテンツ。

webContent

object (WebContent)

ソースとしてアップロードされたウェブ コンテンツ。

videoContent

object (VideoContent)

ソースとしてアップロードされた動画コンテンツ。

agentspaceContent

object (AgentspaceContent)

ソースとしてアップロードされた Agentspace コンテンツ。

相互に排他的なフィールドの終わり。

GoogleDriveContent

Google ドライブのコンテンツ。

JSON 表現
{
  "documentId": string,
  "mimeType": string,
  "sourceName": string
}
フィールド
documentId

string

選択したドキュメントのドキュメント ID。

mimeType

string

選択したドキュメントの MIME タイプ。

これは、ドライブ選択ツールで選択されたコンテンツのタイプを区別するために使用できます。Google ドキュメントの場合は application/vnd.google-apps.document、Google スライドの場合は application/vnd.google-apps.presentation を使用します。

sourceName

string

ソースに表示される名前。

TextContent

ソースとしてアップロードされたテキスト コンテンツ。

JSON 表現
{
  "sourceName": string,
  "content": string
}
フィールド
sourceName

string

テキストソースの表示名。

content

string

ソースに表示される名前。

WebContent

ソースとしてアップロードされたウェブ コンテンツ。

JSON 表現
{
  "url": string,
  "sourceName": string
}
フィールド
url

string

URL が指定されている場合は、バックエンドでウェブページを取得します。

sourceName

string

ソースに表示される名前。

VideoContent

ソースとしてアップロードされた動画コンテンツ。

JSON 表現
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "youtubeUrl": string
  // End of mutually exclusive fields.
}
フィールド
動画コンテンツの形式を指定します。次のフィールドは相互に排他的です。レスポンスに設定されるフィールドは、最大 1 つです。
youtubeUrl

string

動画コンテンツの YouTube URL。

相互に排他的なフィールドの終わり。

AgentspaceContent

ソースとしてアップロードされた Agentspace コンテンツ。

JSON 表現
{
  "documentName": string,
  "engineName": string,
  "ideaforgeIdeaName": string
}
フィールド
documentName

string

省略可。Agentspace ドキュメントの完全なリソース名。形式: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}。

engineName

string

省略可。ドキュメントの権限を確認するエンジン。形式: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}。

ideaforgeIdeaName

string

省略可。アイデア ファージ インスタンスのリソース名。形式: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/ideaForgeInstances/{instance}