遍历用户的特征项
- 
请求地址: GET /users/user/{guid}/features
- 
接口概述: 遍历指定用户的特征项。 
- 
请求参数: 参数名 参数类型 参数说明 必需 备注 offset integer 响应结果起始下标 否 默认0 limit integer 响应结果的数量 否 默认50,最大1000 地址参数 参数名 参数类型 参数说明 必需 备注 guid string 用户唯一标识符 是 
- 
请求体: 无 
- 
请求示例: GET /bitanswer/api/users/user/{guid}/features HTTP/1.1 Host: back-office-api.bitanswer.cn bitkey: ••••••
- 
响应示例: { "status": 0, "data": { "total": 3, "items": [ { "name": "feature_name_1" }, { "name": "feature_name_2" }, { "name": "feature_name_3" } ] } }只返回特征项名称,total标识角色下特征项的总数,items只返回特征项的名称,当名称重复时会进行去重。 
为用户关联特征项
- 
请求地址: POST /users/user/{guid}/features
- 
接口概述: 给用户关联指定产品的指定模版下的指定名称的特征项,一次仅允许关联一个模版的特征项。已关联的不会重复关联,不属于本产品的特征项不会关联,返回用户在这个产品模版下关联的特征项名称列表。 
- 
请求参数: 地址参数 参数名 参数类型 参数说明 必需 备注 guid string 用户的唯一标识符 是 
- 
请求体: 参数名 参数类型 参数说明 必需 备注 productGuid string 产品的guid 是 templateName string 模版名称 是 features array 特征项名称列表 否 由string类型组成的数组。当数组是空时,不会绑定任何特征项。 
- 
请求示例: POST /bitanswer/api/users/user/{guid}/features HTTP/1.1 Host: back-office-api.bitanswer.cn Content-Type: application/json bitkey: •••••• { "productGuid":"xxxxxx", "templateName":"template_name", "features":[ "feature_name_1", "feature_name_2" ] }
- 
响应示例: { "status": 0, "data": { "total": 2, "items": [ { "name": "feature_name_1" }, { "name": "feature_name_2" }, { "name": "feature_name_3" }, { "name": "feature_name_4" } ] } }
取消用户关联的特征项
- 
请求地址: DELETE /users/user/{guid}/features
- 
接口概述: 给用户取消关联指定产品的指定模版下的指定名称的特征项,一次仅允许取消关联一个模版的特征项。未关联的进行忽略,返回用户在这个产品模版下关联的特征项名称列表。 
- 
请求参数: 地址参数 参数名 参数类型 参数说明 必需 备注 guid string 用户的唯一标识符 是 
- 
请求体: 参数名 参数类型 参数说明 必需 备注 productGuid string 产品的guid 是 templateName string 模版名称 是 features array 特征项名称列表 否 由string类型组成的数组。当数组是空时,不会绑定任何特征项。 
- 
请求示例: DELETE /bitanswer/api/users/user/{guid}/features HTTP/1.1 Host: back-office-api.bitanswer.cn Content-Type: application/json bitkey: •••••• { "productGuid":"xxxxxx", "templateName":"template_name", "features":[ "feature_name_1", "feature_name_2" ] }
- 
响应示例: { "status": 0, "data": { "total": 2, "items": [ { "name": "feature_name_3" }, { "name": "feature_name_4" } ] } }