Method: limits.getLabel

获取对标签结构的约束条件;例如,允许的字段数量上限和标签标题的长度上限。

HTTP 请求

GET https://drivelabels.googleapis.com/v2/limits/label

网址采用 gRPC 转码语法。

查询参数

参数
name

string

必需。标签修订版本资源名称必须为“limits/label”

请求正文

请求正文必须为空。

响应正文

用于约束标签结构的标签约束条件;例如,允许的字段数量上限和标签标题的长度上限。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "name": string,
  "maxTitleLength": integer,
  "maxDescriptionLength": integer,
  "maxFields": integer,
  "maxDeletedFields": integer,
  "maxDraftRevisions": integer,
  "fieldLimits": {
    object (FieldLimits)
  }
}
字段
name

string

资源名称。

maxTitleLength

integer

标题的允许字符数上限。

maxDescriptionLength

integer

说明的字符数上限。

maxFields

integer

标签中允许的字段数量上限。

maxDeletedFields

integer

可以删除的已发布字段的数量上限。

maxDraftRevisions

integer

在删除旧草稿之前,系统会保留的草稿修订版本的数量上限。

fieldLimits

object (FieldLimits)

字段的限制。

授权范围

需要以下 OAuth 范围之一:

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

如需了解详情,请参阅授权指南

FieldLimits

用于管理字段结构的字段常量;例如,标题长度上限、字段值或长度下限和上限等。

JSON 表示法
{
  "maxIdLength": integer,
  "maxDisplayNameLength": integer,
  "maxDescriptionLength": integer,
  "textLimits": {
    object (TextLimits)
  },
  "longTextLimits": {
    object (LongTextLimits)
  },
  "integerLimits": {
    object (IntegerLimits)
  },
  "dateLimits": {
    object (DateLimits)
  },
  "userLimits": {
    object (UserLimits)
  },
  "selectionLimits": {
    object (SelectionLimits)
  }
}
字段
maxIdLength

integer

ID 的长度上限。

maxDisplayNameLength

integer

字段标题的限制。

maxDescriptionLength

integer

字段说明(也称为帮助文本)的限制。

textLimits

object (TextLimits)

指定 Field.Type 的相关限制。文本字段限制。

longTextLimits

object (LongTextLimits)

长文本字段限制。

integerLimits

object (IntegerLimits)

整数字段限制。

dateLimits

object (DateLimits)

日期字段限制。

userLimits

object (UserLimits)

用户字段限制。

selectionLimits

object (SelectionLimits)

选择字段限制。

TextLimits

文本字段类型的限制。

JSON 表示法
{
  "minLength": integer,
  "maxLength": integer
}
字段
minLength

integer

文本字段类型允许的最小长度。

maxLength

integer

文本字段类型允许的最大长度。

LongTextLimits

长文本字段类型的限制。

JSON 表示法
{
  "minLength": integer,
  "maxLength": integer
}
字段
minLength

integer

长文本字段类型允许的最小长度。

maxLength

integer

长文本字段类型的允许最大长度。

IntegerLimits

整数字段类型的限制。

JSON 表示法
{
  "minValue": string,
  "maxValue": string
}
字段
minValue

string (int64 format)

整数字段类型的最小值。

maxValue

string (int64 format)

整数字段类型的最大值。

DateLimits

日期字段类型的限制。

JSON 表示法
{
  "minValue": {
    object (Date)
  },
  "maxValue": {
    object (Date)
  }
}
字段
minValue

object (Date)

日期字段类型的最小值。

maxValue

object (Date)

日期字段类型的最大值。

UserLimits

Field.Type.USER 的限制。

JSON 表示法
{
  "listLimits": {
    object (ListLimits)
  }
}
字段
listLimits

object (ListLimits)

字段类型的列表变体的限制。

ListLimits

字段类型的列表变体的限制。

JSON 表示法
{
  "maxEntries": integer
}
字段
maxEntries

integer

字段类型允许的值数量上限。

SelectionLimits

选择字段类型的限制。

JSON 表示法
{
  "listLimits": {
    object (ListLimits)
  },
  "maxIdLength": integer,
  "maxDisplayNameLength": integer,
  "maxChoices": integer,
  "maxDeletedChoices": integer
}
字段
listLimits

object (ListLimits)

字段类型的列表变体的限制。

maxIdLength

integer

选择选项的 ID 长度上限。

maxDisplayNameLength

integer

显示名称的长度上限。

maxChoices

integer

选项数量上限。

maxDeletedChoices

integer

可删除的选项数量上限。