Products: getAppRestrictionsSchema

擷取用於定義此產品可設定屬性的結構定義。所有產品都有一個結構定義,但如果尚未定義任何受管理設定,這個結構定義可能為空白。這個結構定義可用於填入 UI,方便管理員設定產品。如要根據使用這個 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)
      ]
    }
  ]
}
屬性名稱 說明 Notes
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 限制,可能項目的機器可讀取值清單。這些值應用於設定,作為 choice 限制的單一 string 值,或在 multiselect 限制使用 stringArray 時使用。
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 已不適用。