# Method: limits.getLabel

- [HTTP request](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#body.request_body)
- [Response body](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#body.response_body)
  - [JSON representation](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#body.LabelLimits.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#body.aspect)
- [FieldLimits](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#FieldLimits)
  - [JSON representation](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#FieldLimits.SCHEMA_REPRESENTATION)
- [TextLimits](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#TextLimits)
  - [JSON representation](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#TextLimits.SCHEMA_REPRESENTATION)
- [LongTextLimits](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#LongTextLimits)
  - [JSON representation](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#LongTextLimits.SCHEMA_REPRESENTATION)
- [IntegerLimits](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#IntegerLimits)
  - [JSON representation](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#IntegerLimits.SCHEMA_REPRESENTATION)
- [DateLimits](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#DateLimits)
  - [JSON representation](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#DateLimits.SCHEMA_REPRESENTATION)
- [UserLimits](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#UserLimits)
  - [JSON representation](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#UserLimits.SCHEMA_REPRESENTATION)
- [ListLimits](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#ListLimits)
  - [JSON representation](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#ListLimits.SCHEMA_REPRESENTATION)
- [SelectionLimits](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#SelectionLimits)
  - [JSON representation](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#SelectionLimits.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#try-it)

Get the constraints on the structure of a label; such as, the maximum number of fields allowed and maximum length of the label title.

### HTTP request

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

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `name` | `string` Required. Label revision resource name must be: "limits/label". |

### Request body

The request body must be empty.

### Response body

Label constraints governing the structure of a label; such as, the maximum number of fields allowed and maximum length of the label title.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "name": string, "maxTitleLength": integer, "maxDescriptionLength": integer, "maxFields": integer, "maxDeletedFields": integer, "maxDraftRevisions": integer, "fieldLimits": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#FieldLimits`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Resource name. |
| `maxTitleLength` | `integer` The maximum number of characters allowed for the title. |
| `maxDescriptionLength` | `integer` The maximum number of characters allowed for the description. |
| `maxFields` | `integer` The maximum number of fields allowed within the label. |
| `maxDeletedFields` | `integer` The maximum number of published fields that can be deleted. |
| `maxDraftRevisions` | `integer` The maximum number of draft revisions that will be kept before deleting old drafts. |
| `fieldLimits` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#FieldLimits`)`` The limits for fields. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `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`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).

## FieldLimits

Field constants governing the structure of a field; such as, the maximum title length, minimum and maximum field values or length, etc.

| JSON representation |
|---|
| ``` { "maxIdLength": integer, "maxDisplayNameLength": integer, "maxDescriptionLength": integer, "textLimits": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#TextLimits`) }, "longTextLimits": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#LongTextLimits`) }, "integerLimits": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#IntegerLimits`) }, "dateLimits": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#DateLimits`) }, "userLimits": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#UserLimits`) }, "selectionLimits": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#SelectionLimits`) } } ``` |

| Fields ||
|---|---|
| `maxIdLength` | `integer` Maximum length for the id. |
| `maxDisplayNameLength` | `integer` Limits for field title. |
| `maxDescriptionLength` | `integer` Limits for field description, also called help text. |
| `textLimits` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#TextLimits`)`` The relevant limits for the specified Field.Type. Text field limits. |
| `longTextLimits` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#LongTextLimits`)`` Long text field limits. |
| `integerLimits` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#IntegerLimits`)`` Integer field limits. |
| `dateLimits` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#DateLimits`)`` Date field limits. |
| `userLimits` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#UserLimits`)`` User field limits. |
| `selectionLimits` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#SelectionLimits`)`` Selection field limits. |

## TextLimits

Limits for text field type.

| JSON representation |
|---|
| ``` { "minLength": integer, "maxLength": integer } ``` |

| Fields ||
|---|---|
| `minLength` | `integer` Minimum length allowed for a text field type. |
| `maxLength` | `integer` Maximum length allowed for a text field type. |

## LongTextLimits

Limits for long text field type.

| JSON representation |
|---|
| ``` { "minLength": integer, "maxLength": integer } ``` |

| Fields ||
|---|---|
| `minLength` | `integer` Minimum length allowed for a long text field type. |
| `maxLength` | `integer` Maximum length allowed for a long text field type. |

## IntegerLimits

Limits for integer field type.

| JSON representation |
|---|
| ``` { "minValue": string, "maxValue": string } ``` |

| Fields ||
|---|---|
| `minValue` | `string (https://developers.google.com/discovery/v1/type-format format)` Minimum value for an integer field type. |
| `maxValue` | `string (https://developers.google.com/discovery/v1/type-format format)` Maximum value for an integer field type. |

## DateLimits

Limits for date field type.

| JSON representation |
|---|
| ``` { "minValue": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/labels#Date`) }, "maxValue": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/labels#Date`) } } ``` |

| Fields ||
|---|---|
| `minValue` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/labels#Date`)`` Minimum value for the date field type. |
| `maxValue` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/labels#Date`)`` Maximum value for the date field type. |

## UserLimits

Limits for Field.Type.USER.

| JSON representation |
|---|
| ``` { "listLimits": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#ListLimits`) } } ``` |

| Fields ||
|---|---|
| `listLimits` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#ListLimits`)`` Limits for list-variant of a field type. |

## ListLimits

Limits for list-variant of a field type.

| JSON representation |
|---|
| ``` { "maxEntries": integer } ``` |

| Fields ||
|---|---|
| `maxEntries` | `integer` Maximum number of values allowed for the field type. |

## SelectionLimits

Limits for selection field type.

| JSON representation |
|---|
| ``` { "listLimits": { object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#ListLimits`) }, "maxIdLength": integer, "maxDisplayNameLength": integer, "maxChoices": integer, "maxDeletedChoices": integer } ``` |

| Fields ||
|---|---|
| `listLimits` | ``object (`https://developers.google.com/workspace/drive/labels/reference/rest/v2/limits/getLabel#ListLimits`)`` Limits for list-variant of a field type. |
| `maxIdLength` | `integer` Maximum ID length for a selection option. |
| `maxDisplayNameLength` | `integer` Maximum length for display name. |
| `maxChoices` | `integer` Maximum number of choices. |
| `maxDeletedChoices` | `integer` Maximum number of deleted choices. |