更新时间:2023-09-18 GMT+08:00
分享

查询流量池列表

功能介绍

查询流量池列表

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v1/sim-pools

表1 Query参数

参数

是否必选

参数类型

描述

pool_name

String

流量池名称

最大长度:100

limit

Long

分页查询时每页显示的记录数,默认值为10,取值范围为10-500的整数

最小值:10

最大值:500

缺省值:10

offset

Long

分页查询时的页码数,默认值为1,取值范围为1-1000000的整数

最小值:1

最大值:1000000

缺省值:1

billing_cycle

String

账期,例如:2021-04

最小长度:7

最大长度:7

all_billing_cycle

Boolean

是否查询近六个月账期标识

缺省值:false

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。通过调用IAM服务 获取IAM用户Token接口获取,接口返回的响应消息头中“X-Subject-Token”就是需要获取的用户Token。简要的获取方法样例请参见 Token认证

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

limit

Long

每页记录数

offset

Long

页码

count

Long

当前查询条件的流量池总数

pools

Array of SimPoolVO objects

当前页的流量池记录列表

表4 SimPoolVO

参数

参数类型

描述

id

Long

流量池标识

pool_name

String

流量池名称

最大长度:100

price_plan_name

String

套餐名称

最大长度:128

price_plan_id

String

套餐标识

最大长度:36

effective_time

String

生效时间

expired_time

String

失效时间

billing_cycle

String

账期

最大长度:7

flow_total

Double

可用流量(查询账期所在月份),单位MB

最小值:0

flow_used

Double

已用流量(查询账期所在月份), 单位MB

最小值:0

flow_left

Double

剩余流量(查询账期所在月份), 单位MB

最小值:0

quantity

Integer

流量池成员数量

modify_time

String

更新时间

order_id

Long

批次号

activated_sim_quantity

Integer

已激活成员数量

inactive_sim_quantity

Integer

未激活成员数量

disassembled_sim_quantity

Integer

已拆机成员数量

order_ids

String

组成流量池的批次号列表

最大长度:400

状态码: 400

表5 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最大长度:64

error_msg

String

错误描述

最大长度:512

状态码: 403

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最大长度:64

error_msg

String

错误描述

最大长度:512

状态码: 500

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最大长度:64

error_msg

String

错误描述

最大长度:512

请求示例

查询前向流量池列表,每页返回10条数据,从第1页开始。

GET https://{endpoint}/v1/sim-pools?offset=1&limit=10

响应示例

状态码: 200

OK

{
  "limit" : 10,
  "offset" : 1,
  "count" : 1,
  "pools" : [ {
    "id" : 1000000000,
    "pool_name" : "流量池名称",
    "price_plan_name" : "中国联通消费级每月30M联接服务(1年)",
    "price_plan_id" : "10000",
    "effective_time" : "2022-08-26T16:00:00.000+00:00",
    "expired_time" : "2022-09-26T15:59:59.000+00:00",
    "billing_cycle" : "2022-09",
    "flow_total" : 60,
    "flow_used" : 102.59,
    "flow_left" : -42.59,
    "quantity" : 100,
    "modify_time" : "2022-09-22T18:57:15.000+00:00",
    "order_id" : 100000000,
    "activated_sim_quantity" : 2,
    "inactive_sim_quantity" : 0,
    "disassembled_sim_quantity" : 98,
    "order_ids" : "1000000"
  } ]
}

状态码: 400

Bad Request

{
  "error_code" : "GSL.00010004",
  "error_msg" : "参数异常"
}

状态码: 403

Forbidden

{
  "error_code" : "GSL.00011004",
  "error_msg" : "账期不合法,请检查!"
}

状态码: 500

Internal Server Error

{
  "error_code" : "GSL.00010003",
  "error_msg" : "系统繁忙,请稍后重试。"
}

状态码

状态码

描述

200

OK

400

Bad Request

403

Forbidden

500

Internal Server Error

错误码

请参见错误码

分享:

    相关文档

    相关产品