擷取定義這項產品可設定屬性的結構定義。所有產品都有結構定義,但如果未定義受管理的設定,這個結構定義可能會空白。這個結構定義可用於填入 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) ] } ] }
屬性名稱 | 價值 | 說明 | 附註 |
---|---|---|---|
restrictions[] |
list |
構成這個結構定義的限制組合。 | |
restrictions[].key |
string |
產品用來識別限制的專屬金鑰,例如「com.google.android.gm.fieldname」。 | |
restrictions[].title |
string |
限制的名稱。 | |
restrictions[].restrictionType |
string |
限制的類型。 可接受的值為:
|
|
restrictions[].description |
string |
較長的限制說明,並詳細說明限制的影響。 | |
restrictions[].entry[] |
list |
如為 choice 或 multiselect 限制,則會列出可能易讀的項目名稱清單。 |
|
restrictions[].entryValue[] |
list |
如為 choice 或 multiselect 限制,則會列出可供機器讀取的值清單。這些值應用於設定,不論是 choice 限制的單一 string 值,還是 multiselect 限制的 stringArray 中皆可使用。 |
|
restrictions[].defaultValue |
nested object |
限制的預設值。bundle 和 bundleArray 限制一律沒有預設值。 |
|
restrictions[].defaultValue.type |
string |
提供的值類型。
可接受的值為:
|
|
restrictions[].defaultValue.valueBool |
boolean |
布林值 - 只有在類型為 bool 時才會出現。 | |
restrictions[].defaultValue.valueString |
string |
字串值 - 會顯示在類型字串、選項和隱藏中。 | |
restrictions[].defaultValue.valueInteger |
integer |
整數值 - 只有在類型為整數時才會顯示這個值。 | |
restrictions[].defaultValue.valueMultiselect[] |
list |
字串值清單:只有在類型為複選時才會顯示。 | |
restrictions[].nestedRestriction[] |
list |
如果是 bundle 或 bundleArray 限制,則會列出巢狀限制清單。bundle 限制一律以巢狀形式置於 bundleArray 限制中,bundleArray 限制則最多為兩個層級。 |
|
kind |
string |
已淘汰。 |