Users: setAvailableProductSet

<ph type="x-smartling-placeholder"> 修改用户有权访问的一组产品(称为 列入白名单的商品)。只有 已批准 或之前获得批准的商品(审批结果被撤消的商品) 可以列入白名单

请求

HTTP 请求

PUT https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/users/userId/availableProductSet

参数

参数名称 说明
路径参数
enterpriseId string 企业的 ID。
userId string 用户的 ID。

授权

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

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

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

请求正文

在请求正文中,请按以下结构提供数据:

{
  "kind": "androidenterprise#productSet",
  "productId": [
    string
  ],
  "productSetBehavior": string,
  "productVisibility": [
    {
      "productId": string,
      "tracks": [
        string
      ],
      "trackIds": [
        string
      ]
    }
  ]
}
属性名称 说明 备注
productId[] list 构成一组产品的产品 ID 列表。
productSetBehavior string 对此商品集的解释。“未知”绝不应发送;如果收到,则会被忽略。“白名单”表示用户有权访问此商品集。“includeAll”表示所有商品均可访问,包括获得批准的商品、审批结果被撤消的商品以及从未获得批准的商品。“allApproved”表示用户有权访问已获准用于企业的所有产品。如果值为“allApproved”或“includeAll”,系统会忽略 productId 字段。如果未提供任何值,系统会将其视为“白名单”以实现向后兼容性进一步显示“allApproved”或“includeAll”不自动显示“alpha”或“Beta 版”。使用 ProductVisibility 启用“alpha”或“Beta 版”曲目数。

可接受的值包括:
  • allApproved
  • includeAll
  • whitelist
productVisibility[] list 构成商品集的商品 ID 的附加列表。与 productID 数组不同,您可以在此列表中指定用户可以看到商品的哪些轨道(Alpha 版、Beta 版、正式版)。如需了解详情,请参阅 ProductVisibility 及其字段。不允许在此处和 productId 数组中指定相同的商品 ID,否则会导致错误。
productVisibility[].productId string 要向用户显示的商品 ID。对于 productVisibility 列表中的每个商品,此属性为必需属性。
productVisibility[].tracks[] list 已弃用。请改用 trackIds
productVisibility[].trackIds[] list 授予用户查看指定产品轨道(由 trackIds 标识)的公开范围。
kind string

响应

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

{
  "kind": "androidenterprise#productSet",
  "productId": [
    string
  ],
  "productSetBehavior": string,
  "productVisibility": [
    {
      "productId": string,
      "tracks": [
        string
      ],
      "trackIds": [
        string
      ]
    }
  ]
}
属性名称 说明 备注
productId[] list 构成一组产品的产品 ID 列表。
productSetBehavior string 对此商品集的解释。“未知”绝不应发送;如果收到,则会被忽略。“白名单”表示用户有权访问此商品集。“includeAll”表示所有商品均可访问,包括获得批准的商品、审批结果被撤消的商品以及从未获得批准的商品。“allApproved”表示用户有权访问已获准用于企业的所有产品。如果值为“allApproved”或“includeAll”,系统会忽略 productId 字段。如果未提供任何值,系统会将其视为“白名单”以实现向后兼容性进一步显示“allApproved”或“includeAll”不自动显示“alpha”或“Beta 版”。使用 ProductVisibility 启用“alpha”或“Beta 版”曲目数。

可接受的值包括:
  • allApproved
  • includeAll
  • whitelist
productVisibility[] list 构成商品集的商品 ID 的附加列表。与 productID 数组不同,您可以在此列表中指定用户可以看到商品的哪些轨道(Alpha 版、Beta 版、正式版)。如需了解详情,请参阅 ProductVisibility 及其字段。不允许在此处和 productId 数组中指定相同的商品 ID,否则会导致错误。
productVisibility[].productId string 要向用户显示的商品 ID。对于 productVisibility 列表中的每个商品,此属性为必需属性。
productVisibility[].tracks[] list 已弃用。请改用 trackIds
productVisibility[].trackIds[] list 授予用户查看指定产品轨道(由 trackIds 标识)的公开范围。
kind string