0% found this document useful (0 votes)
294 views64 pages

API Manual BaiBOSS 8.3

Uploaded by

Marcílio Maia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
294 views64 pages

API Manual BaiBOSS 8.3

Uploaded by

Marcílio Maia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

BOSS API Manual

Programming Guide
BaiBOSS 8.3

February 2023
Version 2.0
BOSS API Manual

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 8.3.

Copyright Notice
Baicells Technologies 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. The
Baicells logo is a proprietary trademark of Baicells Technologies. Other trademarks mentioned in this
document belong to their owners.

Disclaimer
All products, services, and features bought from Baicells Technologies are subject to the constraints
of the company's business contract and terms. All or part of the products, services, or features
described in this document might not be your specific Baicells network. Unless stated in the contract,
Baicells Technologies 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
21-Feb-2023 V2.0 Updated for BaiBOSS 8.3, v11 HQ version: Yunfeng Jiang Jocelyn Watson
• Query Full List of Subscriber IDs
• Query Full list of IMSIs
18-May-2020 V1.9 Review comments Yunfeng Jiang, Sharon Redfoot
V1.8 Updated for BOSS v6.0 ZhangGuihua
2-Mar-2020 V1.7 New logo & colors Chris Culver Sharon Redfoot
25-Apr-2019 V1.6 Notated local BOSS environment sections Jesse Raasch Sharon Redfoot
20-Mar-2019 V1.5 Preliminary - updated for China V5 ZhangGuihua Sharon Redfoot
V1.4 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 customers and Jesse Raasch, Rick Sharon Redfoot
partners Harnish, Cameron
Kilton
Sept 2017 V1.0 New Simon, Yang Yanan

ii
BOSS API Manual

Resources
• Documentation - Baicells product datasheets, technical manuals, and a list of acronyms and
abbreviations can be found at Baicells.com > Resources > Documents.

• Support - Open a support ticket, process an RMA, and the Support Forum is at
Baicells.com > Support.

Contact Us
Baicells Technologies
5700 Tennyson Pkwy, #300, Plano, TX 75024, USA
Phone: +1-888-502-5585
Email: [email protected] for North America or [email protected] for all other regions
Website: baicells.com

iii
BOSS API Manual

Table of Contents
1. API OVERVIEW......................................................................................................................................... 1

2. API LIST.................................................................................................................................................... 3

2.1 SUBSCRIBER CATEGORY................................................................................................................................... 4

2.1.1 Query Subscriber ................................................................................................................................. 4

2.1.2 Create Subscriber ................................................................................................................................ 5

2.1.3 Bind Service Plan ................................................................................................................................. 7

2.1.4 Bind IMSI ............................................................................................................................................... 8

2.1.5 Unbind IMSI......................................................................................................................................... 10

2.1.6 Activate Subscriber............................................................................................................................ 11

2.1.7 Deactivate Subscriber.......................................................................................................................... 12

2.1.8 Change Service Plan ............................................................................................................................ 13

2.1.9 Change Speed (Uplink and Downlink) ................................................................................................. 14

2.1.10 Bulk Activate Subscribers .................................................................................................................. 16

2.1.11 Bulk Deactivate Subscribers .............................................................................................................. 17

2.1.12 Query Subscriber by sub_id ............................................................................................................... 19

2.1.13 Bind APN and Static IP ...................................................................................................................... 20

2.1.14 Remove APN and Static IP ................................................................................................................. 22

2.1.15 Modify Subscriber ............................................................................................................................. 24

2.1.16 Delete Subscriber .............................................................................................................................. 25

2.1.17 Bulk Create Subscriber ...................................................................................................................... 26

2.1.18 Subscriber Redirection....................................................................................................................... 29

2.1.19 Subscriber Cancel Redirection ........................................................................................................... 30

2.1.20 Query Subscriber by IP ...................................................................................................................... 31

2.1.21 Activate Subscriber by IMSI ............................................................................................................... 33

2.1.22 Deactivate Subscriber by IMSI ........................................................................................................... 34

2.1.23 Subscriber Redirection by IMSI .......................................................................................................... 35

2.1.24 Subscriber Cancel Redirection by IMSI .............................................................................................. 36

2.1.25 Change Speed by IMSI (Uplink and Downlink) .................................................................................. 38

2.1.26 Query Subscriber by IMSI .................................................................................................................. 39

2.1.27 Change Service Plan by IMSI ............................................................................................................. 40

2.1.28 Modify Subscriber by IMSI................................................................................................................. 42

2.1.29 Delete Subscriber by IMSI .................................................................................................................. 43

2.1.30 Query Full List of Subscriber IDs ........................................................................................................ 44


iv
BOSS API Manual
2.2 SERVICE PLAN (PACKAGE/PROFILE) CATEGORY .................................................................................................. 45

2.2.1 Create Service Plan (Package/Profile) ................................................................................................. 45

2.2.2 Modify Service Plan (Package/Profile) ................................................................................................ 46

2.2.3 Get Service Plan by Uplink................................................................................................................... 48

2.2.4 Get Service Plan by Downlink .............................................................................................................. 49

2.2.5 Get Service Plan by Uplink and Downlink ............................................................................................ 49

2.2.6 Get all Service Plans ............................................................................................................................ 50

2.2.7 Delete Service Plan .............................................................................................................................. 51

2.2.8 Get Service Plan by ID ......................................................................................................................... 52

2.3 SIM CARD CATEGORY .................................................................................................................................... 53

2.3.1 Query Full List of IMSIs ........................................................................................................................ 53

2.4 DATA USAGE ................................................................................................................................................ 53

2.4.1 Query Data Usage by Hour Size ........................................................................................................ 53

2.4.2 Query Data Usage CDR Detail ........................................................................................................... 55

3. APPENDIX: ............................................................................................................................................. 58

3.1 ACTIVATE SUBSCRIBER AND BIND APN IPFLOW DIAGRAM ....................................................................................... 58

3.2 REMOVE APN OR IP INSTRUCTIONS .................................................................................................................... 59

v
BOSS API Manual

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

4000 sub_id field is required

4001 sub_idConflict

4002 Subscribers do not exist

4003 Subscribers do not bind imsi

4004 Subscribers do not bind service plan

4005 Subscribers already exist

4006 Subscriber already binds service plan

4007 Subscriber already binds imsi

4008 Session_id field is required

4009 Subscriber does not match this cloud_key

4010 Sub_id_list field is required

4011 Subscribers do not exist or do not bind imsi and service plan

4012 Number of subscribers is too many

4100 Ip field is required

4101 Ip is not a valid IP address

4102 apn_profile field is required

4103 APN does not exist

4104 APN does not contain this IP address

4105 Bind relation (Subscribers-apn-ip) does not exist

4106 Bind relation already exists

1
BOSS API Manual

Code Message

4107 Bind relation does not exist

4108 apn_name is required

4109 Data too long for apn_name

4110 apn_ambr_ul is required

4111 apn_ambr_ul format error

4112 apn_ambr_dl is required

4113 apn_ambr_dl format error

4200 Service_plan_id field is required

4201 Service_plan_id conflict

4202 Service plan does not exist

4203 New_Service_plan_id field is required

4205 Service_plan_name field is required

4206 datanode is required

4207 Service plan does not match this cloud_key

4300 IMSI field is required

4301 IMSI format error

4302 IMSI has been used

4303 Please deactivate the subscriber before unbinding imsi!

4401 Uplink field is required

4402 Downlink field is required

4403 Uplink must be a number

4404 Downlink must be a number

4501 Sub_list field is required

4502 Sub_list format error

4503 Exceeded 200 records limit

4601 Configure 16 IP addresses at most

4602 url field is required

4603 url_ip field is required

4701 Begin time is required

4702 End time is required

4703 Incorrect time format

4704 Query usage by hour size. Time interval should not exceed 31 days.

4705 Query CDR detail. Time interval should not exceed 7 days.

2
BOSS API Manual

Code Message

5001 System error

5002 cloud_key is required in request header

5003 cloud_key does not exist

5004 User or password error

5005 User does not match this cloud_key

5006 Filed exceeds maximum length

5007 The request parameter is not a valid JSON string

5008 Content type not supported.please use ‘application/json’

Code Message

2. API List
North American CloudCore API URL: http://baiboss.cloudapp.net:47081/baicellsapi"
Category Functions Comments

System setting Set redirect url and allow access to IP Not supported

Create Service plan

Modify Service plan

Get service plan by uplink


Service plan
Get service plan by downlink
(package/profile) category
Get service plan by uplink and downlink

Get all service plan

Delete service plan

Query subscriber

Create subscriber

Bind service plan

Bind imsi

Unbind imsi

Subscriber category Activate subscriber

Deactivate subscriber

Change service plan

Change speed(uplink and downlink)

Bulk activate subscribers

Bulk deactivate subscribers

3
BOSS API Manual

Category Functions Comments

Query subscriber by sub_id

Bind apn and static ip

Remove apn and static ip

Modify subscriber

Delete subscriber

bulk Create subscriber

Subscriber redirection Not supported

Subscriber cancel redirection Not supported

2.1 Subscriber Category

2.1.1 Query Subscriber


Detail:
POST http://ipaddr:port/baicellsapi/customers/query
param
Field Data Type Description
session_id String Business serial number
imsi String IMSI

Example request:
POST /baicellsapi/customers/query HTTP/1.1

Content-Type: application/json

"session_id":"2016123456",

"imsi": "460010000000001"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
available boolean true:the imsi can be user
false:the imsi cannot be user
sub_id String The internal ID of the subscriber
sub_name String The name of the subscriber
id_num String The ID number of the subscriber
phone_number String The phone number of the subscriber

4
BOSS API Manual

Field Data Type Description


email String The email address of the subscriber
address String The address of the subscriber
service_plan_id String The subscriber bound service plan
sub_status String The status of the subscriber
“0”:active
“1”:deactive
svc_state String The status of redirection
“0”:no redirection
“1”:direction

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": “200”,

"available": false,

"sub_id": "20161201",

"sub_name": "test name",

"id_num": "123456",

"phone_number": "123456",

"email": "[email protected]",

"address": "test address",

"service_plan_id": "2016001",

"sub_status": "0",

"svc_state": "0"

} or

"session_id": "2016123456",

"result_code": “200”,

"available": true

2.1.2 Create Subscriber


Detail:
POST http://ipaddr:port/baicellsapi/customers/create

5
BOSS API Manual
param
Field Data Type Length Description
session_id String Business serial number
sub_id String 20 The internal ID of the subscriber
sub_name String 60 The name of the subscriber
id_num String 20 The ID number of the subscriber
phone_number String 20 The phone number of the subscriber
email String 60 The email of the subscriber
address String 200 The address of the subscriber

Example request:
POST /baicellsapi/customers/create HTTP/1.1

Content-Type: application/json

"session_id":"2016123456",

"sub_id": "20161201",

"sub_name": "test name",

"id_num": "123456",

"phone_number": "123456",

"email": "[email protected]",

"address": "test address"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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"

6
BOSS API Manual
Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code:4000/4001
message String Message: sub_id conflict

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",

"message": "sub_id conflict"

2.1.3 Bind Service Plan


Detail:
POST http://ipaddr:port/baicellsapi/customers/bindservice
param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber
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"

7
BOSS API Manual
Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code:4000/4002/4200/4202
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4002"

"message": "subscriber dose not exist"

2.1.4 Bind IMSI


1) Detail
POST http://ipaddr:port/baicellsapi/customers/bindimsi
param
Field Data Type Length Description
session_id String Business serial number
sub_id String The internal ID of the subscriber
imsi String 20 IMSI

8
BOSS API Manual
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
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code: 4000/4002/4300/4301/4302
message String Message

Example response
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4301"

"message": "IMIS formate error"

9
BOSS API Manual

2.1.5 Unbind IMSI


Detail:
POST http://ipaddr:port/baicellsapi/customers/unbindimsi
param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber

Example request:
POST /baicellsapi/customers/unbindimsi HTTP/1.1

Content-Type: application/json

"session_id":"2016123456",

"sub_id": "20161201"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code: 4000/4002/5001
message String Message

10
BOSS API Manual
Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4002",

"message": "Subscriber dose not exist"

2.1.6 Activate Subscriber


Detail:
POST http://ipaddr:port/baicellsapi/customers /activate
param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber

Example request:
POST /baicellsapi/customers /activate HTTP/1.1

Content-Type: application/json

"session_id": "2016123456",

"sub_id": "20161201"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "2016123456",

“result_code”: “200”,

"message": "Success"

11
BOSS API Manual
}

Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code: 4000/4002/4003/4004/5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4002",

"message": "Subscriber dose not exist"

2.1.7 Deactivate Subscriber


Detail:
POST http://ipaddr:port/baicellsapi/customers/deactivate
param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber

Example request:
POST /baicellsapi/customers/deactivate HTTP/1.1

Content-Type: application/json

"session_id": "2016123456",

"sub_id": "20161201"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

12
BOSS API Manual
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
result_code String Error return code: 4000/4002/5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4002",

"message": "Subscriber dose not exist"

2.1.8 Change Service Plan


Detail:
POST http://ipaddr:port/baicellsapi/customers/update

param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber
new_service_plan_id String The new service plan id

Example request:
POST /baicellsapi/customers/update HTTP/1.1

Content-Type: application/json

"session_id": "2016123456",

13
BOSS API Manual
"sub_id": "20161201",

"new_service_plan_id": "2016001"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code: 4000/4002/4202/5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4002",

"message": "Subscriber dose not exist"

2.1.9 Change Speed (Uplink and Downlink)


Detail:
POST http://ipaddr:port/baicellsapi/customers/updateuplink

14
BOSS API Manual
param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber
uplink int Uplink speed.Unit:MB(maximum:1000MB)
downlink int Downlink speed.Unit:MB(maximum:1000MB

Example request:
POST /baicellsapi/customers/updateuplink HTTP/1.1

Content-Type: application/json

"session_id": "2016123456",

"sub_id": "20161201",

"downlink": 5,

"uplink": 5

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code:
4000/4002/4401/4402/4403/4404/5001
message String Message

15
BOSS API Manual
Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4002",

"message": "Subscriber dose not exist"

2.1.10 Bulk Activate Subscribers


Detail:
POST http://ipaddr:port/baicellsapi/customers/bulkactivate

param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber

Example request:
POST /baicellsapi/customers/bulkactivate HTTP/1.1

Content-Type: application/json

"session_id": "2016123456",

"data":[

"20161201",

"20161202",

"20161203",

"20161204"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

16
BOSS API Manual
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
result_code String Error return code: 5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "5001",

"message": "System error"

2.1.11 Bulk Deactivate Subscribers


Detail:
POST http://ipaddr:port/baicellsapi/customers/bulkdeactivate
param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber

Example request:
POST /baicellsapi/customers/bulkdeactivate HTTP/1.1

Content-Type: application/json

"session_id": "2016123456",

"data":[

17
BOSS API Manual
"20161201",

"20161202",

"20161203",

"20161204"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code: 5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "5001",

"message": "System error"

18
BOSS API Manual

2.1.12 Query Subscriber by sub_id


Detail:
POST http://ipaddr:port/baicellsapi/customers/querybyid
param
Field Data Type Description
session_id String Business serial number
sub_id String The ID number of the subscriber

Example request:
POST /baicellsapi/customers/querybyid HTTP/1.1

Content-Type: application/json

"session_id":"2016123456",

"sub_id": "20161201"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
imsi String imsi
sub_id String The internal ID of the subscriber
sub_name String The name of the subscriber
id_num String The ID number of the subscriber
phone_number String The phone of the subscriber
email String The email of the subscriber
address String The address of the subscriber
service_plan_id String The subscriber bound service plan
sub_status String The status of the subscriber:
“0”:active
“1”:deactive
up_rate String Up speed of bind service plan
down_rate String Down speed of bind service plan
apn_info_list JSON String Bind apn ip information
svc_state String The status of redirection
“0”:no redirection
“1”:direction

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

19
BOSS API Manual
{

"session_id": "2016123456",

“result_code”: "200",

"imsi": "460010000000001",

"sub_id": "20161201",

"sub_name": "test name",

"id_num": "123456",

"phone_number": "123456",

"email": "[email protected]",

"address": "test address",

"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"}],

"svc_state":"0"

2.1.13 Bind APN and Static IP

NOTE: Not supported in North America CloudCore, but is supported in a Local OMC+BOSS
environment

Detail:
POST http://ipaddr:port/baicellsapi/customers/bindapnip
param
Field Data Type Length Description
session_id String Business serial number
sub_id String The internal ID of the subscriber
apn_name String 100 Apn name
apn_ambr_ul int 7 apn_ambr_ul
apn_ambr_dl int 7 apn_ambr_dl
type_of_context String 1 Is default APN: 0-normal,1-default
static_ip_setting String 1 Bind the static IP: 0-no, 1-yes
ip_addr String 40 IP address
NOTE: If you do not set a static IP, this parameter should
be set to empty or you should delete the parameter.

Example request:

20
BOSS API Manual
POST /baicellsapi/customers/bindapnip HTTP/1.1

Content-Type: application/json

1) Set static ip addr param:


{

"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"

2) Do not set static ip addr param:


{

"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

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "200",

"message": "Success"

21
BOSS API Manual
}

Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code: 4108/4109/4110/4111/4112/4113
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4108"

"message": "apn_name is required"

2.1.14 Remove APN and Static IP

NOTE: Not supported in North America CloudCore, but is supported in a Local OMC+BOSS
environment

Detail:
POST http://ipaddr:port/baicellsapi/customers/removeapnip
param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber
apn_name String Apn name
apn_ambr_ul String apn_ambr_ul
apn_ambr_dl String apn_ambr_dl

Example request:
POST /baicellsapi/customers/removeapnip HTTP/1.1

Content-Type: application/json

1. Set static ip addr param:


{

"session_id":"2016123456",

"sub_id": "2017062201",

"apn_name": "apn1",

"apn_ambr_ul": "4",
22
BOSS API Manual
"apn_ambr_dl": "8"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code: 4000/4108/
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4108"

"message": "apn_name is required"

23
BOSS API Manual

2.1.15 Modify Subscriber


Detail:
POST http://ipaddr:port/baicellsapi/customers/modify
param
Field Data Type Length Description
session_id String Business serial number
sub_id String The internal ID of the subscriber
sub_name String 60 The name of the subscriber
id_num String 20 The ID number of the subscriber
phone_number String 20 The phone of the subscriber
email String 60 The email of the subscriber
address String 200 The address of the subscriber

Example request:
POST /baicellsapi/customers/modify HTTP/1.1

Content-Type: application/json

"session_id":"2016123456",

"sub_id": "20161201",

"sub_name": "test name",

"id_num": "123456",

"phone_number": "123456",

"email": "[email protected]",

"address": "test address"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Subscriber does not exist

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "2016123456",

“result_code”: “200”,

24
BOSS API Manual
"message": "Success"

Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code:4000/4002/5001
message String Message: sub_id conflict

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4002",

"message": "Subscribers dose not exist"

2.1.16 Delete Subscriber


Detail:
POST http://ipaddr:port/baicellsapi/customers/delete

param
Field Data Type Description
session_id String Business serial number
sub_id String The internal ID of the subscriber

Example request:
POST /baicellsapi/customers/delete HTTP/1.1

Content-Type: application/json

"session_id":"2016123456",

"sub_id": "20161201"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Subscriber does not exist

25
BOSS API Manual
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
result_code String Error return code:4000/4002/5001
message String Message: sub_id conflict

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4002",

"message": "Subscribers dose not exist"

2.1.17 Bulk Create Subscriber


Detail:
POST http://ipaddr:port/baicellsapi/customers/bulkcreate
param
Field Data Type Length Description
session_id String Business serial number
service_plan_id String The service of the subscriber
sub_list list The collection of user list
sub_id String 20 The internal ID of the subscriber
imsi String 15 The imsi of the subscriber
id_num String 20 The ID number of the subscriber
phone_number String 20 The phone number of the subscriber
email String 60 The email of the subscriber
address String 200 The address of the subscriber

Example request:

26
BOSS API Manual
POST /baicellsapi/customers/create HTTP/1.1
Content-Type: application/json
{
"session_id":"2016123456",
"service_plan_id": "2016001",
"sub_list":[{
"sub_id": "20161201",
"sub_name": "test name",
"imsi":"860100011223344",
"id_num": "123456",
"phone_number": "123456",
"email": "[email protected]",
"address": "test address"
},
{
"sub_id": "20161202",
"sub_name": "test name2",
"imsi":"860100011223355",
"id_num": "123457",
"phone_number": "1234567",
"email": "[email protected]",
"address": "test2 address"
}]
}

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success
total int The total number of these operations
successful quantity Int The number of successes
unsuccessful quantity int The number of failures
success_list list The list of successes
fail_list list The list of failures
sub_id The internal ID of the subscriber
imsi The imsi of the subscriber
result_message Error message

27
BOSS API Manual
1) Parameters format error returned information:
Example response:
HTTP/1.1 422

"session_id": "198575111866",

"result_code": "4503",

"message": "exceed 200 records limit."

2) Parameters format pass, return operations details:

HTTP/1.1 200

"session_id": "198575111866",

"total": 200,

"successful quantity": 29,

"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",

"result_message": "imsi has been used."

{
28
BOSS API Manual
"sub_id": "66268866706aa",

"imsi": "601011000166701",

"result_code": "5001",

"result_message": "system error."

},

"sub_id": "66268866707",

"imsi": "601111000167702",

"result_code": "4001",

"result_message": "sub_id conflict."

}...

2.1.18 Subscriber Redirection


Detail:
POST http://ipaddr:port/baicellsapi/customers/redirect
param
Field Data Type Description
session_id String Business serial number
Sub_id_list JSONArray Sub_id list

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
Field Data Type Description
result_code String Successfully create a subscriber return code:200
message String Message:Success

29
BOSS API Manual
Example response:
HTTP/1.1 200 OK

Content-Type: application/json

“result_code”: “200”,

"message": "Success"

Error 422
Field Data Type Description
result_code String Error return code: 4010/4011
message String Message:sub_id conflict

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"result_code": "4001",

"message": "some error"

2.1.19 Subscriber Cancel Redirection


Detail:
POST http://ipaddr:port/baicellsapi/customers/cancelredirect
param
Field Data Type Description
session_id String Business serial number
Sub_id_list String Sub_id list

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

30
BOSS API Manual

Field Data Type Description


result_code String Successfully create a subscriber return code:200
message String Message:Success

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

“result_code”: “200”,

"message": "Success"

Error 422
Field Data Type Description
result_code String Error return code: 4010/4011
message String Message:sub_id conflict

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"result_code": "4001",

"message": "some error"

2.1.20 Query Subscriber by IP


Detail:
POST http://ipaddr:port/baicellsapi/customers/querybyip
param
Field Data Type Description
session_id String Business serial number
Ip_addr String Ip_addr

Example request:
POST /baicellsapi/customers/query HTTP/1.1

Content-Type: application/json

"session_id":"2016123456",

"ip_addr": "192.169.1.1"
31
BOSS API Manual
}

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
available boolean true:the imsi can be user
false:the imsi can not be user
sub_id String The internal ID of the subscriber
sub_name String Thename of the subscriber
id_num String The ID number of the subscriber
phone_number String The phone of the subscriber
email String The email of the subscriber
address String The address of the subscriber
service_plan_id String The subscriber bound service plan
sub_status String The suatus of subscriber
“0”:active
“1”:deactive
svc_state String The status of redirection
“0”:no redirection
“1”:direction

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "2016123456",

“result_code”: “200”,

"available": false,

"sub_id": "20161201",

"sub_name": "test name",

"id_num": "123456",

"phone_number": "123456",

"email": "[email protected]",

"address": "test address",

"service_plan_id": "2016001",

"sub_status": "0",

"svc_state": "0"

} or

32
BOSS API Manual
{

"session_id": "2016123456",

"result_code": “200”,

"available": true

2.1.21 Activate Subscriber by IMSI


Detail:
POST http://ipaddr:port/baicellsapi/imsi/activate
param
Field Data Type Description
session_id String Business serial number
imsi String The imsi of the subscriber

Example request:
POST /baicellsapi/imsi/activate HTTP/1.1

Content-Type: application/json

"session_id": "201805180958",

"imsi": "600000000000081"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "201805180958",

"result_code": "200",

"message": "Success"

Error 422
Field Data Type Description

33
BOSS API Manual

session_id String Business serial number


result_code String Error return code: 4000/4002/4003/4004/5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "201805180958",

"result_code": "4002",

"message": "Subscriber dose not exist"

2.1.22 Deactivate Subscriber by IMSI


Detail:
POST http://ipaddr:port/baicellsapi/imsi/deactivate
param
Field Data Type Description
session_id String Business serial number
imsi String The IMSI of the subscriber

Example request:
POST /baicellsapi/imsi/deactivate HTTP/1.1

Content-Type: application/json

"session_id": "201805181105",

"imsi": "600000000000081"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

34
BOSS API Manual
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
session_id String Business serial number
result_code String Error return code: 4000/4002/5001
message String Message

Example response
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "201805181105",

"result_code": "4002",

"message": "Subscriber dose not exist"

2.1.23 Subscriber Redirection by IMSI


Detail:
POST http://ipaddr:port/baicellsapi/imsi/redirect
param
Field Data Type Description
session_id String Business serial number
imsi_list JSONArray imsi list

Example request:
POST http://ipaddr:port/baicellsapi/imsi/redirect HTTP/1.1

Content-Type: application/json

"session_id":"201805181511",

"imsi": "600000000000081"

35
BOSS API Manual
}

Success 200
Field Data Type Description
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code: 4301
message String Message: imsi format error

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "201805181105",

"result_code": "4301",

"message": "imsi format error"

2.1.24 Subscriber Cancel Redirection by IMSI


Detail:
POST http://ipaddr:port/baicellsapi/imsi/cancelredirect
param
Field Data Type
session_id String
imsi_list String

36
BOSS API Manual
Example request:
POST http://ipaddr:port/baicellsapi/imsi/cancelredirect HTTP/1.1

Content-Type: application/json

"session_id":"201805181515",

"imsi": "600000000000081"

Success 200
Field Data Type Description
result_code String Successfully create a subscriber return code:200
message String Message:Success

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id":"201805181515",

"result_code": "200",

"message": "Success"

Error 422
Field Data Type Description
result_code String Error return code: 4301
message String Message: imsi format error

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id":"201805181515",

"result_code": "4301",

"message": "imsi format error"

37
BOSS API Manual

2.1.25 Change Speed by IMSI (Uplink and Downlink)


Detail:
POST http://ipaddr:port/baicellsapi/imsi/updatespeed
param
Field Data Type Length Description
session_id String Business serial number
imsi String The imsi of the subscriber
uplink Int 10 Uplink speed.Unit:MB(maxinum:1000Mb)
downlink Int 10 Downlink speed.Unit:MB(maxinum:1000Mb)

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
result_code String Successfully create a subscriber return code:200
message String Message:Success

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "201805181529",

"result_code": “200”,

"message": "Success"

Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code:

38
BOSS API Manual

Field Data Type Description


4000/4002/4401/4402/4403/4404/5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "201805181529",

"result_code": "4002",

"message": "Subscriber dose not exist"

2.1.26 Query Subscriber by IMSI


Detail:
POST http://ipaddr:port/baicellsapi/imsi/query
param
Field Data Type Description
session_id String Business serial number
imsi String The imsi of the subscriber

Example request:
POST /baicellsapi/imsi/query HTTP/1.1

Content-Type: application/json

"session_id":"2016123456",

"imsi": "600000000000081"

Success 200
Field Data Tpe Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
imsi String imsi
sub_id String The internal ID of the subscriber
sub_name String The name of the subscriber
id_num String The ID number of the subscriber
phone_number String The phone of the subscriber
email String The email of the subscriber
address String The address of the subscriber

39
BOSS API Manual

Field Data Tpe Description


service_plan_id String The subscriber bound service plan
sub_status String The status of subscriber
“0”:active
“1”:deactive
up_rate String Up speed of bind service plan
down_rate String Down speed of bind service plan
apn_info_list JSONArray Bind apn ip information
svc_state String The status of redirection
“0”:no redirection
“1”:direction

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "201805181625",

“result_code”: "200",

"imsi": "600000000000081",

"sub_id": "20161201",

"sub_name": "test name",

"id_num": "123456",

"phone_number": "123456",

"email": "[email protected]",

"address": "test address",

"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"}]

2.1.27 Change Service Plan by IMSI


Detail:
POST http://ipaddr:port/baicellsapi/imsi/changeservice
param

40
BOSS API Manual

Field Data Type Description


session_id String Business serial number
imsi String The imsi of the subscriber
new_service_plan_id String The new service plan id

Example request:
POST /baicellsapi/imsi/updateservice HTTP/1.1

Content-Type: application/json

"session_id": "201805221515",

"imsi": "600000000000081",

"new_service_plan_id": "2016001"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "201805221515",

"result_code": “200”,

"message": "Success"

Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code: 4000/4002/4202/5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "201805221515",

41
BOSS API Manual
"result_code": "4002",

"message": "Subscriber dose not exist"

2.1.28 Modify Subscriber by IMSI


Detail:
POST http://ipaddr:port/baicellsapi/imsi/modify
param
Field Data Type Length Description
session_id String Business serial number
imsi String The imsi of the subscriber
sub_name String 60 The name of the subscriber
id_num String 20 The ID number of the subscriber
phone_number String 20 The phone of the subscriber
email String 60 The email of the subscriber
address String 200 The address of the subscriber

Example request:
POST /baicellsapi/imsi/modify HTTP/1.1

Content-Type: application/json

"session_id":"201805221541",

"imsi": "600000000000081",

"sub_name": "test name",

"id_num": "123456",

"phone_number": "123456",

"email": "[email protected]",

"address": "test address"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Subscribers dose not exist

42
BOSS API Manual
Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "201805221541",

"result_code": "200",

"message": "Success"

Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code:4000/4002/5001
message String Message: sub_id conflict

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "201805221541",

"result_code": "4002",

"message": "Subscribers dose not exist"

2.1.29 Delete Subscriber by IMSI

Detail:
POST http://ipaddr:port/baicellsapi/imsi/delete
param
Field Data Type Description
session_id String Business serial number
imsi String The imsi of the subscriber

Example request:
POST /baicellsapi/imsi/delete HTTP/1.1

Content-Type: application/json

"session_id":"201805221455",

43
BOSS API Manual
"imsi": "600000000000081"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Subscribers dose not exist

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "201805221455",

"result_code": "200",

"message": "Success"

Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code:4000/4002/5001
message String Message: sub_id conflict

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "201805221455",

"result_code": "4002",

"message": "Subscribers dose not exist"

2.1.30 Query Full List of Subscriber IDs


Detail:
GET http://ipaddr:port/baicellsapi/customers/fullList
Success 200
Field Data Type Description
sub list array Full list of sub id
Example response:

44
BOSS API Manual
HTTP/1.1 200 OK

Content-Type: application/json

"sub_list": [

"20220808001065",

"20220808001066"

2.2 Service Plan (Package/Profile) Category

2.2.1 Create Service Plan (Package/Profile)


Detail:
POST http://ipaddr:port/baicellsapi/products/create

param
Field Data Type Length Description
session_id String Business serial number
service_plan_id String 50 The internal ID of the service plan
service_plan_name String 100 The name of the service plan
uplink int 10 Uplink speed.Unit:MB
downlink int 10 Downlink speed.Unit:MB
comments String 100

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

45
BOSS API Manual

Field Data Type Description


session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code:
4200/4201/4401/4402/4403/4404/5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "5001",

"message": "System error"

2.2.2 Modify Service Plan (Package/Profile)


Detail:
POST http://ipaddr:port/baicellsapi/products/modify
param
Field Data Type Length Description
session_id String Business serial number
service_plan_id String The internal ID of the service plan
service_plan_name String 100 The name of the service plan
uplink int 11 Uplink speed.Unit:MB
downlink int 11 Downlink speed.Unit:MB

46
BOSS API Manual

Field Data Type Length Description


comments String 100 Comments

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
Field Data Type Description
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
message String Message:Success

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
result_code String Error return code:
4200/4201/4401/4402/4403/4404/5001
message String Message

47
BOSS API Manual
Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "5001",

"message": "System error"

2.2.3 Get Service Plan by Uplink


Detail:
GET http://ipaddr:port/baicellsapi/products/querybyuplink/{uplink}
Success 200
Field Data Type Description
state String 0:active; 1:inactive

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":"1M",

"uplink":"1",

"downlink":"2",

"state":"0"

48
BOSS API Manual

2.2.4 Get Service Plan by Downlink


Detail:
GET http://ipaddr:port/baicellsapi/products/querybydownlink/{downlink}
Success 200
Field Data Type Description
state String 0:active; 1:inactive

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":"1",

"downlink":"2",

"state":"0"

2.2.5 Get Service Plan by Uplink and Downlink


Detail:
GET http://ipaddr:port/baicellsapi/products/querybylink/{uplink}/{downlink}
Success 200
Field Data Type Description
state String 0:active; 1:inactive

49
BOSS API Manual
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"

2.2.6 Get all Service Plans


Detail:
GET http://ipaddr:port/baicellsapi/products/queryallplans
Success 200
Field Data Type Description
state String 0:active; 1:inactive

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"service_plan_id":"T201611220001",

"service_plan_name":"1M",

"uplink":"1",

"downlink":"1",

50
BOSS API Manual
"state":"0"

},

"service_plan_id":"T201611220002",

"service_plan_name":"2M",

"uplink":"2",

"downlink":"2",

"state":"0"

2.2.7 Delete Service Plan


Detail:
POST http://ipaddr:port/baicellsapi/products/delete

param
Field Data Type Description
session_id String Business serial number
service_plan_id String The internal ID of the service plan

Example request:
POST /products/modify HTTP/1.1

Content-Type: application/json

"session_id": "2016123456",

"service_plan_id": "2016001"

Success 200
Field Data Type Description
session_id String Business serial number
result_code String Successfully return code:200
message String Message:Success

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

51
BOSS API Manual
"session_id": "2016123456",

“result_code”: “200”,

"message": "Success"

Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code:
4200/4202/4207/5001
message String Message

Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "5001",

"message": "System error"

2.2.8 Get Service Plan by ID


Detail:
GET http://ipaddr:port/baicellsapi/products/querybyid/{service_plan_id}
Success 200
Field Data Type Description
state String 0:active;1:inactive

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"

52
BOSS API Manual
}

2.3 SIM Card Category

2.3.1 Query Full List of IMSIs


Detail:
GET http://ipaddr:port/baicellsapi/imsi/fullList
Success 200
Field Data Type Description
Imsi list array Full list of IMSIs

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"imsi_list": [

"454120000000065",

"454120000000066"

2.4 Data Usage

2.4.1 Query Data Usage by Hour Size

NOTE: Not supported in North America CloudCore, but is supported in a Local OMC+BOSS
environment

Detail:
POST http://ipaddr:port/baicellsapi/usage/querybyhour
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.
begin_time String Yes Time interval of queries, Format:yyyy-MM-dd
hh:mm:ss
The maximum time interval is 31 days.

53
BOSS API Manual

Field Data Type Required Description


end_time String Yes Time interval of queries,Format:yyyy-MM-dd
hh:mm:ss
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
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
usage_infos JSONArray Return data list
imsi String imsi
total_usage String Unit (KB)
up_usage String Unit (KB)
down_usage String Unit (KB)
usage_time String Time of Statistical usage. For example:(2018-11-22
10:00:00) means the usage data from 9 o'clock to 10
o'clock.

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "200",

"usage_infos":[

"imsi":"600000000000001",

"total_usage":"204800",

"up_usage":"1000",

"down_usage":"203800",

54
BOSS API Manual
"usage_time":"2018-11-22 10:00:00"

Error 422
Field Data Type Description
session_id String Business serial number
result_code String Error return code: 4701/4702/4703/4704
message String Message
Example response:
HTTP/1.1 422 OK

Content-Type: application/json

"session_id": "2016123456",

"result_code": "4701"

"message": "begin time is required"

2.4.2 Query Data Usage CDR Detail

NOTE: Not supported in North America CloudCore, but is supported in a Local OMC+BOSS
environment

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.
begin_time String Yes Time interval of queries, Format:yyyy-MM-dd
hh:mm:ss
The maximum time interval is 7 days.
end_time String Yes Time interval of queries, Format:yyyy-MM-dd
hh:mm:ss
The maximum time interval is 7 days.

55
BOSS API Manual
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
session_id String Business serial number
result_code String Successfully create a subscriber return code:200
cdr_infos JSONArray Return data list
imsi String imsi
total_usage String Unit (Byte)
up_usage String Unit (Byte)
down_usage String Unit (Byte)
duration String Unit(second)
cdrdate String The time to generate this CDR. Format:yyyy-MM-dd hh:mm:ss

Example response:
HTTP/1.1 200 OK

Content-Type: application/json

"session_id": "2016123456",

"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"

56
BOSS API Manual
}

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"

"message": "begin time is required"

57
BOSS API Manual

3. Appendix:

3.1 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.

5. Call 2.1.7 (bind apn ip interface) to bind APN and IP for this subscriber.

6. Deactivate this subscriber and activate this subscriber again for the APN and IP to take effect.

58
BOSS API Manual

3.2 Remove APN or IP Instructions


1. To modify the configured IP for the subscriber:
Call 2.1.17 bind apn and static ip interface again and set the ip_addr param to a new IP.
2. To delete static ip and retain the APN:
Call 2.1.17 bind apn static ip interface again and remove the "ip_addr" from parameters or
set the ip_addr param to empty.
3. To remove APN and IP:
Call 2.1.18 remove apn and static ip.

59

You might also like