Method: labels.delta

一連の更新リクエストを適用することで 1 つのラベルを更新し、新しい下書きリビジョンを作成します。バッチ アップデートはオール オア ナッシングです。無効なアップデート リクエストがある場合、変更は適用されません。作成された下書きのリビジョンは、ドライブのアイテムで変更を使用する前に公開する必要があります。

HTTP リクエスト

POST https://drivelabels.googleapis.com/v2/{name=labels/*}:delta

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

パスパラメータ

パラメータ
name

string

必須。更新するラベルのリソース名。

リクエスト本文

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

JSON 表現
{
  "writeControl": {
    object (WriteControl)
  },
  "requests": [
    {
      object (Request)
    }
  ],
  "useAdminAccess": boolean,
  "view": enum (LabelView),
  "languageCode": string
}
フィールド
writeControl

object (WriteControl)

書き込みリクエストの実行方法を制御します。

requests[]

object (Request)

ラベルに適用する更新のリスト。リクエストは指定された順序で適用されます。

useAdminAccess

boolean

ユーザーの管理者認証情報を使用するには、true に設定します。アクセスを許可する前に、サーバーがラベルの管理者であることを確認する。

view

enum (LabelView)

指定すると、指定されたビューに属する特定のフィールドのみが返されます。

languageCode

string

include_label_in_responsetrue の場合に、ローカライズされたフィールド ラベルを評価するために使用する BCP-47 言語コード。

レスポンスの本文

成功すると、レスポンスの本文に次の構造のデータが含まれます。

ラベル更新に対するレスポンス。

JSON 表現
{
  "responses": [
    {
      object (Response)
    }
  ],
  "updatedLabel": {
    object (Label)
  }
}
フィールド
responses[]

object (Response)

更新の応答。これにより更新と 1 対 1 で対応付けされますが、リクエストによってはレスポンスが空になる場合があります。

updatedLabel

object (Label)

更新適用後のラベル。これは、[BatchUpdateLabelResponse2.include_label_in_response] が true で、エラーがなかった場合にのみ設定されます。

承認スコープ

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

  • https://www.googleapis.com/auth/drive.labels
  • https://www.googleapis.com/auth/drive.admin.labels

詳しくは、承認ガイドをご覧ください。

リクエスト

ラベルに適用する単一の更新の種類。

JSON 表現
{

  // Union field kind can be only one of the following:
  "updateLabel": {
    object (UpdateLabelPropertiesRequest)
  },
  "createField": {
    object (CreateFieldRequest)
  },
  "updateField": {
    object (UpdateFieldPropertiesRequest)
  },
  "updateFieldType": {
    object (UpdateFieldTypeRequest)
  },
  "enableField": {
    object (EnableFieldRequest)
  },
  "disableField": {
    object (DisableFieldRequest)
  },
  "deleteField": {
    object (DeleteFieldRequest)
  },
  "createSelectionChoice": {
    object (CreateSelectionChoiceRequest)
  },
  "updateSelectionChoiceProperties": {
    object (UpdateSelectionChoicePropertiesRequest)
  },
  "enableSelectionChoice": {
    object (EnableSelectionChoiceRequest)
  },
  "disableSelectionChoice": {
    object (DisableSelectionChoiceRequest)
  },
  "deleteSelectionChoice": {
    object (DeleteSelectionChoiceRequest)
  }
  // End of list of possible types for union field kind.
}
フィールド
共用体フィールド kind。更新の種類。フィールドは 1 つだけ必要です。kind は次のいずれかになります。
updateLabel

object (UpdateLabelPropertiesRequest)

ラベルのプロパティを更新します。

createField

object (CreateFieldRequest)

新しい Field を作成します。

updateField

object (UpdateFieldPropertiesRequest)

フィールドの基本プロパティを更新します。

updateFieldType

object (UpdateFieldTypeRequest)

フィールド タイプやタイプのオプションを更新します。

enableField

object (EnableFieldRequest)

フィールドを有効にします。

disableField

object (DisableFieldRequest)

フィールドを無効にします。

deleteField

object (DeleteFieldRequest)

ラベルからフィールドを削除します。

createSelectionChoice

object (CreateSelectionChoiceRequest)

Selection フィールド内に Choice を作成します。

updateSelectionChoiceProperties

object (UpdateSelectionChoicePropertiesRequest)

選択フィールド内の Choice プロパティを更新します。

enableSelectionChoice

object (EnableSelectionChoiceRequest)

選択フィールド内の選択肢を有効にします。

disableSelectionChoice

object (DisableSelectionChoiceRequest)

選択フィールド内の選択肢を無効にします。

deleteSelectionChoice

object (DeleteSelectionChoiceRequest)

選択フィールド内の選択肢を削除します。

UpdateLabelPropertiesRequest

ラベルの基本プロパティを更新します。

JSON 表現
{
  "updateMask": string,
  "properties": {
    object (Properties)
  }
}
フィールド
updateMask

string (FieldMask format)

更新するフィールド。フィールドを少なくとも 1 つ指定する必要があります。ルート label_properties は暗黙のものであり、指定しないでください。1 つの * で、すべてのフィールドを更新するための省略形として使用できます。

properties

object (Properties)

必須。更新するラベルのプロパティ。

CreateFieldRequest

ラベル内にフィールドを作成するリクエスト。

JSON 表現
{
  "field": {
    object (Field)
  }
}
フィールド
field

object (Field)

必須。作成するフィールド。

UpdateFieldPropertiesRequest

フィールド プロパティを更新するためのリクエスト。

JSON 表現
{
  "updateMask": string,
  "id": string,
  "properties": {
    object (Properties)
  }
}
フィールド
updateMask

string (FieldMask format)

更新するフィールド。フィールドを少なくとも 1 つ指定する必要があります。ルート properties は暗黙のものであり、指定しないでください。1 つの * で、すべてのフィールドを更新するための省略形として使用できます。

id

string

必須。更新するフィールド。

properties

object (Properties)

必須。基本フィールドのプロパティ。

UpdateFieldTypeRequest

Field の型を変更するリクエスト。

JSON 表現
{
  "updateMask": string,
  "id": string,

  // Union field type_options can be only one of the following:
  "textOptions": {
    object (TextOptions)
  },
  "longTextOptions": {
    object (LongTextOptions)
  },
  "integerOptions": {
    object (IntegerOptions)
  },
  "dateOptions": {
    object (DateOptions)
  },
  "selectionOptions": {
    object (SelectionOptions)
  },
  "userOptions": {
    object (UserOptions)
  }
  // End of list of possible types for union field type_options.
}
フィールド
updateMask

string (FieldMask format)

更新するフィールド。フィールドを少なくとも 1 つ指定する必要があります。type_options のルートは暗黙のものであり、指定しないでください。1 つの * で、すべてのフィールドを更新するための省略形として使用できます。

id

string

必須。更新するフィールド。

共用体フィールド type_options

type_options は次のいずれかになります。

textOptions

object (TextOptions)

項目を [テキスト] に更新しました。

longTextOptions

object (LongTextOptions)

項目を Long Text に更新しました。

integerOptions

object (IntegerOptions)

フィールドを整数に更新します。

dateOptions

object (DateOptions)

項目を [日付] に更新します。

selectionOptions

object (SelectionOptions)

項目を「選択」に更新しました。

userOptions

object (UserOptions)

項目を [ユーザー] に更新。

LongTextOptions

長いテキスト フィールド タイプのオプション。

JSON 表現
{
  "minLength": integer,
  "maxLength": integer
}
フィールド
minLength

integer

出力のみ。テキスト フィールドの有効な値の最小長。

maxLength

integer

出力のみ。テキスト フィールドの値の有効な最大長。

EnableFieldRequest

フィールドを有効にするリクエスト。

JSON 表現
{
  "id": string
}
フィールド
id

string

必須。有効にするフィールドの ID。

DisableFieldRequest

フィールドを無効にするリクエスト。

JSON 表現
{
  "updateMask": string,
  "id": string,
  "disabledPolicy": {
    object (DisabledPolicy)
  }
}
フィールド
updateMask

string (FieldMask format)

更新するフィールド。フィールドを少なくとも 1 つ指定する必要があります。ルート disabledPolicy は暗黙のものであり、指定しないでください。1 つの * で、すべてのフィールドを更新するための省略形として使用できます。

id

string

必須。無効にするフィールドのキー。

disabledPolicy

object (DisabledPolicy)

必須。フィールド無効ポリシー。

DeleteFieldRequest

フィールドを削除するリクエスト。

JSON 表現
{
  "id": string
}
フィールド
id

string

必須。削除するフィールドの ID。

CreateSelectionChoiceRequest

選択選択肢を作成するリクエスト。

JSON 表現
{
  "fieldId": string,
  "choice": {
    object (Choice)
  }
}
フィールド
fieldId

string

必須。選択肢が作成される選択フィールド。

choice

object (Choice)

必須。作成する選択肢。

UpdateSelectionChoicePropertiesRequest

Choice プロパティを更新するリクエスト。

JSON 表現
{
  "updateMask": string,
  "fieldId": string,
  "id": string,
  "properties": {
    object (Properties)
  }
}
フィールド
updateMask

string (FieldMask format)

更新するフィールド。フィールドを少なくとも 1 つ指定する必要があります。ルート properties は暗黙のものであり、指定しないでください。1 つの * で、すべてのフィールドを更新するための省略形として使用できます。

fieldId

string

必須。更新する選択フィールド。

id

string

必須。更新する選択肢。

properties

object (Properties)

必須。更新する Choice プロパティ。

EnableSelectionChoiceRequest

Choice を有効にするリクエスト。

JSON 表現
{
  "fieldId": string,
  "id": string
}
フィールド
fieldId

string

必須。選択肢を有効にする選択フィールド。

id

string

必須。有効にするかどうかを選択します。

DisableSelectionChoiceRequest

Choice を無効にするリクエスト。

JSON 表現
{
  "updateMask": string,
  "fieldId": string,
  "id": string,
  "disabledPolicy": {
    object (DisabledPolicy)
  }
}
フィールド
updateMask

string (FieldMask format)

更新するフィールド。フィールドを少なくとも 1 つ指定する必要があります。ルート disabledPolicy は暗黙のものであり、指定しないでください。1 つの * で、すべてのフィールドを更新するための省略形として使用できます。

fieldId

string

必須。選択を無効にする選択フィールド。

id

string

必須。無効にするオプション。

disabledPolicy

object (DisabledPolicy)

必須。更新する無効なポリシー。

DeleteSelectionChoiceRequest

Choice を削除するリクエスト。

JSON 表現
{
  "fieldId": string,
  "id": string
}
フィールド
fieldId

string

必須。選択肢を削除する選択フィールド。

id

string

必須。削除するオプション。

レスポンス

更新に対する 1 つのレスポンス。

JSON 表現
{

  // Union field response can be only one of the following:
  "updateLabel": {
    object (UpdateLabelPropertiesResponse)
  },
  "createField": {
    object (CreateFieldResponse)
  },
  "updateField": {
    object (UpdateFieldPropertiesResponse)
  },
  "updateFieldType": {
    object (UpdateFieldTypeResponse)
  },
  "enableField": {
    object (EnableFieldResponse)
  },
  "disableField": {
    object (DisableFieldResponse)
  },
  "deleteField": {
    object (DeleteFieldResponse)
  },
  "createSelectionChoice": {
    object (CreateSelectionChoiceResponse)
  },
  "updateSelectionChoiceProperties": {
    object (UpdateSelectionChoicePropertiesResponse)
  },
  "enableSelectionChoice": {
    object (EnableSelectionChoiceResponse)
  },
  "disableSelectionChoice": {
    object (DisableSelectionChoiceResponse)
  },
  "deleteSelectionChoice": {
    object (DeleteSelectionChoiceResponse)
  }
  // End of list of possible types for union field response.
}
フィールド
共用体フィールド response。対応するリクエストのレスポンス。response は次のいずれかになります。
updateLabel

object (UpdateLabelPropertiesResponse)

ラベルの基本プロパティを更新しました。

createField

object (CreateFieldResponse)

新しい Field を作成します。

updateField

object (UpdateFieldPropertiesResponse)

フィールドの基本プロパティを更新します。

updateFieldType

object (UpdateFieldTypeResponse)

フィールド タイプやタイプのオプションを更新します。

enableField

object (EnableFieldResponse)

フィールドを有効にします。

disableField

object (DisableFieldResponse)

フィールドを無効にします。

deleteField

object (DeleteFieldResponse)

ラベルからフィールドを削除します。

createSelectionChoice

object (CreateSelectionChoiceResponse)

選択フィールドに追加する新しい選択リスト オプションを作成します。

updateSelectionChoiceProperties

object (UpdateSelectionChoicePropertiesResponse)

選択フィールド内の Choice を更新します。

enableSelectionChoice

object (EnableSelectionChoiceResponse)

選択フィールド内の選択肢を有効にします。

disableSelectionChoice

object (DisableSelectionChoiceResponse)

選択フィールド内の選択肢を無効にします。

deleteSelectionChoice

object (DeleteSelectionChoiceResponse)

選択フィールドから Choice を削除します。

UpdateLabelPropertiesResponse

ラベル プロパティの更新後のレスポンス。

CreateFieldResponse

フィールド作成後のレスポンス。

JSON 表現
{
  "id": string,
  "priority": integer
}
フィールド
id

string

作成されたフィールドのフィールド。作成リクエストで空白のままにすると、キーが自動生成され、ここで識別できます。

priority

integer

作成されたフィールドの優先度。優先度は、フィールド間で連続した優先度(1 ~ n)を保証するために、指定されたものから変更される場合があります。

UpdateFieldPropertiesResponse

フィールド プロパティを更新した後のレスポンス。

JSON 表現
{
  "priority": integer
}
フィールド
priority

integer

更新されたフィールドの優先度。優先度は、フィールド間で連続した優先度(1 ~ n)を保証するために、指定されたものから変更される場合があります。

UpdateFieldTypeResponse

フィールド タイプを更新した後のレスポンス。

EnableFieldResponse

フィールドを有効化した後のレスポンス。

DisableFieldResponse

フィールドに基づくレスポンスが無効になります。

DeleteFieldResponse

フィールド削除後のレスポンス。

CreateSelectionChoiceResponse

選択選択肢の作成後のレスポンス。

JSON 表現
{
  "fieldId": string,
  "id": string
}
フィールド
fieldId

string

サーバーが生成した、フィールドの ID。

id

string

サーバーで生成された、フィールド内に作成された選択肢の ID

UpdateSelectionChoicePropertiesResponse

Selection Choice プロパティの更新後のレスポンス。

JSON 表現
{
  "priority": integer
}
フィールド
priority

integer

更新された選択の優先度。優先順位は、1 ~ n の選択肢の間で連続した優先順位を保証するために、指定されたものから変更される場合があります。

EnableSelectionChoiceResponse

選択後のレスポンスを有効にします。

DisableSelectionChoiceResponse

選択後のレスポンスが無効になります。

DeleteSelectionChoiceResponse

Choice の削除後のレスポンス。