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.readwrite

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

IAM 権限

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

  • discoveryengine.sources.create

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

UserContent

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

JSON 表現
{

  // 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
共用体フィールド content。ユーザー コンテンツ。content は次のいずれかになります。
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 表現
{

  // Union field format can be only one of the following:
  "youtubeUrl": string
  // End of list of possible types for union field format.
}
Fields
共用体フィールド format。動画コンテンツの形式を指定します。format には次のいずれか 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}