遍历授权码特征项
请求地址: GET /sns/{sn}/features
接口说明
- 查询授权码关联的特征项。
请求参数
-
Query
参数名 类型 必需 示例值 说明 offset integer 否 0 起始下标 limit integer 否 50 范围(≤1000,默认50) -
Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码
请求示例
GET https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features?offset=0&limit=10
bitkey: xxx
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 25,
"name": "web-feature-1",
"featureId": 1,
"value": 0,
"source": "PRODUCT"
}
]
}
}
批量更新特征项
请求地址: POST /sns/{sn}/features
接口说明
- 批量更新授权码关联特征项,同时更新所有属性,未指定的属性会被重置。
- 返回修改成功的特征项列表。
请求参数
-
Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 -
Body
参数名 类型 必需 中文名 id integer 是 特征项ID name string 是 名称 version string 是 特征项版本 endDate string 是 结束时间,“yyyy-MM-dd”或“yyyy-MM-dd hh:mm:ss” expirationDays integer 是 有效期天数 users integer 是 用户数
注:请求体需以数组形式输入
请求示例
POST https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features
bitkey: xxx
Content-Type: application/json
[
{
"id": 25,
"name": "web-feature-1",
"value": 12
}
]
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 25,
"name": "web-feature-1",
"featureId": 1,
"value": 12,
"source": "PRODUCT"
}
]
}
}
批量更新授权码的特征项
请求地址: PATCH /sns/{sn}/features
接口说明
- 批量更新授权码关联特征项。
- 返回修改成功的特征项列表。
- 此接口仅处理有有效值的节点,不会更改其他属性。
请求参数
-
Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 -
Body
参数名 类型 必需 中文名 id integer 否 特征项ID name string 否 名称 version string 否 特征项版本 endDate string 否 结束时间,“yyyy-MM-dd”或“yyyy-MM-dd hh:mm:ss” expirationDays integer 否 有效期天数 users integer 否 用户数
注:请求体需以数组形式输入
请求示例
PATCH https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features
bitkey: xxx
Content-Type: application/json
[
{
"id": 25,
"name": "web-feature-1",
"value": 12
}
]
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 25,
"name": "web-feature-1",
"featureId": 1,
"value": 12,
"source": "PRODUCT"
}
]
}
}
批量删除特征项
请求地址: DELETE /sns/{sn}/features
接口说明
- 批量删除授权码关联特征项,仅取消选择,不影响产品和模版。
- 返回删除成功的特征项列表。
请求参数
-
Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 -
Body
参数名 类型 必需 中文名 id integer 否 特征项ID
注:请求体需以数组形式输入。
请求示例
DELETE https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features
bitkey: xxx
Content-Type: application/json
[
{
"id": 27
}
]
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27
}
]
}
}
检索授权码特征项
请求地址: POST /sns/{sn}/features/data
接口说明
- 按条件检索授权码关联的特征项。
请求参数
-
Query
参数名 类型 必需 示例值 说明 offset integer 否 0 起始下标 limit integer 否 50 范围(≤1000,默认50) -
Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 -
Body
参数名 类型 必需 中文名 querys array 否 查询条件 sorts array 否 排序条件
支持的参数如下表所示
参数名 类型 检索类型 必需 中文名 id integer sort 否 特征项ID name string query|sort 否 特征项名称 featureId integer sort 否 FID version string sort 否 特征项版本
请求示例
POST https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features/data?offset=0&limit=3
bitkey: xxx
Content-Type: application/json
{
"querys": [
{
"name": "name",
"op": "=",
"values": [
"rw-feature-3"
]
}
]
}
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27,
"name": "rw-feature-3",
"featureId": 3,
"expirationDays": 0,
"users": 0,
"value": 11,
"source": "SN"
}
]
}
}
使用ID获取一个特征项
请求地址: GET /sns/{sn}/features/{uid}
接口说明
- 根据ID查询授权码关联的特征项。
请求参数
- Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 uid integer 是 1 特征项ID
请求示例
GET https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features/27
bitkey: xxx
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27,
"name": "rw-feature-3",
"featureId": 3,
"expirationDays": 0,
"users": 0,
"value": 11,
"source": "SN"
}
]
}
}
更新指定ID的特征项的全部信息
请求地址: POST /sns/{sn}/features/{uid}
接口说明
- 更新授权码关联的特征项,同时更新所有属性信息。
- 返回更新成功后的特征项。
请求参数
-
Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 id integer 是 1 特征项ID -
Body
参数名 类型 必需 中文名 endDate string 否 结束日期 expirationDays integer 否 有效期 users integer 否 用户数 value integer 否 值 version string 否 版本
请求示例
POST https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features/27
bitkey: xxx
Content-Type: application/json
{
"expirationDays": 30,
"users": 10,
"value": 7
}
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27,
"name": "rw-feature-3",
"featureId": 3,
"expirationDays": 30,
"users": 10,
"value": 7,
"source": "SN"
}
]
}
}
更新指定ID的特征项
请求地址: PATCH /sns/{sn}/features/{uid}
接口说明
- 更新授权码关联的特征项,此接口仅处理有有效值的节点,不会更改其他属性。
请求参数
-
Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 id integer 是 1 特征项ID -
Body
参数名 类型 必需 中文名 endDate string 否 结束日期 expirationDays integer 否 有效期 users integer 否 用户数 value integer 否 值 version string 否 版本
请求示例
PATCH https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features/27
bitkey: xxx
Content-Type: application/json
{
"expirationDays": 30,
"users": 10,
"value": 7
}
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27,
"name": "rw-feature-3",
"featureId": 3,
"expirationDays": 30,
"users": 10,
"value": 7,
"source": "SN"
}
]
}
}
使用ID删除一个特征项
请求地址: DELETE /sns/{sn}/features/{uid}
接口说明
- 删除授权码关联的特征项,仅取消与授权码的关联,不影响产品和模版。
- 返回删除成功后的特征项。
请求参数
- Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 id integer 是 1 特征项ID
请求示例
DELETE https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features/27
bitkey: xxx
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27
}
]
}
}
使用FID获取一个特征项
请求地址: GET /sns/{sn}/features/fid/{fid}
接口说明
- 根据FID查询授权码关联的特征项。
请求参数
- Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 fid integer 是 1 FID
请求示例
GET https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features/fid/3
bitkey: xxx
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27,
"name": "rw-feature-3",
"featureId": 3,
"expirationDays": 0,
"users": 0,
"value": 11,
"source": "SN"
}
]
}
}
使用FID删除一个特征项
请求地址: DELETE /sns/{sn}/features/fid/{fid}
接口说明
- 根据FID解除授权码关联的特征项绑定。
请求参数
- Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 fid integer 是 1 FID
请求示例
DELETE https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features/fid/3
bitkey: xxx
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27
}
]
}
}
使用名称获取特征项
请求地址: GET /sns/{sn}/features/name/{name}
接口说明
- 根据特征项名称查询授权码关联的特征项。
请求参数
- Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 name string 是 feature_name 特征项名称
请求示例
GET https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxxx/features/name/rw-feature-3
bitkey: xxx
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27,
"name": "rw-feature-3",
"featureId": 3,
"expirationDays": 0,
"users": 0,
"value": 11,
"source": "SN"
}
]
}
}
使用名称删除特征项
请求地址: DELETE /sns/{sn}/features/name/{name}
接口说明
- 删除授权码关联的特征项,仅取消与授权码的关联,不影响产品和模版。
请求参数
- Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 name string 是 feature_name 特征项名称
请求示例
DELETE https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/features/name/rw-feature-3
bitkey: xxx
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27
}
]
}
}
获取特定版本的特征项
请求地址: GET /sns/{sn}/features/name/{name}/version/{version}
接口说明
- 根据特征项名称和版本查询授权码关联的特征项。
请求参数
- Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 name string 是 feature_name 特征项名称 version string 是 1.1 版本
请求示例
GET https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxxx/features/name/web-feature-1/version/1.1
bitkey: xxx
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 25,
"name": "web-feature-1",
"featureId": 1,
"version": "1.1",
"source": "SN"
}
]
}
}
删除特定版本的特征项
请求地址: DELETE /sns/{sn}/features/name/{name}/version/{version}
接口说明
- 根据特征项名称和版本解除授权码关联的特征项绑定。
请求参数
- Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 name string 是 feature_name 特征项名称 version string 是 1.1 版本
请求示例
DELETE https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxxx/features/name/rw-feature-3/versions/1.1
bitkey: xxx
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"id": 27
}
]
}
}