Products: getAppRestrictionsSchema

检索定义此产品的可配置属性的架构。所有产品都有架构,但如果未定义托管配置,此架构可能为空。此架构可用于填充允许管理员配置产品的界面。如需根据使用此 API 获取的架构应用托管配置,请参阅通过 Play 管理托管配置

请求

HTTP 请求

GET https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/products/productId/appRestrictionsSchema

参数

参数名称 说明
路径参数
enterpriseId string 企业 ID。
productId string 商品的 ID。
可选的查询参数
language string 用户首选语言的 BCP47 标记(例如“en-US”、“de”)。

授权

此请求需要获得以下范围的授权:

范围
https://www.googleapis.com/auth/androidenterprise

如需了解详情,请参阅身份验证和授权页面。

请求正文

使用此方法时请勿提供请求正文。

响应

如果成功,此方法将返回采用以下结构的响应正文:

{
  "kind": string,
  "restrictions": [
    {
      "key": string,
      "title": string,
      "restrictionType": string,
      "description": string,
      "entry": [
        string
      ],
      "entryValue": [
        string
      ],
      "defaultValue": {
        "type": string,
        "valueBool": boolean,
        "valueString": string,
        "valueInteger": integer,
        "valueMultiselect": [
          string
        ]
      },
      "nestedRestriction": [
        (AppRestrictionsSchemaRestriction)
      ]
    }
  ]
}
属性名称 说明 备注
restrictions[] list 构成此架构的一组限制条件。
restrictions[].key string 产品用于标识限制的唯一键,例如“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 对于 choicemultiselect 限制,可能的条目的人类可读名称列表。
restrictions[].entryValue[] list 对于 choicemultiselect 限制,可能的条目的机器可读值列表。这些值应在配置中使用,作为单个 string 值用于 choice 限制,或在 stringArray 中用于 multiselect 限制。
restrictions[].defaultValue nested object 限制的默认值。bundlebundleArray 限制从来没有默认值。
restrictions[].defaultValue.type string 所提供的值的类型。

可接受的值:
  • bool
  • bundle
  • bundleArray
  • choice
  • hidden
  • integer
  • multiselect
  • string
restrictions[].defaultValue.valueBool boolean 布尔值 - 仅当类型为布尔值时,此字段才会显示。
restrictions[].defaultValue.valueString string 字符串值 - 该值将针对类型字符串、选择项和隐藏项显示。
restrictions[].defaultValue.valueInteger integer 整数值 - 仅当类型为整数时,此字段才会显示。
restrictions[].defaultValue.valueMultiselect[] list 字符串值列表 - 仅当类型为多选时,此字段才会显示。
restrictions[].nestedRestriction[] list 对于 bundlebundleArray 限制,则为嵌套限制列表。bundle 限制始终嵌套在 bundleArray 限制内,而 bundleArray 限制的深度最多为两层。
kind string 已弃用。