API Manual
API Manual
API Manual
May 2020
Version 1.8
About This Document
This document is intended for software developers writing code to work with the Baicells Business &
Operations Support System (BOSS) using Application Programming Interface (API). BOSS is a CloudCore
application for managing broadband wireless access subscribers. Some sections of this document
pertain only to Local (private network) OMC+BOSS environments, depending on the software version,
and are noted as such. This version of the manual is based on BOSS version 6.0.
Copyright Notice
Baicells Technologies, Inc., copyrights the information in this document. No part of this document may
be reproduced in any form or means without the prior written consent of Baicells Technologies, Inc.
The Baicells logo is a proprietary trademark of Baicells Technologies, Inc. Other trademarks mentioned
in this document belong to their owners.
Disclaimer
All products, services, and features bought from Baicells Technologies, Inc., are subject to the
constraints of the company's business contract and terms. All or part of the products, services, or
features Descriptiond in this document might not be your specific Baicells network. Unless stated in
the contract, Baicells Technologies, Inc., does not make any explicit or default statement or guarantee
about the contents of this document.
Unless stated otherwise, this document serves only as a user guide, and all descriptions /
information / suggestions mean no guarantee, neither explicit nor implicit.
The information in this document is subject to change at any time without notice. For more
information, please consult with a Baicells technical engineer or the support team. Refer to the
“Contact Us” section.
Revision Record
Date Version Description SMEs/Contributors Editor
14-May-2020 V1.8 Updated for v6.0 Yunfeng Jiang Sharon Redfoot
2-Mar-2020 V1.7 New logo & colors Chris Culver Sharon Redfoot
25-Apr-2019 V1.6 Notated local BOSS Jesse Raasch Sharon Redfoot
environment sections
20-Mar-2019 V1.5 Preliminary - updated for China ZhangGuihua Sharon Redfoot
V1.4 V5 BaiBOSS doc Jesse Raasch
11-Dec-2017 V1.3 Checked UE, eNB terms Bob Stone Sharon Redfoot
16-Nov-2017 V1.2 Added N.A. URL Cameron Kilton Sharon Redfoot
5-Oct-2017 V1.1 Edit for North American Jesse Raasch, Rick Sharon Redfoot
customers and partners Harnish, Cameron
Kilton
Sept 2017 V1.0 New Simon, Yang Yanan
ii
Support Resources
• Documentation - Baicells product data sheets, this document, and other technical
manuals may be found at Baicells > Resources > Documentation.
• Support - How to open a support ticket, process an RMA, and the Support Forum are at
Baicells > Support.
Contact Us
Baicells Technologies Co., Ltd. Baicells Technologies North America, Inc.
Address: 3F, Bldg. A, No. 1 Kai Tuo Rd, Haidian Dist, Address: 555 Republic Dr., #200, Plano, TX 75074,
Beijing, China USA
Email: [email protected] or
E-mail: [email protected]
[email protected]
iii
Table of Contents
1. API OVERVIEW......................................................................................................................................... 1
2. API LIST.................................................................................................................................................... 3
iv
2.2 SERVICE PLAN (PACKAGE/PROFILE) CATEGORY............................................................................................... 50
v
1. API Overview
The Baicells Application Programming Interface (API) is a Representational State Transfer, or RESTful,
API that accepts and receives JavaScript Object Notations (JSON). The API utilizes common Hypertext
Transfer Protocol (HTTP) methods such as GET, POST, PATCH, and DELETE.
The Baicells API header is added to the basic HTTP authentication mode via HTTP requests, provided
there is prior agreement with partners on a common user name and password. Permissions for the
API are inherited from the user account.
When submitting a request using basic HTTP authentication, you must also include a header for
“Content-Type” that specifies “application/json”; a header for “cloud_key” that specifies the
operator’s cloud_key; and a header for “Authorization” that specifies the encoded value of
“username:password” through the base64.
Table 1-1 provides the result_code list for when an operation fails.
Table 1-1: Result_Code List
Code Message
4001 sub_idConflict
4011 Subscribers do not exist or do not bind imsi and service plan
4012 Number of subscribers is too many
1
4107 Bind relation does not exist
4108 apn_name is required
4705 Query CDR detail. Time interval should not exceed 7 days.
2
5001 System error
5002 cloud_key is required in request header
2. API List
North American CloudCore API URL: http://baiboss.cloudapp.net:47081/baicellsapi"
param
Field Data Type Description
Example request:
POST /baicellsapi/customers/query HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"imsi": "460010000000001"
Success 200
3
available boolean true:the imsi can be user
false:the imsi cannot be user
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": “200”,
"available": false,
"sub_id": "20161201",
"id_num": "123456",
"phone_number": "123456",
"email": "[email protected]",
"service_plan_id": "2016001",
"sub_status": "0"
} or
"session_id": "2016123456",
"result_code": “200”,
"available": true
4
2.1.2 Create Subscriber
1) Detail
POST http://ipaddr:port/baicellsapi/customers/create
param
Field Data Type Description
Example request:
POST /baicellsapi/customers/create HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"sub_id": "20161201",
"id_num": "123456",
"phone_number": "123456",
"email": "[email protected]",
Success 200
Field Data Type Description
5
Example response - If the success return status code is 200, it is applicable to all interfaces:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
Error 422
Example response - If the fail return status code is 422, it is applicable to all interfaces:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4001",
param
Field Data Type Description
session_id String Business serial number
6
service_plan_id String The internal ID of the service plan
Example request:
POST /baicellsapi/customers/bindservice HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"sub_id": "20161201",
"service_plan_id": "2016001"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code":"200",
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
7
{
"session_id": "2016123456",
"result_code": "4002"
param
Field Data Type Description
Example request:
POST /baicellsapi/customers/bindimsi HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"sub_id": "20161201",
"imsi": "460010000000001"
Success 200
Field Data Type Description
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
8
{
"session_id": "2016123456",
"result_code": "200",
"message": "Success"
Error 422
Example response
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4301"
param
Field Data Type Description
Example request:
POST /baicellsapi/customers/unbindimsi HTTP/1.1
Content-Type: application/json
9
"session_id":"2016123456",
"sub_id": "20161201"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "200",
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4002",
10
2.1.6 Activate Subscriber
1) Detail
POST http://ipaddr:port/baicellsapi/customers /activate
param
Field Data Type Description
Example request:
POST /baicellsapi/customers /activate HTTP/1.1
Content-Type: application/json
"session_id": "2016123456",
"sub_id": "20161201"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
11
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4002",
param
Example request:
POST /baicellsapi/customers/deactivate HTTP/1.1
Content-Type: application/json
"session_id": "2016123456",
"sub_id": "20161201"
12
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code":"200",
"message": "Success"
Error 422
Field Data Type Description
session_id String Business serial number
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4002",
13
param
Example request:
POST /baicellsapi/customers/update HTTP/1.1
Content-Type: application/json
"session_id": "2016123456",
"sub_id": "20161201",
"new_service_plan_id": "2016001"
Success 200
Field Data Type Description
session_id String Business serial number
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
}
Error 422
14
message String Message
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4002",
param
Field Data Type Description
Example request:
POST /baicellsapi/customers/updateuplink HTTP/1.1
Content-Type: application/json
"session_id": "2016123456",
"sub_id": "20161201",
"downlink": 5,
"uplink": 5
15
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": “200”,
"message": "Success"
Error 422
Field Data Type Description
session_id String Business serial number
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4002",
16
param
Example request:
POST /baicellsapi/customers/bulkactivate HTTP/1.1
Content-Type: application/json
"session_id": "2016123456",
"data":[
"20161201",
"20161202",
"20161203",
"20161204"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
17
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "5001",
param
Example request:
POST /baicellsapi/customers/bulkdeactivate HTTP/1.1
Content-Type: application/json
"session_id": "2016123456",
"data":[
"20161201",
"20161202",
"20161203",
"20161204"
18
]
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
Error 422
Field Data Type Description
session_id String Business serial number
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "5001",
19
2.1.12 Query Subscriber by sub_id
1) Detail
POST http://ipaddr:port/baicellsapi/customers/querybyid
param
Example request:
POST /baicellsapi/customers/querybyid HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"sub_id": "20161201"
Success 200
20
down_rate String Down speed of bind service plan
apn_info_list JSON String Bind apn ip information
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: "200",
"imsi": "460010000000001",
"sub_id": "20161201",
"id_num": "123456",
"phone_number": "123456",
"email": "[email protected]",
"service_plan_id": "2016001",
"sub_status": "0",
"up_rate":"5",
"down_rate":"10",
"apn_info_list":[{"apn_name":"apn1","apn_ambr_ul":4,"apn_ambr_dl":8,
"ipv4":"192.168.1.10"}]
NOTE: Not supported in North America CloudCore, but is supported in a Local OMC+BOSS
environment
1) Detail
POST http://ipaddr:port/baicellsapi/customers/bindapnip
param
21
sub_id String The internal ID of the subscriber
apn_name String 100 Apn name
Example request:
POST /baicellsapi/customers/bindapnip HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"sub_id": "2017062201",
"apn_name": "apn1",
"apn_ambr_ul": 4,
"apn_ambr_dl": 8,
"type_of_context": 0,
"static_ip_setting": 1
"ip_addr": "192.168.1.10"
"session_id":"2016123456",
"sub_id": "2017062201",
"apn_name": "apn1",
"apn_ambr_ul": "4",
"apn_ambr_dl": "8"
"type_of_context": 0,
"static_ip_setting": 0
22
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "200",
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4108"
23
2.1.14 Remove APN and Static IP
NOTE: Not supported in North America CloudCore, but is supported in a Local OMC+BOSS
environment
1) Detail
POST http://ipaddr:port/baicellsapi/customers/removeapnip
param
Field Data Type Description
Example request:
POST /baicellsapi/customers/removeapnip HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"sub_id": "2017062201",
"apn_name": "apn1",
"apn_ambr_ul": "4",
"apn_ambr_dl": "8"
Success 200
24
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "200",
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4108"
param
25
id_num String The ID number of the subscriber
phone_number String The phone of the subscriber
Example request:
POST /baicellsapi/customers/modify HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"sub_id": "20161201",
"id_num": "123456",
"phone_number": "123456",
"email": "[email protected]",
Success 200
Field Data Type Description
session_id String Business serial number
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
26
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4002",
param
Example request:
POST /baicellsapi/customers/delete HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"sub_id": "20161201"
27
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
Error 422
Field Data Type Description
session_id String Business serial number
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4002",
28
param
Example request:
POST /baicellsapi/customers/create HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"service_plan_id": "2016001",
"sub_list":[{
"sub_id": "20161201",
"imsi":"860100011223344",
"id_num": "123456",
"phone_number": "123456",
"email": "[email protected]",
},
"sub_id": "20161202",
"imsi":"860100011223355",
"id_num": "123457",
"phone_number": "1234567",
"email": "[email protected]",
29
"address": "test2 address"
}]
Success 200
"session_id": "198575111866",
"result_code": "4503",
HTTP/1.1 200
"session_id": "198575111866",
"total": 200,
30
"unsuccessful quantity": 171,
"success_list": [
"sub_id": "66268756728",
"imsi": "601011010167723"
},
"sub_id": "66268751752",
"imsi": "601011010167747"
}...
],
"fail_list": [
"sub_id": "66268766671",
"imsi": "601011000166666",
"result_code": "4302",
"sub_id": "66268866706aa",
"imsi": "601011000166701",
"result_code": "5001",
},
"sub_id": "66268866707",
"imsi": "601111000167702",
"result_code": "4001",
}...
31
2.1.18 Subscriber Redirection
1)Detail
POST http://ipaddr:port/baicellsapi/customers/redirect
param
Field Data Type Description
Example request:
POST http://ipaddr:port/baicellsapi/customers/redirect HTTP/1.1
Content-Type: application/json
"session_id":"198575111866",
"sub_id_list":["AX1234","AX1235","AX1236"]
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
“result_code”: “200”,
"message": "Success"
Error 422
32
message String Message:sub_id conflict
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"result_code": "4001",
param
Field Data Type Description
session_id String Business serial number
Example request:
POST http://ipaddr:port/baicellsapi/customers/cancelredirect HTTP/1.1
Content-Type: application/json
"session_id":"198575111866",
"sub_id_list":["AX1234","AX1235","AX1236"]
Success 200
33
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
“result_code”: “200”,
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"result_code": "4001",
param
Example request:
POST /baicellsapi/customers/query HTTP/1.1
Content-Type: application/json
34
"session_id":"2016123456",
"ip_addr": "192.169.1.1"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"available": false,
"sub_id": "20161201",
35
"id_num": "123456",
"phone_number": "123456",
"email": "[email protected]",
"service_plan_id": "2016001",
"sub_status": "0",
"svc_state": "0"
} or
"session_id": "2016123456",
"result_code": “200”,
"available": true
param
Field Data Type Description
Example request:
POST /baicellsapi/imsi/activate HTTP/1.1
Content-Type: application/json
"session_id": "201805180958",
"imsi": "600000000000081"
36
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "201805180958",
"result_code": "200",
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "201805180958",
"result_code": "4002",
37
param
Example request:
POST /baicellsapi/imsi/deactivate HTTP/1.1
Content-Type: application/json
"session_id": "201805181105",
"imsi": "600000000000081"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "201805181105",
"result_code":"200",
"message": "Success"
Error 422
Field Data Type Description
38
message String Message
Example response
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "201805181105",
"result_code": "4002",
param
Field Data Type Description
Example request:
POST http://ipaddr:port/baicellsapi/imsi/redirect HTTP/1.1
Content-Type: application/json
"session_id":"201805181511",
"imsi": "600000000000081"
Success 200
Field Data Type Description
39
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "201805181105",
"result_code": "200",
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "201805181105",
"result_code": "4301",
param
session_id String
imsi_list String
Example request:
POST http://ipaddr:port/baicellsapi/imsi/cancelredirect HTTP/1.1
40
Content-Type: application/json
"session_id":"201805181515",
"imsi": "600000000000081"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id":"201805181515",
"result_code": "200",
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id":"201805181515",
"result_code": "4301",
41
2.1.25 Change Speed by IMSI (Uplink and Downlink)
1) Detail
POST http://ipaddr:port/baicellsapi/imsi/updatespeed
param
Example request:
POST /baicellsapi/imsi/updatespeed HTTP/1.1
Content-Type: application/json
"session_id": "201805181529",
"imsi": "600000000000081",
"downlink": 5,
"uplink": 5
Success 200
Field Data Type Description
session_id String Business serial number
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "201805181529",
42
"result_code": “200”,
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "201805181529",
"result_code": "4002",
param
Field Data Type Description
session_id String Business serial number
Example request:
POST /baicellsapi/imsi/query HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
43
"imsi": "600000000000081"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "201805181625",
“result_code”: "200",
"imsi": "600000000000081",
"sub_id": "20161201",
44
"sub_name": "test name",
"id_num": "123456",
"phone_number": "123456",
"email": "[email protected]",
"service_plan_id": "2016001",
"sub_status": "0",
"up_rate":"5",
"down_rate":"10",
"svc_state":"0",
"apn_info_list":[{"apn_name":"apn1","apn_ambr_ul":4,"apn_ambr_dl":8,
"ipv4":"192.168.1.10"}]
param
Example request:
POST /baicellsapi/imsi/updateservice HTTP/1.1
Content-Type: application/json
"session_id": "201805221515",
"imsi": "600000000000081",
"new_service_plan_id": "2016001"
45
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "201805221515",
"result_code": “200”,
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "201805221515",
"result_code": "4002",
46
param
Example request:
POST /baicellsapi/imsi/modify HTTP/1.1
Content-Type: application/json
"session_id":"201805221541",
"imsi": "600000000000081",
"id_num": "123456",
"phone_number": "123456",
"email": "[email protected]",
Success 200
Field Data Type Description
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
47
{
"session_id": "201805221541",
"result_code": "200",
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "201805221541",
"result_code": "4002",
param
Field Data Type Description
Example request:
POST /baicellsapi/imsi/delete HTTP/1.1
Content-Type: application/json
48
"session_id":"201805221455",
"imsi": "600000000000081"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "201805221455",
"result_code": "200",
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "201805221455",
"result_code": "4002",
49
2.2 Service Plan (Package/Profile) Category
param
Example request:
POST /products/create HTTP/1.1
Content-Type: application/json
"session_id": "2016123456",
"service_plan_id": "2016001",
"service_plan_name": "testname",
"uplink": 5,
"downlink": 5,
"comments": "comments"
Success 200
50
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "5001",
param
51
service_plan_name String The name of the service plan
uplink int Uplink speed.Unit:MB
Example request:
POST /products/modify HTTP/1.1
Content-Type: application/json
"session_id": "2016123456",
"service_plan_id": "2016001",
"service_plan_name": "testname",
"uplink": 5,
"downlink": 5,
"comments": "comments"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
52
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "5001",
Success 200
Field Data Type Description
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"service_plan_id":"T201611220001",
"service_plan_name":"1M",
"uplink":"1",
"downlink":"1",
53
"state":"0"
},
"service_plan_id":"T201611220002",
"service_plan_name":"1M",
"uplink":"1",
"downlink":"2",
"state":"0"
Success 200
Field Data Type Description
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"service_plan_id":"T201611220001",
"service_plan_name":"2M",
"uplink":"2",
"downlink":"2",
"state":"0"
},
"service_plan_id":"T201611220002",
"service_plan_name":"2M",
54
"uplink":"1",
"downlink":"2",
"state":"0"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"service_plan_id":"T201611220001",
"service_plan_name":"2M",
"uplink":"2",
"downlink":"2",
"state":"0"
},
"service_plan_id":"T201611220002",
"service_plan_name":"2M",
"uplink":"2",
"downlink":"2",
"state":"0"
55
2.2.6 Get all Service Plans
1) Detail
GET http://ipaddr:port/baicellsapi/products/queryallplans
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"service_plan_id":"T201611220001",
"service_plan_name":"1M",
"uplink":"1",
"downlink":"1",
"state":"0"
},
"service_plan_id":"T201611220002",
"service_plan_name":"2M",
"uplink":"2",
"downlink":"2",
"state":"0"
56
param
Example request:
POST /products/modify HTTP/1.1
Content-Type: application/json
"session_id": "2016123456",
"service_plan_id": "2016001"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
“result_code”: “200”,
"message": "Success"
Error 422
Field Data Type Description
57
message String Message
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "5001",
Success 200
Field Data Type Description
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"service_plan_id":"T201611220001",
"service_plan_name":"2M",
"uplink":"2",
"downlink":"2",
"state":"0"
58
2.3 System Setting
param
Field Data Type Length Description
url String 200 complete path of redirection
Example request:
POST http://ipaddr:port/baicellsapi/system/setredirecturl HTTP/1.1
Content-Type: application/json
"session_id":"123456",
"url":"http://www.xxx.xxx:8080/balancedue",
"url_ip": "192.168.9.10",
"allow_ip_list":["172.17.0.10","172.17.0.20"]
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
“result_code”: “200”,
"message": "Success"
59
}
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"result_code": "5001",
NOTE: Not supported in North America CloudCore, but is supported in a Local OMC+BOSS
environment
1) Detail
POST http://ipaddr:port/baicellsapi/usage/querybyhour
param
Field Data Type Required Description
60
The maximum time interval is 31 days.
Example request:
POST /baicellsapi/usage/querybyhour HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"imsi":"600000000000001",
"begin_time":"2018-11-22 08:00:00",
"end_time":"2018-11-22 12:00:00"
Success 200
Field Data Type Description
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "200",
"usage_infos":[
"imsi":"600000000000001",
"total_usage":"204800",
61
"up_usage":"1000",
"down_usage":"203800",
"usage_time":"2018-11-22 10:00:00"
Error 422
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4701"
NOTE: Not supported in North America CloudCore, but is supported in a Local OMC+BOSS
environment
1) Detail
POST http://ipaddr:port/baicellsapi/usage/querycdr
param
Field Data Type Required Description
session_id String Yes Business serial number
imsi String No If the imsi is not empty query the specified IMSI’s
usage. If imsi is empty query all IMSI’s usage.
62
begin_time String Yes Time interval of queries, Format:yyyy-MM-dd
hh:mm:ss
The maximum time interval is 7 days.
Example request:
POST /baicellsapi/usage/querybyhour HTTP/1.1
Content-Type: application/json
"session_id":"2016123456",
"imsi":"600000000000001",
"begin_time":"2018-11-22 08:00:00",
"end_time":"2018-11-22 12:00:00"
Success 200
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
"session_id": "2016123456",
63
"result_code": "200",
"cdr_infos":[
"imsi":"600000000000001",
"total_usage":"204800",
"up_usage":"1000",
"down_usage":"203800",
"duration":"300",
"cdrdate":"2018-11-22 12:14:32"
Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code: 4701/4702/4703/4705
message String Message
Example response:
HTTP/1.1 422 OK
Content-Type: application/json
"session_id": "2016123456",
"result_code": "4701"
64
Appendix: Activate Subscriber and Bind APN IPflow
Diagram
Follow the steps below and the flow diagram to activate the subscriber and bind the APN IP.
1. Create a subscriber.
2. Bind the service plan for this subscriber. If there is no suitable tariff that can be used, create a
new service plan following the information in section 2.2.1.
3. Bind IMSI for this subscriber.
4. Activate this subscriber.
At this point, the IMSI can access the network.
65