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 限制,則會列出可能的項目機器可讀取的值這些值應用於設定,不論是 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 布林值 - 只有在類型為 bool 時才會出現。
restrictions[].defaultValue.valueString string 字串值 - 會顯示在類型字串、選項和隱藏中。
restrictions[].defaultValue.valueInteger integer 整數值 - 只有在類型為整數時才會顯示這個值。
restrictions[].defaultValue.valueMultiselect[] list 字串值清單:只有在類型為複選時才會顯示。
restrictions[].nestedRestriction[] list 如果是 bundlebundleArray 限制,則會列出巢狀限制清單。bundle 限制一律以巢狀形式置於 bundleArray 限制中,bundleArray 限制則最多為兩個層級。
kind string 已淘汰。