Method: labels.delta

一連の更新リクエストを適用して単一のラベルを更新します。その結果、新しい下書きリビジョンになります。一括更新はオール オア ナッシングです。いずれかの更新リクエストが無効な場合、変更は適用されません。変更内容をドライブ アイテムで使用するには、事前に下書きのリビジョンを公開する必要があります。

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

詳細については、承認ガイドをご覧ください。

リクエスト

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

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)

Label プロパティを更新します。

createField

object (CreateFieldRequest)

新しいフィールドを作成します。

updateField

object (UpdateFieldPropertiesRequest)

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

updateFieldType

object (UpdateFieldTypeRequest)

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

enableField

object (EnableFieldRequest)

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

disableField

object (DisableFieldRequest)

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

deleteField

object (DeleteFieldRequest)

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

createSelectionChoice

object (CreateSelectionChoiceRequest)

選択フィールド内に選択項目を作成します。

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

フィールドのタイプを変更するリクエスト。

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)

フィールドを長いテキストに更新します。

integerOptions

object (IntegerOptions)

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

dateOptions

object (DateOptions)

フィールドを日付に更新します。

selectionOptions

object (SelectionOptions)

フィールドを [選択] に更新しました。

userOptions

object (UserOptions)

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

LongTextOptions

[Long Text] フィールド タイプのオプション。

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

選択肢を有効にするためのリクエスト。

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

string

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

id

string

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

DisableSelectionChoiceRequest

選択肢を無効にするためのリクエスト。

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

string (FieldMask format)

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

fieldId

string

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

id

string

必須。無効にする選択肢。

disabledPolicy

object (DisabledPolicy)

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

DeleteSelectionChoiceRequest

選択肢の削除をリクエストします。

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

string

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

id

string

必須。削除する選択肢。

レスポンス

アップデートからの単一のレスポンス。

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)

新しいフィールドを作成します。

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)

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

UpdateLabelPropertiesResponse

この型にはフィールドがありません。

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

CreateFieldResponse

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

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

string

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

priority

integer

作成されるフィールドの優先度。フィールド間の優先度が連続するように、指定された優先度から変更される場合があります(1~n)。

UpdateFieldPropertiesResponse

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

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

integer

更新されたフィールドの優先度。フィールド間の優先度が連続するように、指定された優先度から変更される場合があります(1~n)。

UpdateFieldTypeResponse

この型にはフィールドがありません。

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

EnableFieldResponse

この型にはフィールドがありません。

フィールドが有効になった後のレスポンス。

DisableFieldResponse

この型にはフィールドがありません。

フィールドの無効化後のレスポンス。

DeleteFieldResponse

この型にはフィールドがありません。

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

CreateSelectionChoiceResponse

選択の選択に続く回答。

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

string

サーバーで生成されたフィールドの ID。

id

string

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

UpdateSelectionChoicePropertiesResponse

選択選択プロパティの更新後のレスポンス。

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

integer

更新された選択肢の優先度。選択肢(1~n)間の優先度が連続するように、優先度は指定された値から変更される場合があります。

EnableSelectionChoiceResponse

この型にはフィールドがありません。

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

DisableSelectionChoiceResponse

この型にはフィールドがありません。

選択内容の無効化後のレスポンス。

DeleteSelectionChoiceResponse

この型にはフィールドがありません。

選択肢の削除後の回答。