- HTTP 要求
- 路徑參數
- 要求主體
- 回應主體
- 授權範圍
- 要求
- UpdateLabelPropertiesRequest
- CreateFieldRequest
- UpdateFieldPropertiesRequest
- UpdateFieldTypeRequest
- LongTextOptions
- EnableFieldRequest
- DisableFieldRequest
- DeleteFieldRequest
- CreateSelectionChoiceRequest
- UpdateSelectionChoicePropertiesRequest
- EnableSelectionChoiceRequest
- DisableSelectionChoiceRequest
- DeleteSelectionChoiceRequest
- 回覆
- UpdateLabelPropertiesResponse
- CreateFieldResponse
- UpdateFieldPropertiesResponse
- UpdateFieldTypeResponse
- EnableFieldResponse
- DisableFieldResponse
- DeleteFieldResponse
- CreateSelectionChoiceResponse
- UpdateSelectionChoicePropertiesResponse
- EnableSelectionChoiceResponse
- DisableSelectionChoiceResponse
- DeleteSelectionChoiceResponse
- 試試看!
套用一組更新要求來產生新的草稿修訂版本,藉此更新單一標籤。批次更新是「全部或無」的作業:如果任何更新要求無效,系統就不會套用任何變更。必須先發布草稿修訂版本,才能將變更內容套用至雲端硬碟項目。
HTTP 要求
POST https://drivelabels.googleapis.com/v2/{name=labels/*}:delta
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 | |
---|---|
name |
必要欄位。要更新的標籤資源名稱。 |
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
---|
{ "writeControl": { object ( |
欄位 | |
---|---|
writeControl |
提供寫入要求的執行方式控制。 |
requests[] |
要套用至標籤的更新清單。系統會按照指定的順序套用要求。 |
useAdminAccess |
將其設為 |
view |
如果有指定,系統只會傳回屬於指定檢視畫面的特定欄位。 |
languageCode |
當 |
回應主體
標籤更新的回應。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
---|
{ "responses": [ { object ( |
欄位 | |
---|---|
responses[] |
更新回覆。此屬性與更新內容對應 1:1,但某些要求的回應可能是空白的。 |
updatedLabel |
套用更新後的標籤。只有在 [BatchUpdateLabelResponse2.include_label_in_response] 為 |
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.admin.labels
詳情請參閱授權指南。
要求
要套用至標籤的單一更新類型。
JSON 表示法 |
---|
{ // Union field |
欄位 | |
---|---|
聯集欄位 kind 。更新的類型。只需要填寫一個欄位。kind 只能是下列其中一項: |
|
updateLabel |
更新標籤屬性。 |
createField |
建立新的欄位。 |
updateField |
更新欄位的基本屬性。 |
updateFieldType |
更新欄位類型和/或類型選項。 |
enableField |
啟用欄位。 |
disableField |
停用欄位。 |
deleteField |
從標籤中刪除欄位。 |
createSelectionChoice |
在「選取範圍」欄位中建立選項。 |
updateSelectionChoiceProperties |
更新選項欄位中的 Choice 屬性。 |
enableSelectionChoice |
在選項欄位中啟用 Choice。 |
disableSelectionChoice |
停用選取欄位中的選項。 |
deleteSelectionChoice |
刪除選取欄位內的選項。 |
UpdateLabelPropertiesRequest
更新 Label 的基本屬性。
JSON 表示法 |
---|
{
"updateMask": string,
"properties": {
object ( |
欄位 | |
---|---|
updateMask |
要更新的欄位。至少須指定一個欄位。根層級 |
properties |
必要欄位。要更新的標籤屬性。 |
CreateFieldRequest
要求在標籤中建立欄位。
JSON 表示法 |
---|
{
"field": {
object ( |
欄位 | |
---|---|
field |
必要欄位。要建立的欄位。 |
UpdateFieldPropertiesRequest
要求更新欄位屬性。
JSON 表示法 |
---|
{
"updateMask": string,
"id": string,
"properties": {
object ( |
欄位 | |
---|---|
updateMask |
應更新的欄位。至少須指定一個欄位。根 |
id |
必要欄位。要更新的欄位。 |
properties |
必要欄位。基本欄位屬性。 |
UpdateFieldTypeRequest
要求變更欄位類型。
JSON 表示法 |
---|
{ "updateMask": string, "id": string, // Union field |
欄位 | |
---|---|
updateMask |
要更新的欄位。至少須指定一個欄位。 |
id |
必要欄位。要更新的欄位。 |
聯集欄位
|
|
textOptions |
將欄位更新為「Text」。 |
longTextOptions |
將欄位更新為「長文字」。 |
integerOptions |
將欄位更新為整數。 |
dateOptions |
將欄位更新為日期。 |
selectionOptions |
將欄位更新為「Selection」。 |
userOptions |
將欄位更新為 User。 |
LongTextOptions
選取長文字欄位類型。
JSON 表示法 |
---|
{ "minLength": integer, "maxLength": integer } |
欄位 | |
---|---|
minLength |
僅供輸出。文字欄位值的最小有效長度。 |
maxLength |
僅供輸出。文字欄位值的有效長度上限。 |
EnableFieldRequest
要求啟用該欄位。
JSON 表示法 |
---|
{ "id": string } |
欄位 | |
---|---|
id |
必要欄位。要啟用的欄位 ID。 |
DisableFieldRequest
要求停用欄位。
JSON 表示法 |
---|
{
"updateMask": string,
"id": string,
"disabledPolicy": {
object ( |
欄位 | |
---|---|
updateMask |
應更新的欄位。至少須指定一個欄位。根層級 |
id |
必要欄位。要停用的欄位鍵。 |
disabledPolicy |
必要欄位。欄位停用政策。 |
DeleteFieldRequest
要求刪除欄位。
JSON 表示法 |
---|
{ "id": string } |
欄位 | |
---|---|
id |
必要欄位。要刪除的欄位 ID。 |
CreateSelectionChoiceRequest
要求建立 Selection Choice。
JSON 表示法 |
---|
{
"fieldId": string,
"choice": {
object ( |
欄位 | |
---|---|
fieldId |
必要欄位。選擇建立選項的選項欄位。 |
choice |
必要欄位。要建立的選項。 |
UpdateSelectionChoicePropertiesRequest
要求更新 Choice 屬性。
JSON 表示法 |
---|
{
"updateMask": string,
"fieldId": string,
"id": string,
"properties": {
object ( |
欄位 | |
---|---|
updateMask |
應更新的欄位。至少須指定一個欄位。根 |
fieldId |
必要欄位。要更新的選取欄位。 |
id |
必要欄位。選擇更新。 |
properties |
必要欄位。要更新的 Choice 屬性。 |
EnableSelectionChoiceRequest
要求啟用 Choice。
JSON 表示法 |
---|
{ "fieldId": string, "id": string } |
欄位 | |
---|---|
fieldId |
必要欄位。要啟用選項的「選取」欄位。 |
id |
必要欄位。啟用選項。 |
DisableSelectionChoiceRequest
要求停用某個選項。
JSON 表示法 |
---|
{
"updateMask": string,
"fieldId": string,
"id": string,
"disabledPolicy": {
object ( |
欄位 | |
---|---|
updateMask |
應更新的欄位。至少須指定一個欄位。根層級 |
fieldId |
必要欄位。選擇停用選項的選取欄位。 |
id |
必要欄位。停用選項。 |
disabledPolicy |
必要欄位。要更新的已停用政策。 |
DeleteSelectionChoiceRequest
要求刪除選項。
JSON 表示法 |
---|
{ "fieldId": string, "id": string } |
欄位 | |
---|---|
fieldId |
必要欄位。要刪除選項的「選取項目」欄位。 |
id |
必要欄位。選擇刪除。 |
回應
更新內容的單一回應。
JSON 表示法 |
---|
{ // Union field |
欄位 | |
---|---|
聯集欄位 response 。對應要求的回應。response 只能是下列其中一項: |
|
updateLabel |
更新標籤的基本屬性。 |
createField |
建立新欄位。 |
updateField |
更新欄位的基本屬性。 |
updateFieldType |
更新欄位類型和/或類型選項。 |
enableField |
啟用欄位。 |
disableField |
停用欄位。 |
deleteField |
從標籤中刪除欄位。 |
createSelectionChoice |
建立新的選項清單選項,以便新增至選項欄位。 |
updateSelectionChoiceProperties |
更新選項欄位中的選項。 |
enableSelectionChoice |
在「Selection Field」中啟用「Choice」。 |
disableSelectionChoice |
停用選項欄位中的 Choice。 |
deleteSelectionChoice |
從選項欄位中刪除選項。 |
UpdateLabelPropertiesResponse
這個類型沒有任何欄位。
更新標籤屬性後的回應。
CreateFieldResponse
欄位建立後回應。
JSON 表示法 |
---|
{ "id": string, "priority": integer } |
欄位 | |
---|---|
id |
建立的欄位。如果在建立要求中留空,系統會自動產生金鑰,並在這裡顯示。 |
priority |
建立的欄位優先順序。優先順序可能會變更,以確保欄位之間的優先順序連續 (1-n)。 |
UpdateFieldPropertiesResponse
更新欄位屬性後的回應。
JSON 表示法 |
---|
{ "priority": integer } |
欄位 | |
---|---|
priority |
更新欄位的優先順序。優先順序可能會不同於指定的值,以確保欄位之間連續的優先順序 (1-n)。 |
UpdateFieldTypeResponse
這個類型沒有任何欄位。
更新欄位類型後的回應。
EnableFieldResponse
這個類型沒有任何欄位。
啟用回應欄位。
DisableFieldResponse
這個類型沒有任何欄位。
回應欄位停用。
DeleteFieldResponse
這個類型沒有任何欄位。
依欄位刪除回應。
CreateSelectionChoiceResponse
建立選項後的回應。
JSON 表示法 |
---|
{ "fieldId": string, "id": string } |
欄位 | |
---|---|
fieldId |
伺服器產生的欄位 ID。 |
id |
伺服器針對欄位內所建立選項的伺服器產生的 ID |
UpdateSelectionChoicePropertiesResponse
更新 Selection Choice 屬性後的回應。
JSON 表示法 |
---|
{ "priority": integer } |
欄位 | |
---|---|
priority |
更新選項的優先順序。系統可能會變更指定的優先順序,確保選項之間的優先順序連續 (1-n)。 |
EnableSelectionChoiceResponse
這個類型沒有任何欄位。
回應選擇啟用。
DisableSelectionChoiceResponse
這個類型沒有任何欄位。
選擇停用後回應。
DeleteSelectionChoiceResponse
這個類型沒有任何欄位。
按下「刪除」後回覆的內容。