云服务器内容精选

  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 limit Long 每页记录数 offset Long 页码 count Long 总数 sim_cards Array of SimDeviceVO objects sim卡数据集合 表4 SimDeviceVO 参数 参数类型 描述 sim_card_id Long sim卡id account_id String 账户id cid String 容器ID:不同类型卡含义如下 iccid(实体卡),eid(eSIM)cid(vSIM) sim_pool_id Long 流量池ID imei String 设备IMEI sim_status Integer sim卡状态: 10.可测试 11.未激活 13.可激活 14.已停用 20.在用 30.已拆机 device_status Integer 设备状态:1.注册 2.重启 3.在线 4.离线(该参数只有ESIM、VSIM返回,实体卡返回null) device_model String 设备模组(该参数只有ESIM、VSIM返回,实体卡返回null) act_date String 激活日期 例如2020-01-31T16:00:00.000Z device_status_date String 设备状态变更时间 例如2020-01-31T16:00:00.000Z(该参数只有ESIM、VSIM返回,实体卡返回null) node_id String 设备标识 iccid String 码号iccid network_type String 网络类型 dbm String 信号强度(该参数只有ESIM、VSIM返回,实体卡返回null) signal_level String 信号等级:1.差 2.良 3.优(该参数只有ESIM、VSIM返回,实体卡返回null) sim_type Integer sim卡类型 1.vSIM 2.eSIM 3.实体卡 tag_names String 标签名 order_id Long 批次号 expire_time String 到期时间 例如2021-06-30T00:00:00.000Z price_plan_name String 在用套餐名 sim_price_plan_id Long 套餐订购实例ID flow_left Double 剩余流量(单位M),数据默认截止到昨日24点。 flow_used Double 已用流量(单位M),数据默认截止到昨日24点。 operator_status Integer 运营商状态 -1.正常(非停机状态) 1.停机(超流量停机) 2.停机(超流量阈值停机) 3.停机(流量池停机) 4.停机(套餐到期停机) 5.停机(主动停机) 6.停机(违规停机) 7.停机(机卡分离停机) msisdn String MSISDN imsi String IMSI customer_attribute1 String 自定义属性一 customer_attribute2 String 自定义属性二 customer_attribute3 String 自定义属性三 customer_attribute4 String 自定义属性四 customer_attribute5 String 自定义属性五 customer_attribute6 String 自定义属性六 real_named Boolean 是否已实名认证: true表示是,false表示否,系统SIM卡实名认证状态非实时。 cut_net_flag Boolean 是否单独断网 true:断网,false:未断网 (当前只支持联通、移动的组池卡,电信卡不限制) exceed_cut_net_flag Boolean 是否达量断网 true:达量断网,false:未达量断网 (当前只支持联通、移动的组池卡,电信卡不限制) exceed_cut_net_quota Integer 达量断网阈值(单位MB 当前仅电信卡支持) imei_bind_remain_times Integer 本月机卡绑定剩余次数(当前仅电信卡支持) speed_value Integer 网络限制速率(单位Kbps,当前电信联通卡支持) 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "limit" : 10, "offset" : 1, "count" : 1, "sim_cards" : [ { "sim_card_id" : 4900000000000, "account_id" : "04eef84xxxxxxxxxxx", "cid" : "8986xxxxxxxxxx", "sim_pool_id" : 4940000000, "imei" : null, "sim_status" : 14, "device_status" : null, "device_model" : null, "act_date" : "2022-09-16T01:14:58.000+00:00", "device_status_date" : null, "node_id" : null, "iccid" : "8986xxxxxxxxxxx", "network_type" : null, "dbm" : null, "signal_level" : null, "sim_type" : 3, "tag_names" : null, "order_id" : 494000000000, "expire_time" : "2023-08-26T15:59:59.000+00:00", "price_plan_name" : "中国联通消费级每月30M联接服务(1年)", "sim_price_plan_id" : null, "flow_left" : 30, "flow_used" : 0, "operator_status" : 5, "msisdn" : "86xxxxxxxxx", "imsi" : "46xxxxxxxxxx", "customer_attribute1" : null, "customer_attribute2" : null, "customer_attribute3" : null, "customer_attribute4" : null, "customer_attribute5" : null, "customer_attribute6" : null, "real_named" : false, "cut_net_flag" : false, "exceed_cut_net_flag" : false, "exceed_cut_net_quota" : null, "imei_bind_remain_times" : null, "speed_value" : null } ] } 状态码: 400 Parameter Invalid { "error_code" : "GSL.00010004", "error_msg" : "参数异常" } 状态码: 403 Forbidden { "error_code" : "GSL.00016016", "error_msg" : "5分钟内不允许重复操作,请稍作等待。" } 状态码: 500 Internal Server Error { "error_code" : "GSL.00010003", "error_msg" : "系统繁忙,请稍后重试。" }
  • URI GET /v1/sim-cards 表1 Query参数 参数 是否必选 参数类型 描述 main_search_type 否 Integer 查询关键标识类型: 1.容器ID(不同类型卡含义如下:ICCID(实体卡),EID(eSIM)CID(vSIM)) 2.批次号 3.设备IMEI main_search_key 否 String 查询关键标识值:根据查询关键标识类型进行查询,例如想根据ICCID=xxx进行查询,则main_search_type=1&main_search_key=xxx limit 否 Long 分页查询时每页显示的记录数,默认值为10,取值范围为10-500的整数 offset 否 Long 分页查询时的页码数,默认值为1,取值范围为1-1000000的整数 sim_status 否 Integer sim卡状态: 10.可测试 11.未激活 13.可激活 14.已停用 20.在用 30.已拆机 device_status 否 Integer 设备状态: 1.注册 2.重启 3.在线 4.离线 tag_id 否 Array of longs 标签ID,最多支持传10个 sim_type 否 Integer sim卡类型: 1.vSIM 2.eSIM 3.实体卡 order 否 String 排序的顺序,asc表示顺序排序,desc表示倒序排序,不传则默认asc sort 否 String 排序的属性,目前支持:cid(容器ID)、flow_used(已用流量)、flow_left(剩余流量)、act_date(激活时间)、expire_time(到期时间) msisdn 否 String MSISDN customer_attribute1 否 String 自定义属性一 customer_attribute2 否 String 自定义属性二 customer_attribute3 否 String 自定义属性三 customer_attribute4 否 String 自定义属性四 customer_attribute5 否 String 自定义属性五 customer_attribute6 否 String 自定义属性六 min_used_flow 否 Long 最小使用流量(MB) max_used_flow 否 Long 最大使用流量(MB) min_left_flow 否 Long 最小剩余流量(MB) max_left_flow 否 Long 最大剩余流量(MB) real_named 否 Boolean 是否已实名认证: true表示是,false表示否,系统SIM卡实名认证状态非实时。 order_id 否 Long 订单号 filter_downtime_period 否 Boolean 是否过滤停机保号的卡 order_ids 否 Array of longs 订单批次号集合 price_plan_id 否 Array of strings 套餐id集合,最多支持传30个 pool_flag 否 Integer 流量池标识:0 不使用流量池,1 创建新前向流量池,2 加入已有前向流量池,11 创建新后向流量池,12 加入后向流量池
  • 请求示例 使用sim卡标识按月查询SIM卡的日用量 POST https://{endpoint}/v1/sim-cards/batch-daily-flow { "month" : "202408", "sim_card_ids" : [ 5702790861709056, 5702790861709057 ] } 使用容器ID按天查询SIM卡的日用量 POST https://{endpoint}/v1/sim-cards/batch-daily-flow { "date" : 20240821, "iccids" : [ "898600xxxxxxxxxx", "898601xxxxxxxxxx" ] }
  • 响应示例 状态码: 200 OK [ { "date" : "20240801", "sim_flow" : [ { "flow" : 0.98, "iccid" : "898600xxxxxxxxxx", "sim_card_id" : 5702790861709056 }, { "flow" : 1.0, "iccid" : "898601xxxxxxxxxx", "sim_card_id" : 5702790861709057 } ] }, { "date" : "20240802", "sim_flow" : [ { "flow" : 0.98, "iccid" : "898600xxxxxxxxxx", "sim_card_id" : 5702790861709056 }, { "flow" : 1.0, "iccid" : "898601xxxxxxxxxx", "sim_card_id" : 5702790861709057 } ] } ] 状态码: 400 Bad Request { "error_code" : "GSL.00010004", "error_msg" : "参数异常" } 状态码: 500 Internal Server Error { "error_code" : "GSL.00010003", "error_msg" : "系统繁忙,请稍后重试。" }
  • 请求示例 创建SIM卡复机申请,将sim_card_id对应的卡片操作为复用。 POST https://{endpoint}/v1/sim-cards/{sim_card_id}/reset { "down_up_switch" : 2 } 创建SIM卡复机申请。当参数sim_card_id为最小值时,根据iccid,复用卡标识为“8986xxxxxxx”的SIM卡。 POST https://{endpoint}/v1/sim-cards/{sim_card_id}/reset { "down_up_switch" : 2, "iccid" : "8986xxxxxxx" }
  • 响应示例 状态码: 200 OK { "work_order_id" : 1000001 } 状态码: 400 Parameter Invalid { "error_code" : "GSL.00010004", "error_msg" : "参数异常" } 状态码: 403 Forbidden { "error_code" : "GSL.00016010", "error_msg" : "您操作的卡仍有未完成的停机受理单,请勿重复操作。" } 状态码: 500 Internal Server Error { "error_code" : "GSL.00010003", "error_msg" : "系统繁忙,请稍后重试。" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用 IAM 服务 获取IAM用户Token接口获取,接口返回的响应消息头中“X-Subject-Token”就是需要获取的用户Token。简要的获取方法样例请参见 Token认证。 表3 请求Body参数 参数 是否必选 参数类型 描述 down_up_switch 否 Integer 启用停用开关 iccid 否 String iccid,传入的sim_card_id为0,则根据iccid进行处理
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 work_order_id Long 业务受理单号 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 批量SIM卡管理 全球SIM联接 控制台支持批量操作SIM卡,进入SIM卡管理页面,在上方的“批量”选项中可进行如下批量操作。 表4 批量SIM卡管理功能说明 卡类型 批量操作 说明 实体卡 批量激活 为多个容器批量激活,激活成功后,卡状态变为“在用”。 批量复机 为多个容器批量复机,复机成功后,卡状态变为“在用”。 批量停机 为多个容器批量停机,停机成功后,卡状态变为“已停用”。 批量转移实体卡 为多个容器批量转移实体卡,实体卡转移成功后,目标账号可登录华为云全球SIM联接控制台管理相关物联网卡。 批量机卡重绑 为多个容器批量重新绑定SIM卡和物联网设备关联关系。 批量达量断网 为多个容器执行批量达量断网。 批量取消达量断网 为多个容器执行批量取消达量断网。 批量拆机 为多个容器执行批量拆机。 批量绑定限制区域 为多个容器批量换绑限制区域。 全部SIM卡 批量设置标签 为多个容器批量设置标签,每次可添加或者删除多个标签。 批量设置自定义属性 为多个容器批量设置自定义属性,每次可添加、修改或删除多个自定义属性(这里要求自定义属性处于已启用状态)。 批量购买叠加包 为多个容器批量购买叠加包。
  • 查询SIM卡详情 登录全球SIM联接控制台,在SIM卡管理页面,单击SIM卡的容器ID可查看指定SIM卡的详细信息。 详细信息类型 说明 基本信息 展示SIM卡基本信息和关联的设备信息,还可对该SIM卡设置标签、添加自定义属性。 套餐管理 展示SIM卡当前在用套餐的详细信息。 用量统计 月用量:展示SIM卡套餐六个月内的月用量统计结果。 用量趋势:展示SIM卡套餐两个月内每日的用量趋势统计结果和用量明细信息。 生命周期 展示SIM卡的生命周期(从下单到销户)变化信息和SIM卡状态变更历史记录(激活、停机、复机 )。 在用状态的SIM卡可在生命周期中单击“停机”进行停机申请,受理完成后(1-2个工作日),SIM卡将会变为停用状态。
  • 关联SIM卡机卡 SIM卡管理和 设备接入服务 分别在2个独立的管理门户,为了方便您快捷的管理SIM卡和物联网设备,您可将设备标识码与SIM卡管理的容器ID对应信息导入到平台中。机卡关联后,待设备上电并接入到 物联网平台 ,您可以通过单击SIM卡列表的“设备标识码”列,跳转到设备接入服务管理平台对设备进行查看和管理。 在SIM卡管理页面,单击SIM卡管理页面上方的“机卡关联”,下载模板到本地填入所需的机卡关联信息,上传后单击“确定”完成机卡关联。
  • 查询SIM卡详情 登录全球SIM联接控制台,在SIM卡管理页面,单击SIM卡的容器ID可查看指定SIM卡的详细信息。 详细信息类型 说明 基本信息 展示SIM卡基本信息和关联的设备信息,还可对该SIM卡设置标签、添加自定义属性。 套餐管理 展示SIM卡当前在用套餐的详细信息。 用量统计 月用量:展示SIM卡套餐六个月内的月用量统计结果。 用量趋势:展示SIM卡套餐两个月内每日的用量趋势统计结果和用量明细信息。 生命周期 展示SIM卡的生命周期(从下单到销户)变化信息和SIM卡状态变更历史记录(激活、停机、复机 )。 在用状态的SIM卡可在生命周期中单击“停机”进行停机申请,受理完成后(1-2个工作日),SIM卡将会变为停用状态。