REST Resource: settings.datasources
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แหล่งข้อมูล: DataSource
แหล่งข้อมูลคือเนมสเปซเชิงตรรกะสำหรับรายการที่จะจัดทำดัชนี รายการทั้งหมดต้องมาจากแหล่งข้อมูล การดำเนินการนี้เป็นข้อกําหนดเบื้องต้นก่อนที่จะจัดทําดัชนีรายการใน Cloud Search ได้
การแสดง JSON |
{
"name": string,
"displayName": string,
"shortName": string,
"indexingServiceAccounts": [
string
],
"disableServing": boolean,
"disableModifications": boolean,
"itemsVisibility": [
{
object (GSuitePrincipal )
}
],
"returnThumbnailUrls": boolean,
"operationIds": [
string
]
} |
ช่อง |
name |
string
ชื่อแหล่งข้อมูล รูปแบบ: datasources/{sourceId} ระบบจะไม่สนใจชื่อเมื่อสร้างแหล่งข้อมูล
|
displayName |
string
ต้องระบุ ชื่อที่แสดงของแหล่งข้อมูล ความยาวสูงสุดคือ 300 อักขระ
|
shortName |
string
ชื่อย่อหรือชื่อแทนของแหล่งที่มา ระบบจะใช้ค่านี้เพื่อจับคู่กับโอเปอเรเตอร์ "source" เช่น หากชื่อย่อคือ <value> การค้นหาอย่าง source:<value> จะแสดงเฉพาะผลการค้นหาสำหรับแหล่งที่มานี้ ค่าต้องไม่ซ้ำกันในทุกแหล่งข้อมูล ค่าต้องมีเฉพาะอักขระที่เป็นตัวอักษรและตัวเลขคละกัน (a-zA-Z0-9) เท่านั้น ค่าต้องไม่ขึ้นต้นด้วย "google" และจะต้องไม่ตรงกับค่าต่อไปนี้ mail, gmail, docs, drive, groups, sites, calendar, hangouts, gplus, keep, people, teams โดยมีความยาวสูงสุด 32 อักขระ
|
indexingServiceAccounts[] |
string
รายการบัญชีบริการที่มีสิทธิ์เข้าถึงการจัดทำดัชนี
|
disableServing |
boolean
ปิดใช้การแสดงผลการค้นหาหรือผลการช่วย
|
disableModifications |
boolean
หากเป็น "จริง" ระบบจะตั้งค่าแหล่งข้อมูลเป็นโหมดอ่านอย่างเดียว ในโหมดอ่านอย่างเดียว Indexing API จะปฏิเสธคําขอจัดทําดัชนีหรือลบรายการในแหล่งที่มานี้ การเปิดใช้โหมดอ่านอย่างเดียวจะไม่หยุดการประมวลผลข้อมูลที่ยอมรับก่อนหน้านี้
|
itemsVisibility[] |
object (GSuitePrincipal )
ช่องนี้จะจํากัดระดับการเข้าถึงไว้ที่ระดับแหล่งข้อมูล รายการภายในแหล่งข้อมูลจะจํากัดไว้ที่ยูเนียนของผู้ใช้และกลุ่มที่รวมอยู่ในช่องนี้ โปรดทราบว่าการดำเนินการนี้ไม่ได้รับประกันสิทธิ์เข้าถึงรายการที่เฉพาะเจาะจง เนื่องจากผู้ใช้ต้องมีสิทธิ์ ACL ในรายการที่รวมอยู่ วิธีนี้ช่วยให้มั่นใจได้ว่าจะมีสิทธิ์เข้าถึงระดับสูงในแหล่งข้อมูลทั้งหมด และจะไม่มีแชร์รายการแต่ละรายการนอกระดับการมองเห็นนี้
|
returnThumbnailUrls |
boolean
ผู้ใช้ขอรับ URI ของภาพขนาดย่อสำหรับรายการที่จัดทําดัชนีในแหล่งข้อมูลนี้ได้ไหม
|
operationIds[] |
string
รหัสของการดำเนินการที่ใช้เวลานาน (LROs) ที่ทำงานอยู่สําหรับสคีมานี้
|
เมธอด |
|
สร้างแหล่งข้อมูล |
|
ลบแหล่งข้อมูล |
|
รับแหล่งข้อมูล |
|
แสดงรายการแหล่งข้อมูล |
|
อัปเดตแหล่งข้อมูล |
|
อัปเดตแหล่งข้อมูล |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# REST Resource: settings.datasources\n\n- [Resource: DataSource](#DataSource)\n - [JSON representation](#DataSource.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: DataSource\n--------------------\n\nDatasource is a logical namespace for items to be indexed. All items must belong to a datasource. This is the prerequisite before items can be indexed into Cloud Search.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"displayName\": string, \"shortName\": string, \"indexingServiceAccounts\": [ string ], \"disableServing\": boolean, \"disableModifications\": boolean, \"itemsVisibility\": [ { object (/workspace/cloud-search/docs/reference/rest/v1/GSuitePrincipal) } ], \"returnThumbnailUrls\": boolean, \"operationIds\": [ string ] } ``` |\n\n| Fields ||\n|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The name of the datasource resource. Format: datasources/{sourceId}. The name is ignored when creating a datasource. |\n| `displayName` | `string` Required. Display name of the datasource The maximum length is 300 characters. |\n| `shortName` | `string` A short name or alias for the source. This value will be used to match the 'source' operator. For example, if the short name is *\\\u003cvalue\\\u003e* then queries like *source:\\\u003cvalue\\\u003e* will only return results for this source. The value must be unique across all datasources. The value must only contain alphanumeric characters (a-zA-Z0-9). The value cannot start with 'google' and cannot be one of the following: mail, gmail, docs, drive, groups, sites, calendar, hangouts, gplus, keep, people, teams. Its maximum length is 32 characters. |\n| `indexingServiceAccounts[]` | `string` List of service accounts that have indexing access. |\n| `disableServing` | `boolean` Disable serving any search or assist results. |\n| `disableModifications` | `boolean` If true, sets the datasource to read-only mode. In read-only mode, the Indexing API rejects any requests to index or delete items in this source. Enabling read-only mode does not stop the processing of previously accepted data. |\n| `itemsVisibility[]` | `object (`[GSuitePrincipal](/workspace/cloud-search/docs/reference/rest/v1/GSuitePrincipal)`)` This field restricts visibility to items at the datasource level. Items within the datasource are restricted to the union of users and groups included in this field. Note that, this does not ensure access to a specific item, as users need to have ACL permissions on the contained items. This ensures a high level access on the entire datasource, and that the individual items are not shared outside this visibility. |\n| `returnThumbnailUrls` | `boolean` Can a user request to get thumbnail URI for Items indexed in this data source. |\n| `operationIds[]` | `string` IDs of the Long Running Operations (LROs) currently running for this schema. |\n\n| Methods ------- ||\n|------------------------------------------------------------------------------------------|-----------------------|\n| ### [create](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/create) | Creates a datasource. |\n| ### [delete](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/delete) | Deletes a datasource. |\n| ### [get](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/get) | Gets a datasource. |\n| ### [list](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/list) | Lists datasources. |\n| ### [patch](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/patch) | Updates a datasource. |\n| ### [update](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/update) | Updates a datasource. |"]]