Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Получает схему, определяющую настраиваемые свойства этого продукта. У всех продуктов есть схема, но эта схема может быть пустой, если не определены управляемые конфигурации. Эту схему можно использовать для заполнения пользовательского интерфейса, который позволяет администратору настраивать продукт. Чтобы применить управляемую конфигурацию на основе схемы, полученной с помощью этого API, см. раздел «Управляемые конфигурации через Play» .
Запрос
HTTP-запрос
GET https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/products/productId/appRestrictionsSchema
Параметры
Имя параметра
Ценить
Описание
Параметры пути
enterpriseId
string
Идентификатор предприятия.
productId
string
Идентификатор продукта.
Необязательные параметры запроса
language
string
Тег BCP47 для предпочтительного языка пользователя (например, «en-US», «de»).
Авторизация
Этот запрос требует авторизации со следующей областью действия:
Уникальный ключ, который продукт использует для идентификации ограничения, например «com.google.android.gm.fieldname».
restrictions[]. title
string
Название ограничения.
restrictions[]. restrictionType
string
Тип ограничения.
Приемлемые значения:
" bool "
" bundle "
" bundleArray "
" choice "
" hidden "
" integer "
" multiselect "
" string "
restrictions[]. description
string
Более подробное описание ограничения с подробным описанием того, на что оно влияет.
restrictions[]. entry[]
list
Для ограничений choice или multiselect — список возможных удобочитаемых имен записей.
restrictions[]. entryValue[]
list
Для ограничений choice или multiselect — список возможных машиночитаемых значений записей. Эти значения следует использовать в конфигурации либо в виде одного string значения для ограничения choice , либо в виде stringArray для ограничения multiselect .
restrictions[]. defaultValue
nested object
Значение ограничения по умолчанию. Ограничения bundle и bundleArray никогда не имеют значения по умолчанию.
restrictions[].defaultValue. type
string
Тип предоставляемого значения.
Приемлемые значения:
" bool "
" bundle "
" bundleArray "
" choice "
" hidden "
" integer "
" multiselect "
" string "
restrictions[].defaultValue. valueBool
boolean
Логическое значение — оно будет присутствовать только в том случае, если тип — bool.
restrictions[].defaultValue. valueString
string
Строковое значение — оно будет присутствовать для типов string, choice и скрытого.
restrictions[].defaultValue. valueInteger
integer
Целочисленное значение — оно будет присутствовать только в том случае, если тип — целое число.
restrictions[].defaultValue. valueMultiselect[]
list
Список строковых значений — он будет присутствовать только в том случае, если тип является множественным выбором.
restrictions[]. nestedRestriction[]
list
Для ограничений bundle или bundleArray — список вложенных ограничений. Ограничение bundle всегда вложено в ограничение bundleArray , а ограничение bundleArray имеет глубину не более двух уровней.
[null,null,["Последнее обновление: 2025-07-24 UTC."],[[["\u003cp\u003eThis API retrieves the schema defining configurable properties for a product, enabling admin configuration through a UI.\u003c/p\u003e\n"],["\u003cp\u003eIt's deprecated and will be inaccessible after September 30, 2025; new integrations should refer to the recommended alternative.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidenterprise\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes details like restriction type, description, possible entries, default values, and nested restrictions.\u003c/p\u003e\n"]]],[],null,["# Products: getAppRestrictionsSchema\n\n| **Note:** Requires [authorization](#auth).\n\n\u003cbr /\u003e\n\n| **Deprecated:** New integrations cannot use this method and can refer to our [new\n| recommendations](/android/work/deprecations#recommended_alternative_4). \n| **This method will no longer be accessible by\n| anyone after September 30, 2025.**\nRetrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see [Managed Configurations through Play](/android/work/play/emm-api/managed-configurations).\n\n\u003cbr /\u003e\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/products/productId/appRestrictionsSchema\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|-----------------------------------------------------------------------|\n| **Path parameters** |||\n| `enterpriseId` | `string` | The ID of the enterprise. |\n| `productId` | `string` | The ID of the product. |\n| **Optional query parameters** |||\n| `language` | `string` | The BCP47 tag for the user's preferred language (e.g. \"en-US\", \"de\"). |\n\n### Authorization\n\nThis request requires authorization with the following scope:\n\n| Scope |\n|-----------------------------------------------------|\n| `https://www.googleapis.com/auth/androidenterprise` |\n\nFor more information, see the [authentication and authorization](/android/work/play/emm-api/v1/how-tos/authorizing) page.\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```carbon\n{\n \"kind\": string,\n \"restrictions\": [\n {\n \"key\": string,\n \"title\": string,\n \"restrictionType\": string,\n \"description\": string,\n \"entry\": [\n string\n ],\n \"entryValue\": [\n string\n ],\n \"defaultValue\": {\n \"type\": string,\n \"valueBool\": boolean,\n \"valueString\": string,\n \"valueInteger\": integer,\n \"valueMultiselect\": [\n string\n ]\n },\n \"nestedRestriction\": [\n (AppRestrictionsSchemaRestriction)\n ]\n }\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|--------------------------------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `restrictions[]` | `list` | The set of restrictions that make up this schema. | |\n| restrictions[].`key` | `string` | The unique key that the product uses to identify the restriction, e.g. \"com.google.android.gm.fieldname\". | |\n| restrictions[].`title` | `string` | The name of the restriction. | |\n| restrictions[].`restrictionType` | `string` | The type of the restriction. \u003cbr /\u003e Acceptable values are: - \"`bool`\" - \"`bundle`\" - \"`bundleArray`\" - \"`choice`\" - \"`hidden`\" - \"`integer`\" - \"`multiselect`\" - \"`string`\" | |\n| restrictions[].`description` | `string` | A longer description of the restriction, giving more detail of what it affects. | |\n| restrictions[].`entry[]` | `list` | For `choice` or `multiselect` restrictions, the list of possible entries' human-readable names. | |\n| restrictions[].`entryValue[]` | `list` | For `choice` or `multiselect` restrictions, the list of possible entries' machine-readable values. These values should be used in the configuration, either as a single `string` value for a `choice` restriction or in a `stringArray` for a `multiselect` restriction. | |\n| restrictions[].`defaultValue` | `nested object` | The default value of the restriction. `bundle` and `bundleArray` restrictions never have a default value. | |\n| restrictions[].defaultValue.`type` | `string` | The type of the value being provided. \u003cbr /\u003e Acceptable values are: - \"`bool`\" - \"`bundle`\" - \"`bundleArray`\" - \"`choice`\" - \"`hidden`\" - \"`integer`\" - \"`multiselect`\" - \"`string`\" | |\n| restrictions[].defaultValue.`valueBool` | `boolean` | The boolean value - this will only be present if type is bool. | |\n| restrictions[].defaultValue.`valueString` | `string` | The string value - this will be present for types string, choice and hidden. | |\n| restrictions[].defaultValue.`valueInteger` | `integer` | The integer value - this will only be present if type is integer. | |\n| restrictions[].defaultValue.`valueMultiselect[]` | `list` | The list of string values - this will only be present if type is multiselect. | |\n| restrictions[].`nestedRestriction[]` | `list` | For `bundle` or `bundleArray` restrictions, the list of nested restrictions. A `bundle` restriction is always nested within a `bundleArray` restriction, and a `bundleArray` restriction is at most two levels deep. | |\n| `kind` | `string` | Deprecated. | |"]]