- Permintaan HTTP
- Parameter jalur
- Isi permintaan
- Isi respons
- Cakupan otorisasi
- Izin IAM
- UserContent
- GoogleDriveContent
- TextContent
- WebContent
- VideoContent
- AgentspaceContent
Membuat daftar Source.
Permintaan HTTP
POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/notebooks/*}/sources:batchCreate URL ini menggunakan sintaksis gRPC Transcoding.
Parameter jalur
| Parameter | |
|---|---|
parent |
Wajib. Resource induk tempat sumber akan dibuat. Format: projects/{project}/locations/{location}/notebooks/{notebook} |
Isi permintaan
Isi permintaan memuat data dengan struktur berikut:
| Representasi JSON |
|---|
{
"userContents": [
{
object ( |
| Kolom | |
|---|---|
userContents[] |
Wajib. |
Isi respons
Respons untuk metode SourceService.BatchCreateSources.
Jika berhasil, isi respons memuat data dengan struktur berikut:
| Representasi JSON |
|---|
{
"sources": [
{
object ( |
| Kolom | |
|---|---|
sources[] |
|
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/discoveryengine.assist.readwritehttps://www.googleapis.com/auth/discoveryengine.readwritehttps://www.googleapis.com/auth/discoveryengine.serving.readwrite
Untuk mengetahui informasi selengkapnya, lihat Authentication Overview.
Izin IAM
Memerlukan izin IAM berikut pada resource parent:
discoveryengine.sources.create
Untuk mengetahui informasi selengkapnya, lihat dokumentasi IAM.
UserContent
Pesan "Konten" merujuk pada data yang ingin diupload pengguna.
| Representasi JSON |
|---|
{ // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "googleDriveContent": { object ( |
| Kolom | |
|---|---|
| Konten pengguna. Berikut adalah daftar kolom yang bersifat eksklusif satu sama lain. Maksimal satu kolom akan ditetapkan dalam respons: | |
googleDriveContent |
Konten dari Google Drive. |
textContent |
Konten teks yang diupload sebagai sumber. |
webContent |
Konten web yang diupload sebagai sumber. |
videoContent |
Konten video yang diupload sebagai sumber. |
agentspaceContent |
Konten Agentspace diupload sebagai sumber. |
| Akhir kolom yang saling eksklusif. | |
GoogleDriveContent
Konten dari Google Drive.
| Representasi JSON |
|---|
{ "documentId": string, "mimeType": string, "sourceName": string } |
| Kolom | |
|---|---|
documentId |
ID dokumen dari dokumen yang dipilih. |
mimeType |
Jenis MIME dokumen yang dipilih. Dapat digunakan untuk membedakan jenis konten yang dipilih di pemilih Drive. Gunakan application/vnd.google-apps.document untuk Google Dokumen atau application/vnd.google-apps.presentation untuk Google Slide. |
sourceName |
Nama yang akan ditampilkan untuk sumber. |
TextContent
Konten teks yang diupload sebagai sumber.
| Representasi JSON |
|---|
{ "sourceName": string, "content": string } |
| Kolom | |
|---|---|
sourceName |
Nama tampilan sumber teks. |
content |
Nama yang akan ditampilkan untuk sumber. |
WebContent
Konten web yang diupload sebagai sumber.
| Representasi JSON |
|---|
{ "url": string, "sourceName": string } |
| Kolom | |
|---|---|
url |
Jika URL diberikan, akan mengambil halaman web di backend. |
sourceName |
Nama yang akan ditampilkan untuk sumber. |
VideoContent
Konten video yang diupload sebagai sumber.
| Representasi 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. } |
| Kolom | |
|---|---|
| Menentukan format konten video. Berikut adalah daftar kolom yang saling eksklusif. Maksimal satu kolom akan ditetapkan dalam respons: | |
youtubeUrl |
URL YouTube dari konten video. |
| Akhir kolom yang saling eksklusif. | |
AgentspaceContent
Konten Agentspace diupload sebagai sumber.
| Representasi JSON |
|---|
{ "documentName": string, "engineName": string, "ideaforgeIdeaName": string } |
| Kolom | |
|---|---|
documentName |
Opsional. Nama lengkap resource dokumen Agentspace. Format: |
engineName |
Opsional. Engine untuk memverifikasi izin dokumen. Format: |
ideaforgeIdeaName |
Opsional. Nama resource instance platform ide. Format: |