Professional Documents
Culture Documents
CnMaestro 2.4.0 RESTful API
CnMaestro 2.4.0 RESTful API
5/28/20 Page 1 of 90
1 Copyright
© 2020 Cambium Networks Limited. All rights reserved.
This document, Cambium products, and 3rd Party software products described in this document
may include or describe copyrighted Cambium and other 3rd Party supplied computer
programs stored in semiconductor memories or other media. Laws in the United States and
other countries preserve for Cambium, its licensors, and other 3rd Party supplied software
certain exclusive rights for copyrighted material, including the exclusive right to copy,
reproduce in any form, distribute and make derivative works of the copyrighted material.
Accordingly, any copyrighted material of Cambium, its licensors, or the 3rd Party software
supplied material contained in the Cambium products described in this document may not be
copied, reproduced, reverse engineered, distributed, merged or modified in any manner
without the express written permission of Cambium. Furthermore, the purchase of Cambium
products shall not be deemed to grant either directly or by implication, estoppel, or otherwise,
any license under the copyrights, patents or patent applications of Cambium or other 3rd Party
supplied software, except for the normal non-exclusive, royalty free license to use that arises
by operation of law in the sale of a product.
Restrictions
License Agreements
The software described in this document is the property of Cambium and its licensors. It is
furnished by express license agreement only and may be used only in accordance with the
terms of such an agreement.
5/28/20 Page 2 of 90
2 Table of Contents
2.1 Contents
1 Copyright ........................................................................................................................................ 2
2 Table of Contents ........................................................................................................................... 3
2.1 Contents................................................................................................................................. 3
2.2 New APIs in 2.4.0 .................................................................................................................. 8
2.3 Deprecation/Update Notice for Existing APIs ........................................................................ 8
3 Introduction ..................................................................................................................................... 9
3.1 Overview ................................................................................................................................ 9
3.2 Architecture ............................................................................................................................ 9
3.2.1 Establish Session .............................................................................................................. 9
3.2.2 API Access ...................................................................................................................... 10
3.2.3 Session Expiration ........................................................................................................... 10
3.2.4 Concurrent Access .......................................................................................................... 10
3.2.5 Rate Limiting.................................................................................................................... 10
4 Swagger API ................................................................................................................................. 10
4.1 Introduction .......................................................................................................................... 10
4.1.1 Sample Swagger UI Screenshot ..................................................................................... 11
5 Client Id and Client Secret Generation ......................................................................................... 11
5.1 cnMaestro User Interface .................................................................................................... 11
5.2 Step 1: Navigate to Services > API Clients ......................................................................... 11
5.3 Step 2: Create a New API Client ......................................................................................... 12
5.4 Step 3: Download the Client Id and Client Secret ............................................................... 12
6 API Session .................................................................................................................................. 12
6.1 Introduction .......................................................................................................................... 13
6.2 Retrieve Access Token ........................................................................................................ 13
6.2.1 cnMaestro On-Premises .................................................................................................. 13
6.3 Access Resources ............................................................................................................... 14
7 API Details .................................................................................................................................... 14
7.1 HTTP Protocol ..................................................................................................................... 14
7.1.1 HTTP Response Codes .................................................................................................. 14
7.1.2 HTTP Headers................................................................................................................. 15
7.2 REST Protocol ..................................................................................................................... 15
7.2.1 Resource URLs ............................................................................................................... 15
7.2.2 Responses ....................................................................................................................... 16
7.3 Parameters .......................................................................................................................... 17
7.3.1 Field Selection ................................................................................................................. 17
7.3.2 Filtering ............................................................................................................................ 17
7.3.3 Time Filtering ................................................................................................................... 18
7.3.4 Sorting ............................................................................................................................. 18
7.3.5 Pagination........................................................................................................................ 19
8 Access API ................................................................................................................................... 20
8.1 token (basic request) ........................................................................................................... 20
8.1.1 Request ........................................................................................................................... 20
8.1.2 Response ........................................................................................................................ 20
8.1.3 Example ........................................................................................................................... 20
8.2 token (alternate request) ...................................................................................................... 21
8.2.1 Request ........................................................................................................................... 21
8.2.2 Response ........................................................................................................................ 21
8.2.3 Example ........................................................................................................................... 21
8.3 validateToken ...................................................................................................................... 22
8.3.1 Request ........................................................................................................................... 22
8.3.2 Response ........................................................................................................................ 22
8.3.3 Example ........................................................................................................................... 22
9 Devices API .................................................................................................................................. 22
9.1 GET Device details .............................................................................................................. 22
9.1.1 Request ........................................................................................................................... 22
5/28/20 Page 3 of 90
9.1.2 Response ........................................................................................................................ 23
9.1.3 Example ........................................................................................................................... 23
9.2 Onboard Device ................................................................................................................... 25
9.2.1 Request ........................................................................................................................... 25
9.2.2 Response ........................................................................................................................ 26
9.2.3 Example ........................................................................................................................... 26
9.3 Update Device Configuration ............................................................................................... 27
9.3.1 Request ........................................................................................................................... 27
9.3.2 Response ........................................................................................................................ 28
9.3.3 Example ........................................................................................................................... 28
9.4 Device Delete ...................................................................................................................... 29
9.4.1 Request ........................................................................................................................... 29
9.4.2 Response ........................................................................................................................ 29
9.5 Device Operations ............................................................................................................... 30
9.5.1 Overview.......................................................................................................................... 30
9.5.2 Reboot Device ................................................................................................................. 30
9.5.3 Ping ................................................................................................................................. 30
9.5.4 Traceroute ....................................................................................................................... 31
9.5.5 Wi-Fi Performance .......................................................................................................... 32
9.5.6 Client Disconnect............................................................................................................. 34
9.6 Sub-Resources .................................................................................................................... 35
10 Jobs API ....................................................................................................................................... 35
10.1 Overview .............................................................................................................................. 35
10.2 GET Jobs ............................................................................................................................. 35
10.2.1 Request ....................................................................................................................... 35
10.2.2 Response .................................................................................................................... 35
10.2.3 Example ...................................................................................................................... 36
10.3 GET Configuration Job ........................................................................................................ 37
10.3.1 Request ....................................................................................................................... 37
10.3.2 Response .................................................................................................................... 37
10.3.3 Example ...................................................................................................................... 38
10.4 GET Configuration Job Devices .......................................................................................... 38
10.4.1 Request ....................................................................................................................... 39
10.4.2 Response .................................................................................................................... 39
10.4.3 Example ...................................................................................................................... 39
11 Networks API ................................................................................................................................ 40
11.1 Fetch .................................................................................................................................... 40
11.1.1 Request ....................................................................................................................... 40
11.1.2 Response .................................................................................................................... 40
11.1.3 Example ...................................................................................................................... 40
11.2 Create Network .................................................................................................................... 41
11.2.1 Request ....................................................................................................................... 41
11.2.2 Response .................................................................................................................... 41
11.2.3 Example ...................................................................................................................... 42
11.3 Update Network ................................................................................................................... 42
11.3.1 Request ....................................................................................................................... 42
11.3.2 Response .................................................................................................................... 42
11.3.3 Example ...................................................................................................................... 42
11.4 Delete Network .................................................................................................................... 43
11.4.1 Request ....................................................................................................................... 43
11.4.2 Response .................................................................................................................... 43
11.5 Sub-Resources .................................................................................................................... 43
12 Sites API ....................................................................................................................................... 43
12.1 Overview .............................................................................................................................. 43
12.1.1 Request ....................................................................................................................... 43
12.1.2 Response .................................................................................................................... 44
12.2 Create Site ........................................................................................................................... 44
12.2.1 Request ....................................................................................................................... 44
12.2.2 Response .................................................................................................................... 45
12.2.3 Example ...................................................................................................................... 45
5/28/20 Page 4 of 90
12.3 Update Site .......................................................................................................................... 45
12.3.1 Request ....................................................................................................................... 45
12.3.2 Response .................................................................................................................... 46
12.3.3 Example ...................................................................................................................... 46
12.4 Delete Site ........................................................................................................................... 46
12.4.1 Request ....................................................................................................................... 46
12.4.2 Response .................................................................................................................... 46
12.5 Sub-Resources .................................................................................................................... 46
13 Towers API ................................................................................................................................... 47
13.1 Overview .............................................................................................................................. 47
13.1.1 Request ....................................................................................................................... 47
13.1.2 Response .................................................................................................................... 47
13.2 Create Tower ....................................................................................................................... 47
13.2.1 Request ....................................................................................................................... 48
13.2.2 Response .................................................................................................................... 48
13.2.3 Example ...................................................................................................................... 48
13.3 Update Tower ...................................................................................................................... 48
13.3.1 Request ....................................................................................................................... 48
13.3.2 Response .................................................................................................................... 49
13.3.3 Example ...................................................................................................................... 49
13.4 Delete Tower ....................................................................................................................... 49
13.4.1 Request ....................................................................................................................... 49
13.4.2 Response .................................................................................................................... 49
13.5 Sub-Resources .................................................................................................................... 50
14 Statistics API ................................................................................................................................ 50
14.1.1 Overview ..................................................................................................................... 50
14.1.2 Request ....................................................................................................................... 50
14.1.3 Response .................................................................................................................... 50
15 Performance API .......................................................................................................................... 54
15.1.1 Device ......................................................................................................................... 54
15.1.2 Request ....................................................................................................................... 54
15.1.3 Response .................................................................................................................... 55
16 WiFi APIs ...................................................................................................................................... 57
16.1 WiFi Clients .......................................................................................................................... 57
16.1.1 Request ....................................................................................................................... 57
16.1.2 Response .................................................................................................................... 57
16.2 WiFi Wired Clients ............................................................................................................... 58
16.2.1 Request ....................................................................................................................... 58
16.2.2 Response .................................................................................................................... 58
16.3 WiFi Mesh Peers ................................................................................................................. 59
16.3.1 Request ....................................................................................................................... 59
16.3.2 Response .................................................................................................................... 59
16.3.3 Example ...................................................................................................................... 60
16.3.4 Sub-Resources ........................................................................................................... 60
15.3 WiFi Clients Summary .......................................................................................................... 62
15.3.1 Request ............................................................................................................................ 62
15.3.2 Response ......................................................................................................................... 62
15.3.3 Example............................................................................................................................. 63
17 Alarms API .................................................................................................................................... 63
17.1 Active Alarms ....................................................................................................................... 63
17.1.1 Request ....................................................................................................................... 63
17.1.2 Response .................................................................................................................... 63
17.2 Alarm History ....................................................................................................................... 64
17.2.1 Request ....................................................................................................................... 64
17.2.2 Response .................................................................................................................... 64
18 Events API .................................................................................................................................... 65
18.1.1 Overview ..................................................................................................................... 65
19 Sessions API ................................................................................................................................ 66
19.1.1 Overview ..................................................................................................................... 66
20 Guest Access Portal API .............................................................................................................. 67
5/28/20 Page 5 of 90
20.1 List of Guest Access Portals ................................................................................................ 67
20.1.1 Overview ..................................................................................................................... 67
20.1.2 Example ...................................................................................................................... 67
20.2 Update Whitelist on Guest Access Portal ............................................................................ 68
20.2.1 Overview ..................................................................................................................... 68
20.2.2 Request ....................................................................................................................... 68
20.2.3 Example ...................................................................................................................... 68
20.3 List of Vouchers ................................................................................................................... 69
20.3.1 Overview ..................................................................................................................... 69
20.3.2 Request ....................................................................................................................... 69
20.3.3 Example ...................................................................................................................... 69
20.4 Generate Vouchers .............................................................................................................. 70
20.4.1 Overview ..................................................................................................................... 70
20.4.2 Request ....................................................................................................................... 70
20.4.3 Example ...................................................................................................................... 70
20.5 List of Login events .............................................................................................................. 71
20.5.1 Overview ..................................................................................................................... 71
20.5.2 Request ....................................................................................................................... 71
20.5.3 Example ...................................................................................................................... 72
21 Managed Accounts API ................................................................................................................ 72
21.1 List of managed accounts .................................................................................................... 72
21.1.1 Overview ..................................................................................................................... 72
21.1.2 Example ...................................................................................................................... 73
21.2 Create managed account .................................................................................................... 73
21.2.1 Overview ..................................................................................................................... 73
21.2.2 Request ....................................................................................................................... 73
21.2.3 Example ...................................................................................................................... 74
21.3 Update managed account .................................................................................................... 74
21.3.1 Overview ..................................................................................................................... 74
21.3.2 Request ....................................................................................................................... 74
21.3.3 Example ...................................................................................................................... 75
21.4 Delete managed account ..................................................................................................... 75
21.4.1 Overview ..................................................................................................................... 75
21.4.2 Request ....................................................................................................................... 75
21.4.3 Example ...................................................................................................................... 75
21.5 Sub-Resources .................................................................................................................... 75
22 Managed Services API ................................................................................................................. 76
22.1 List of managed services ..................................................................................................... 76
22.1.1 Overview ..................................................................................................................... 76
22.1.2 Example ...................................................................................................................... 76
22.2 Create managed service ...................................................................................................... 77
22.2.1 Overview ..................................................................................................................... 77
22.2.2 Request ....................................................................................................................... 77
22.2.3 Example ...................................................................................................................... 77
22.3 Update managed service ..................................................................................................... 78
22.3.1 Overview ..................................................................................................................... 78
22.3.2 Request ....................................................................................................................... 78
22.3.3 Example ...................................................................................................................... 78
22.4 Delete managed service ...................................................................................................... 79
22.4.1 Overview ..................................................................................................................... 79
22.4.2 Request ....................................................................................................................... 79
22.4.3 Example ...................................................................................................................... 79
23 WLAN ePSK API .......................................................................................................................... 79
23.1 Fetch ePSK Entries ............................................................................................................. 79
23.1.1 Request ....................................................................................................................... 79
23.1.2 Response .................................................................................................................... 80
23.1.3 Example ...................................................................................................................... 80
23.2 Generate ePSK Entries ....................................................................................................... 81
23.2.1 Request ....................................................................................................................... 81
23.2.2 Response .................................................................................................................... 81
5/28/20 Page 6 of 90
23.2.3 Example ...................................................................................................................... 81
23.3 Delete ePSK Entry ............................................................................................................... 82
23.3.1 Request ....................................................................................................................... 82
23.3.2 Response .................................................................................................................... 82
23.3.3 Examples .................................................................................................................... 82
24 Software update API..................................................................................................................... 83
24.1 Start software update on devices ........................................................................................ 83
24.1.1 Overview ..................................................................................................................... 83
24.2 GET software update jobs ................................................................................................... 84
24.2.1 Overview ..................................................................................................................... 84
24.2.2 Example ...................................................................................................................... 85
24.3 GET software update jobs devices ...................................................................................... 86
24.3.1 Request ....................................................................................................................... 86
24.3.2 Response .................................................................................................................... 86
24.3.3 Example ...................................................................................................................... 87
25 Sample Python Code ................................................................................................................... 87
25.1 API Client ............................................................................................................................. 87
25.2 Code .................................................................................................................................... 87
26 Appendix: API List ........................................................................................................................ 88
27 Appendix: Device Details ............................................................................................................. 90
27.1 Reboot Reason .................................................................................................................... 90
28 Contacting Cambium Networks .................................................................................................... 90
5/28/20 Page 7 of 90
2.2 New APIs in 2.4.0
All new APIs are defined through Swagger documentation
(https://docs.cloud.cambiumnetworks.com/api/2.4.0/index.html). For more details on how Swagger is
used in cnMaestro, please see Section 4.
Path Details
AP Groups API
/api/v1/wifi_enterprise/ap_groups Returns list of AP Groups
/api/v1/wifi_enterprise/ap_groups Create an AP Group
/api/v1/wifi_enterprise/ap_groups/{ap_group_name} Returns a single AP Group’s information
/api/v1/wifi_enterprise/ap_groups/{ap_group_name} Update an AP Group
/api/v1/wifi_enterprise/ap_groups/{ap_group_name} Delete an AP Group
/api/v1/msp/managed_accounts/{managed_account}/wifi
Delete an AP Group
_enterprise/ap_groups/{ap_group_name}
WLANs API
/api/v1/wifi_enterprise/wlans Returns list of WLANs
/api/v1/wifi_enterprise/wlans Create a WLAN
/api/v1/wifi_enterprise/wlans/{wlan_name} Returns a single WLANs’s information
/api/v1/wifi_enterprise/wlans/{wlan_name} Update a WLAN
/api/v1/wifi_enterprise/wlans/{wlan_name} Delete a WLAN
/api/v1/msp/managed_accounts/{managed_account}/wifi
Delete a WLAN
_enterprise/wlans/{wlan_name}
5/28/20 Page 8 of 90
managed_account: “account_1
}
PUT /msp/managed_accounts/{msp_name}/<resource api> <resource api>
Body: { managed_account: <msp_name> }
For example:
/msp/managed_accounts/account_1/networks/network_1/ For example:
sites/site_1 /networks/network_1/sites/site_1
Body: Body:
{ {
name: “site_2” name: “site_2” ,
} managed_account: “account_1
}
This deprecation will only be applicable for GET, POST and PUT request methods. Other request
methods will continue to work as before. This decision is taken to make all APIs filters consistent, having
to manage managed_account filter separately becomes difficult in this extensive API framework.
3 Introduction
3.1 Overview
cnMaestro supports a RESTful API as part of its On-Premises deployment. This API allows customers
to read data and perform operations programmatically using their own client applications. The API is
supported over HTTPS, and messages are exchanged in JSON format. Modern programming
languages have rich support for RESTful interfaces.
3.2 Architecture
A basic OAuth2 API session is presented below. The client retrieves an Access Token to start the
session. It sends API requests until the Access Token times out, at which point the token can be
regenerated.
cnMaestro
Application
On-Premises
A session is created by sending the Client Id and Client Secret to the cnMaestro server. These are
generated in the cnMaestro UI and stored with the application. The Client Id defines the cnMaestro
account and application, and the Client Secret is a private string mapped to the specific application.
The Client Secret should be stored securely.
5/28/20 Page 9 of 90
If the session is established successfully, an Access Token is returned along with an Expiration
string. The Access Token is used to authenticate the session. The Expiration is the interval, in
seconds, in which the Access Token remains valid. If the Access Token expires, a new session needs
to be created.
With the Access Token, the application can make cnMaestro API calls. The token is sent in an
Authentication header on each API request. Details are provided later in this document.
If a token expires, an expiration error message is returned to the client. The client can then generate a
new token using the Client Id and Client Secret. Tokens will expire immediately if the Client API
account that created them is deleted. The default expiration time for a token is 3600 seconds (1 hour).
This is configurable in the UI.
Each client supports a single Access Token or multiple Access Tokens. Multiple Access Tokens
allows concurrent access.
If only one Access Token is enabled at a time, whenever a new Access Token is generated from the
Client Id and Client Secret, the previous Token will immediately expire.
If multiple access tokens are supported, then many clients can concurrently access the API. If another
Access Token is created, the previous will remain valid until their original expiration.
Request Rate Limiting is not enabled in the On-Premises version of cnMaestro. It is up to the
application owner to make sure requests do not overtax the system.
4 Swagger API
4.1 Introduction
The RESTful APIs documentation is now supported through Swagger. Swagger UI allows
visualization and interaction with the API resources. You can access Swagger by navigating to
Services > API Clients grid and clicking on <Swagger API documentation>.
5/28/20 Page 10 of 90
4.1.1 Sample Swagger UI Screenshot
5/28/20 Page 11 of 90
5.3 Step 2: Create a New API Client
Select the button Add API Client to add a client, then fill in the requested details, and click on ‘save’
button.
6 API Session
5/28/20 Page 12 of 90
6.1 Introduction
The cnMaestro API leverages the Client Credentials section of the OAuth 2.0 Authorization
Framework (RFC 6749). An API Session can be created using any modern programming language.
The examples below highlight how messages are encoded and responses returned.
Note
The steps below are for the On-Premises release of cnMaestro.
In order to generate a session, the client should retrieve an access token from cnMaestro. This is
done by base64 encoding the client_id and client_secret downloaded from the cnMaestro
Web UI and sending them to the cnMaestro server. The Authorization header is created by
base64 encoding these fields as defined below. Note the fields are separated by a colon (:):
In the body of the POST the parameter grant_type must be set to client_credentials.
grant_type=client_credentials
Alternatively, instead of using the Authorization header, the credentials can be passed within the
body of the POST:
grant_type=client_credentials&client_id=s6BhdRkqt3&client_secret=7Fjfp0ZBr1KtDRbn
fVdmIw
The response returned from cnMaestro includes the access_token that should be used in
subsequent requests. The expires_in field defines how many seconds the token is valid.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"bearer",
"expires_in":3600
}
5/28/20 Page 13 of 90
If there is an error, an HTTP 400 (Bad Request) error code is returned along with one of the following
error messages:
Message Details
invalid_request Required parameter is missing from the request.
invalid_client Client authentication failed.
unauthorized_client The client is not authorized to use the grant type sent.
unsupported_grant_type The grant type is not supported.
{
"error": "invalid_request"
}
GET /api/v1/inventory/device
Accept: application/json
Authorization: Bearer ACCESS_TOKEN
7 API Details
7.1 HTTP Protocol
7.1.1 HTTP Response Codes
The following response codes are supported in cnMaestro and may be returned through the HTTP
protocol.
5/28/20 Page 14 of 90
7.1.2 HTTP Headers
Header Details
Used in every API request to send the Access Token.
Authorization
Example: Authorization: Bearer <Access-Token>
Accept Set to application/json
Content-Type Set to application/json
The format for cnMaestro path and parameters are the following:
/api/{version}/{resource}?{parameter}={value}&{parameter}={value}
/api/{version}/{resource}/{resource_id}?{parameter}={value}&{parameter}={value}
/api/{version}/{resource}/{sub-resource}?{parameter}={value}&{parameter}={value}
For example – read the statistics for MAC, Type, and IP on all devices:
/api/v1/devices/statistics?fields=mac,type,ip_wan
Version
Resource
Context Details
alarms Current active alarms.
alarms/history Historical alarms, including active alarms.
devices Devices, including ePMP, PMP, and WiFi.
events Historical events.
msp MSP managed services.
networks Configured networks.
sites Configured WiFi sites.
towers Configured Fixed Wireless towers.
Sub-Resources
Sub-Resources apply to top-level resources. They provide a different view of the resource data, or a
filtered collection based upon the resource. They include:
Context Details
5/28/20 Page 15 of 90
alarms Alarms mapped to the top-level resource.
alarms/history Historical alarms mapped to the top-level resource.
clients Wireless LAN clients mapped to the top-level resource.
devices Devices mapped to the top-level resource.
events Events mapped to the top-level resource.
mesh/peers Wireless LAN mesh peers mapped to the top-level resource.
operations Operations available to the top-level resource
performance Performance data for the top-level resource.
statistics Statistics for the top-level resource.
7.2.2 Responses
Successful Response
In a successful HTTP 200 response, data is returned using the following structure. The actual payload
is presented in JSON format. The request URL is:
/api/v1/devices?fields=mac,type&limit=5
{
"paging": {
"offset": 0,
"limit": 5,
"total": 540
},
"data": [
{
"mac": "C1:00:0C:00:00:21",
"type": "wifi-home"
},
{
"mac": "C1:00:0C:00:00:18",
"type": "wifi-home"
},
{
"mac": "C1:00:0C:00:00:12",
"type": "wifi-home"
},
{
"mac": "C1:00:0C:00:00:15",
"type": "wifi-home"
},
{
"mac": "C1:00:0C:00:00:06",
"type": "wifi-home"
}
]
}
Error Response
Error responses return a message and an error cause. If the start_time and stop_time are mandatory
query parameters and some once missed to provide them in the url will give the following error
response with message and cause.
{
"error": {
"message": "Missing required property: stop_time \n Missing required
property: start_time",
"cause": "InvalidInputError"
}
}
5/28/20 Page 16 of 90
7.3 Parameters
Most APIs can be modified to filter the data and limit the number of entries returned. The parameter
options are listed below. The specific fields, and the appropriate values, vary for each API.
Field selection is supported through the optional “fields” parameter, which can specify the specific
data to return from the server. If this parameter is missing, all available fields will be returned.
Parameter Details
fields Define exactly what fields should be returned in a request. The names are
provided as a comma-separated list.
Example: To retrieve name, type and location information for all devices.
Request: /api/v1/devices?fields=mac,type
Response:
{
"paging": {
"total": 3,
"limit": 100,
"offset": 0
},
"data": [
{
"mac": "00:44:E6:34:89:48",
"type": "wifi-enterprise"
},
{
"mac": "00:44:16:E5:33:E4",
"type": "wifi-enterprise"
},
{
"mac": "00:44:26:46:32:22",
"type": "wifi-enterprise"
}
]
}
7.3.2 Filtering
A subset of fields support filtering. These are defined as query parameters for a particular resource,
and they are listed along with the API specification. Some of the standard filtering parameters are
below:
Field Details
network (Devices) Configured Network name.
severity (Alarms, Events) Alarm or Event severity (critical, major, minor, notice).
site (Devices) Configured Site name.
state (Alarms) Alarm state (active, cleared).
status (Devices) Device status [online, offline, onboarding]
tower (Devices) Configured Tower name.
(Devices) Device type [epmp, pmp, wifi-enterprise, wifi-home, wifi] (wifi
type
includes wifi-home and wifi-enterprise).
5/28/20 Page 17 of 90
Request: /api/v1/devices?type=wifi&status=online
Response:
{
"paging": {
"total": 1,
"limit": 100,
"offset": 0
},
"data": [
{
"ip": "233.187.212.38",
"location": {
"type": "Point",
"coordinates": [
77.55310127974755,
12.952351523837196
]
},
"mac": "C1:00:0C:00:00:24",
"msn": "SN-C1:00:0C:00:00:24",
"name": "Hattie",
"network": "Bangalore",
"product": "cnPilot R201",
"registration_date": "2017-05-23T21:28:37+05:30",
"status": "offline",
"tower": "Bangalore_Industrial",
"type": "wifi-home",
"hardware_version": "V1.1",
"software_version": "2.4.4",
"status_time": 1495560086
}
]
}
Events, Alarms, and Performance data can be filtered by date and time using ISO 8601 format.
The parameters are below. If they are not specified, then the start or stop times will be open-ended.
Parameter Details
start_time Inclusive start time of interval.
stop_time Inclusive stop time of interval.
7.3.4 Sorting
Sorting is supported on a selected subset of fields within certain requests. sort is used to specify
sorting columns. The sort order is ascending unless the path name is prefixed with a ‘-‘, in which case
it would be descending.
Parameter Details
sort Used to get the records in the order of the given attribute.
5/28/20 Page 18 of 90
7.3.5 Pagination
The limit and offset query parameters are used to paginate responses.
Parameter Details
limit Maximum number of records to be returned from the server.
offset Starting index to retrieve the data.
When clients try to access a resource type without pagination, the server will return the first 100
entries that match the filter criteria. The response will always carry a metadata to convey total count
and current offset and limit. Maximum number of results at any point is 100 even though limit provided
as more than 100.
5/28/20 Page 19 of 90
Parameter Details
limit Current setting for the limit.
offset Starting index for the records returned in the response (begins at 0).
total Total number of records that can be retrieved.
8 Access API
8.1 token (basic request)
POST /api/v1/access/token
Generate an Access Token using the Client Id and Client Password created in the cnMaestro UI. The
token can be leveraged for API calls through the expiration time. Only one token is supported for each
Client Id at any given time.
8.1.1 Request
Headers
Header Value
Accept (optional) application/json
Authorization Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
Content-Type application/x-www-form-urlencoded
The client_id and client_secret are encoded and sent in the Authorization header. The
encoding is:
BASE64(client_id:client_secret)
Body
grant_type=client_credentials
8.1.2 Response
Body
Name Details
access_token Access token to return with each API request.
expires_in Time in seconds that the API session will remain active.
token_type This will always be bearer.
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"bearer",
"expires_in":3600
}
8.1.3 Example
Request
5/28/20 Page 20 of 90
curl https://10.110.134.12/api/v1/access/token \
-X POST -k \
-u 8YKCxq72qpjnYmXQ:pcX5BmdJ2f4QLM5RfgsS4jOtxAdTRF \
-d grant_type=client_credentials
Response
{"access_token":"d587538f445d30eb2d48e1b7f7a6c9657d32068e","token_type":"
bearer","expires_in":86400}
POST /api/v1/access/token
An alternative form is supported in which the client_id and client_secret are sent in the body,
rather than the Authorization header.
8.2.1 Request
Headers
Header Value
Accept (optional) application/json
Content-Type application/x-www-form-urlencoded
Body
grant_type=client_credentials&client_id=s6BhdRkqt3&client_secret=7Fjfp0ZBr1KtDRbn
fVdmIw
8.2.2 Response
Body
Name Details
access_token Access token to return with each API request.
expires_in Time in seconds that the API session will remain active.
token_type This will always be bearer.
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"bearer",
"expires_in":3600
}
8.2.3 Example
Request
curl https://10.110.134.12/api/v1/access/token \
-X POST -k \
-d grant_type=client_credentials \
-d client_id=8YKCxq72qpjnYmXQ \
-d client_secret=pcX5BmdJ2f4QLM5RfgsS4jOtxAdTRF
Response
{"access_token":"ee4e077cf457196eb4d27cf6f02686dc07763059","token_type":"
bearer","expires_in":86400}
5/28/20 Page 21 of 90
8.3 validateToken
GET /api/v1/access/validate_token
Verify an Access Token is valid and return the time remaining before it expires.
8.3.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
8.3.2 Response
Body
Name Details
expires_in Time in seconds that the API session will remain active.
{
'expires_in': 86399
}
8.3.3 Example
Request
curl https://10.110.134.12/api/v1/access/validate_token \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{"expires_in":85643}
9 Devices API
9.1 GET Device details
GET /api/v1/devices
9.1.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
5/28/20 Page 22 of 90
Managed account name filter.
9.1.2 Response
Body
9.1.3 Example
5/28/20 Page 23 of 90
Request
curl https://10.110.134.12/api/v1/devices \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"paging": {
"offset": 0,
"limit": 100,
"total": 2
},
"data": [
{
"ap_group": "automation1",
"config": {
"sync_reason": "Device's mapped profile updated",
"sync_status": false,
"variables": {
"VLAN_1_MODE": "static",
"VLAN_1_IP": "10.110.212.105",
"VLAN_1_MASK": "255.255.255.0",
"DEFAULT_GW": "10.110.212.254",
"DNS_SERVER_1": "10.110.12.110",
"DNS_SERVER_2": "10.110.12.111",
"DISPLAY_NAME": "400-105"
},
"version": 5
},
"hardware_version": "Dual-Band Indoor Omni 802.11ac",
"ip": "10.110.212.105",
"location": {
"coordinates": [
78.486671,
17.385044
],
"type": "Point"
},
"mac": "00:04:56:AC:42:5A",
"managed_account": "",
"msn": "W8RK238260NF",
"name": "400-105",
"network": "Automation",
"product": "cnPilot E400",
"registration_date": "2017-05-31T09:58:32+00:00",
"site": "Automation-site2",
"software_version": "3.3-r16",
"status": "offline",
"status_time": 10459542,
"type": "wifi-enterprise",
"site_id": "Automation-site-id"
},
{
"ap_group": "automation2",
"config": {
"sync_reason": "Device's mapped profile updated",
"sync_status": false,
"variables": {
"VLAN_1_MODE": "static",
"VLAN_1_IP": "10.110.212.125",
"VLAN_1_MASK": "255.255.255.0",
"DEFAULT_GW": "10.110.212.254",
"DNS_SERVER_1": "10.110.12.110",
"DNS_SERVER_2": "10.110.12.111",
"DISPLAY_NAME": "E500-1256"
},
"version": 5
5/28/20 Page 24 of 90
},
"hardware_version": "Dual-Band Outdoor Omni 802.11ac",
"ip": "10.110.212.125",
"location": {
"coordinates": [
78.486671,
17.385044
],
"type": "Point"
},
"mac": "00:04:56:BB:13:42",
"managed_account": "testmsp",
"msn": "W8SG4152XHM0",
"name": "E500-1256",
"network": "Automation",
"product": "cnPilot E500",
"registration_date": "2017-05-31T09:58:32+00:00",
"site": "Automation-site2",
"software_version": "3.3-r16",
"status": "offline",
"status_time": 10459550,
"type": "wifi-enterprise",
"site_id": "Automation-site-id"
}
]
}
POST /api/v1/devices
9.2.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
Header Value
ap_group Set the AP group name for the device
approved Pre-Approve the device during claim [ true, false ]
description Basic information about the device
latitude Set the latitude for the device
longitude Set the longitude for the device
mac MAC address of the device (required)
managed_account Set Managed account name if device needs to be claimed in a non
admin account
name Set the name of the device
network Set the network name for the device
overrides.auto_set.network true/false if user wants to override the default VLAN which device is
using to connect with maestro
overrides.channel_24 [Override] Radio 2.4 GHz channel settings defined in AP group
5/28/20 Page 25 of 90
overrides.channel_5 [Override] Radio 5 GHz channel settings defined in AP group
overrides.default_gw [Override] Default gateway device used to connect with maestro, only
applicable if overrides.auto_set.network is set to false
[Override] Primary DNS server, only applicable if
overrides.dns_server_1
overrides.auto_set.network is set to false
[Override] Secondary DNS server, only applicable if
overrides.dns_server_2
overrides.auto_set.network is set to false
overrides.power_24 [Override] Power level for 2.4 GHz radio defined in AP group
overrides.power_5 [Override] Power level for 5 GHz radio defined in AP group
site Set the site name for the Wi-Fi devices only parameter [wifi-enterprise or
wifi-home]
software_version Provision the software version of the device during onboarding
template Specify the configuration template to apply to the device
type Device type [epmp, pmp, wifi-enterprise, wifi-home] (required)
[Override] Set all the User-Defined Overrides variables defined inside
variables the AP group. It is of type object with all the user-defined parameter
[key-value]
It’s an array of object where multiple VLAN settings can be overridden
defined inside the AP group. For the VLAN ID that the device uses to
vlans
connect to cnMaestro, these are only applicable if
overrides.auto_set.network is set to false
vlans[0].id [Override] VLAN ID [1-4094]
vlans[0].ip [Override] IP address of the device to be set on VLAN <id>
vlans[0].mask [Override] 32 Bit mask used to divide an IP
vlans[0].mode [Override] IP mode [dhcp, static]
wlans An array of objects where multiple WLAN settings can be overridden.
WLANs are specified within the AP group.
wlans[0].id [Override] The current SSID of the WLAN being overridden
wlans[0].passphrase [Override] Password for SSID
wlans[0].shutdown [Override] Enable/disable WLAN [true, false]
wlans[0].ssid [Override] The desired SSID for this WLAN
9.2.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
Body
9.2.3 Example
Request
curl https://10.110.134.12/api/v1/devices \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"mac":"11:22:33:44:55:66",
"name": "Test",
"type": "wifi-enterprise",
"approved": true,
"software_version":"3.7.1-r3",
"ap_group":"Default Enterprise",
"overrides":{
"power_5":"5",
"power_24":"5",
"channel_5":"40",
5/28/20 Page 26 of 90
"channel_24":"11",
"default_gw":"192.168.1.254",
"dns_server_1":"1.1.1.1",
"dns_server_2":"1.1.0.0",
"auto_set":{
"network": false
},
"vlans":[{
"id":1,
"ip":"192.162.1.1",
"mask":"255.255.255.0",
"mode":"static"
}],
"wlans":[{
"id":"cnPilot",
"ssid":"FREE_WIFI",
"passphrase":"******",
"shutdown":false
}]
},
"variables":{
"FOO":"New_value",
"BAR":"12345"
}
}
9.3.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
Header Value
ap_group Set the AP group name for the device
approved Pre-Approve the device during claim [true, false]
description Basic information about the device
latitude Set the latitude for the device
longitude Set the longitude for the device
name Set the name of the device
network Set the network name for the device
true/false if user wants to override the default VLAN which device is
overrides.auto_set.network
using to connect with maestro
overrides.channel_24 [Override] Radio 2.4 GHz channel settings defined in AP group
overrides.channel_5 [Override] Radio 5 GHz channel settings defined in AP group
[Override] Default gateway device used to connect with maestro, only
overrides.default_gw
applicable if overrides.auto_set.network is set to false
5/28/20 Page 27 of 90
[Override] Primary DNS server, only applicable if
overrides.dns_server_1
overrides.auto_set.network is set to false
[Override] Secondary DNS server, only applicable if
overrides.dns_server_2
overrides.auto_set.network is set to false
overrides.power_24 [Override] Power level for 2.4 GHz radio defined in AP group
overrides.power_5 [Override] Power level for 5 GHz radio defined in AP group
site Set the site name for the wifi devices only parameter [wifi-enterprise or
wifi-home]
software_version Provision the software version of the device during onboarding
target_managed_account Set the managed account name if the device needs to be moved
template Specify the configuration template to apply to the device
[Override] Set all the User-Defined Overrides variables defined inside
variables the AP group. It is of type object with all the user-defined parameter
[key-value]
It’s an array of object where multiple VLAN settings can be overridden
defined inside the AP group. For the VLAN ID that the device uses to
vlans
connect to cnMaestro, these are only applicable if
overrides.auto_set.network is set to false
vlans[0].id [Override] VLAN ID [1-4094]
vlans[0].ip [Override] IP address of the device to be set on VLAN <id>
vlans[0].mask [Override] 32 Bit mask used to divide an IP
vlans[0].mode [Override] IP mode [dhcp, static]
wlans An array of objects where multiple WLAN settings can be overridden.
WLANs are specified within the AP group.
wlans[0].id [Override] The current SSID of the WLAN being overridden
wlans[0].passphrase [Override] Password for SSID
wlans[0].shutdown [Override] Enable/Disable WLAN [true, false]
wlans[0].ssid [Override] The desired SSID for this WLAN
9.3.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details). If success and an ap_group or template was specified, a Job
is created and started.
Body
Note
The Job can be tracked using the job_id, to determine if it completes successfully.
9.3.3 Example
Request
curl https://10.110.134.12/api/v1/devices/11:22:33:44:55:66 \
-X PUT -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
5/28/20 Page 28 of 90
{
"name": "Test",
"software_version":"3.7.1-r3",
"ap_group":"Default Enterprise",
"overrides":{
"power_5":"5",
"power_24":"5",
"channel_5":"40",
"channel_24":"11",
"default_gw":"192.168.1.254",
"dns_server_1":"1.1.1.1",
"dns_server_2":"1.1.0.0",
"auto_set":{
"network": false
},
"vlans":[{
"id":1,
"ip":"192.162.1.1",
"mask":"255.255.255.0",
"mode":"static"
}],
"wlans":[{
"id":"cnPilot",
"ssid":"FREE_WIFI",
"passphrase":"******",
"shutdown":false
}]
},
"variables":{
"UNIQUE_PLACEMENT":"indoor",
"SSH_ENABLE":"true"
}
}
9.4.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
9.4.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details). If success, device is deleted.
5/28/20 Page 29 of 90
9.5 Device Operations
9.5.1 Overview
The table below list all operations currently supported and their device types.
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
9.5.3 Ping
The PING Test uses HTTP POST to start the test and HTTP GET to retrieve the results. The MAC
address is the AP running the test.
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Parameters
Request
curl https://10.110.134.12/api/v1/devices/11:22:33:44:55:66/ping \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"destination": "www.google.com"
}
Response
{
"data": {
"result": "Please fetch the status using GET request before it expires in
5 mins",
"url": "/api/v1/devices/11:22:33:44:55:66/ping"
5/28/20 Page 30 of 90
}
}
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Request
curl https://10.110.134.12/api/v1/devices/11:22:33:44:55:66/ping \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"message": {
"status": "Complete",
"data": [
"PING www.google.com (216.58.194.68): 32 data bytes\n40 bytes from
216.58.194.68: seq=0 ttl=51 time=26.229 ms\n40 bytes from 216.58.194.68: seq=1
ttl=51 time=25.996 ms\n40 bytes from 216.58.194.68: seq=2 ttl=51 time=25.730
ms\n",
"40 bytes from 216.58.194.68: seq=3 ttl=51 time=25.928 ms\n40 bytes
from 216.58.194.68: seq=4 ttl=51 time=25.864 ms\n",
"\n--- www.google.com ping statistics ---\n5 packets transmitted, 5
packets received, 0% packet loss\nround-trip min/avg/max = 25.730/25.949/26.229
ms\n"
]
}
}
9.5.4 Traceroute
The Traceroute Test uses HTTP POST to start the test and HTTP GET to retrieve the results. The
MAC address is the AP running the test.
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Parameters
5/28/20 Page 31 of 90
Note: ICMP maps to the ‘raw’ selection, and UDP maps to the ‘dgram’ selection in
the Linux traceroute command.
ttl Boolean Display TTL [true, false] default false
verbose Boolean Verbose output (-v) [true, false] default false
Request
curl https://10.110.134.12/api/v1/devices/{MAC Address}/traceroute \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"destination": "www.google.com"
}
Response
{
"data": {
"result": "Please fetch the status using GET request before it expires in
5 mins",
"url": "/api/v1/devices/11:22:33:44:55:66/traceroute"
}
}
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Request
curl https://10.110.134.12/api/v1/devices/11:22:33:44:55:66/traceroute \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"message": {
"status": "Complete",
"data": [
"traceroute to www.google.com (216.58.194.36), 30 hops max, 38 byte
packets\n 1 10.120.154.254 (10.120.154.254) 0.466 ms 0.388 ms 0.363 ms\n 2",
" *",
" *"
]
}
}
The Wi-Fi Performance uses HTTP POST to start the test and HTTP GET to retrieve the results. The
MAC address is the AP running the test. It is supported only for cnPilot E and cnPilot R series device.
Note: Minimum supported software version for cnPilot E is 3.2 and cnPilot R is 4.3.3. WifiPerf daemon
should be running on both endpoints. WifiPerf performance interoperates with the open source
zapwireless tool. Download instructions are provided in cnMaestro user guide
(https://support.cambiumnetworks.com/files/cnmaestro/).
5/28/20 Page 32 of 90
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Parameters
Request
curl https://10.110.134.12/api/v1/devices/{MAC Address}/wi-fiperf \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"destination": "www.google.com",
"direction": "downlink"
}
Response
{
"data": {
"result": "Please fetch the status using GET request before it expires in
5 mins",
"url": "/api/v1/devices/11:22:33:44:55:66/wi-fiperf"
}
}
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Request
curl https://10.110.134.12/api/v1/devices/11:22:33:44:55:66/wi-fiperf \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"message": {
"status": "complete",
"source": "10.120.154.19",
"destination": "10.120.154.132",
"throughput": "395.8mbps",
"average": "342.6",
"dropped": "0"
}
}
5/28/20 Page 33 of 90
9.5.6 Client Disconnect
The Client Disconnect uses HTTP POST to start the client disconnect and HTTP GET to retrieve the
results. The MAC address is the AP on which clients will be disconnected.
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Parameters
Request
curl https://10.110.134.12/api/v1/devices/{MAC Address}/disconnect_clients \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"clients": [‘all’]
}
Response
{
"data": {
"result": "Please fetch the status using GET request before it expires in
5 mins",
"url": "/api/v1/devices/11:22:33:44:55:66/disconnect_clients"
}
}
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Request
curl https://10.110.134.12/api/v1/devices/11:22:33:44:55:66/disconnect_clients \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"message": {
"status": "Complete"
}
}
5/28/20 Page 34 of 90
9.6 Sub-Resources
The following sub-resources can be applied to Devices URLs.
10 Jobs API
10.1 Overview
The Jobs API returns details on pending and completed Jobs.
GET /api/v1/jobs?type=configuration
GET /api/v1/msp/managed_accounts/{msp_name}/jobs?type=configuration
10.2.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
limit, offset Pagination functionality.
Managed account name filter.
10.2.2 Response
Body
5/28/20 Page 35 of 90
Name Details
completion_time Completion datetime of job
created_by Job creator
creation_time Creation datetime of job
description Description of job
details Contains information specific to configuration job
types.
details.[ap_group|template] Contains information on the AP Group or Template
applied if the job is for Wi-Fi devices.
details.[ap_group|template].managed_account Account that owns the AP Group or Template
details.[ap_group|template].name Name of the AP Group or Template.
details.[ap_group|template].shared true if the AP Group or Template is a shared
resource. false otherwise.
details.device_limit Number of devices allowed to be configured in
parallel for this job. 0 for no limit.
details.stop_on_error true if the configuration job should be stopped if an
error occurs. false otherwise.
devices.count Number of devices within this job
devices.failed Number of devices that failed to be configured
devices.remaining Number of devices that are yet to be configured
devices.skipped Number of devices that were skipped
devices.success Number of devices that have been configured
successfully
display_id Job ID shown in cnmaestro UI
job_id Unique ID of this configuration job
managed_account Account that created the job
state Current state of job. “not_started”, “stopped”,
“complete”, “in_progress”, “aborted”
type Job type. Currently only “configuration” is
available.
10.2.3 Example
Request
curl https://10.110.134.12/api/v1/jobs?type=configuration \
-X GET -k \
-H “Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059”
Response
{
"paging": {
"offset": 0,
"limit": 100,
"total": 1
},
"data": [
{
"completion_time": "2018-08-15T15:48:08+00:00",
"created_by": "Administrator",
"creation_time": "2018-08-15T15:42:51+00:00",
"description": "1 ePMP 1000 device(s)",
"details": {
"device_limit": 0,
"stop_on_error": false,
"template": {
"name": "ePMP timeout",
"managed_account": "",
"shared": true
}
},
"devices": {
"count": 1,
"failed": 1,
"remaining": 0,
"skipped": 0,
5/28/20 Page 36 of 90
"success": 0
},
"job_id": 1,
"display_id": 1,
"managed_account": "",
"state": "complete",
"type": "configuration"
}
]
}
GET /api/v1/jobs/{job_id}?type=configuration
GET /api/v1/msp/managed_accounts/{msp_name}/jobs/{job_id}?type=configuration
10.3.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
Managed account name filter.
10.3.2 Response
Body
Name Details
completion_time Completion datetime of job
created_by Job creator
creation_time Creation datetime of job
description Description of job
details Contains information specific to configuration job
types.
details.[ap_group|template] Contains information on the AP Group or Template
applied if the job is for Wi-Fi devices.
details.[ap_group|template].name Name of the AP Group or Template.
details.[ap_group|template].managed_account Account that owns the AP Group or Template
details.[ap_group|template].shared true if the AP Group or Template is a shared
resource. false otherwise.
details.device_limit Number of devices allowed to be configured in
parallel for this job. 0 for no limit.
details.stop_on_error true if the configuration job should be stopped if an
error occurs. false otherwise.
devices.count Number of devices within this job
5/28/20 Page 37 of 90
devices.failed Number of devices that failed to be configured
devices.remaining Number of devices that are yet to be configured
devices.skipped Number of devices that were skipped
devices.success Number of devices that have been configured
successfully
display_id Job ID shown in cnmaestro UI
job_id Unique ID of this configuration job
managed_account Account that created the job
state Current state of job. “not_started”, “stopped”,
“complete”, “in_progress”, “aborted”
type Job type. Currently only “configuration” is
available.
10.3.3 Example
Request
curl https://10.110.134.12/api/v1/jobs/1?type=configuration \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"paging": {
"offset": 0,
"limit": 100,
"total": 1
},
"data": [
{
"completion_time": "2018-08-15T15:48:08+00:00",
"created_by": "Administrator",
"creation_time": "2018-08-15T15:42:51+00:00",
"description": "1 ePMP 1000 device(s)",
"details": {
"device_limit": 0,
"stop_on_error": false,
"template": {
"name": "ePMP timeout",
"managed_account": "",
"shared": true
}
},
"devices": {
"count": 1,
"failed": 1,
"remaining": 0,
"skipped": 0,
"success": 0
},
"job_id": 1,
"display_id": 1,
"managed_account": "",
"state": "complete",
"type": "configuration"
}
]
}
GET /api/v1/jobs/{job_id}/devices?type=configuration
5/28/20 Page 38 of 90
GET /api/v1/msp/managed_accounts/{msp_name}/jobs/{job_id}/devices?type=configuration
10.4.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
limit, offset Pagination functionality.
Managed account name filter.
10.4.2 Response
Body
Name Details
job_id Unique ID of this configuration job
last_update_time Date/time of last message received from device.
mac MAC address of the device
managed_account Account that created the job
message Detailed description of device state.
name Name of the device
state Current configuration state of device.
status Current Online/offline status of the device
10.4.3 Example
Request
curl https://10.110.134.12/api/v1/jobs/1/devices?type=configuration \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"paging": {
"offset": 0,
"limit": 100,
"total": 1
},
"data": [
{
"job_id": 1,
"last_update_time": "2018-08-15T15:48:08+00:00",
"mac": "00:04:56:C0:0C:7C",
"managed_account": "Your_MSP",
"message": "Device timed out while waiting for update",
"name": "Lab device 5",
"state": "failed",
"status": "offline"
5/28/20 Page 39 of 90
}
]
}
11 Networks API
11.1 Fetch
GET /api/v1/networks
Note
If the MSP feature is enabled, only Networks in the Base Infrastructure can be individually
accessed through Network ID using this API. To access Networks mapped to a Managed Service
using Network ID, please use the Managed Service API.
11.1.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
Note
The Network ID may be replaced with the Network Name as long as the name is unique in the
system. If the name is not unique, an HTTP error code 422 (Unprocessable Entity) will be returned.
11.1.2 Response
Body
Name Details
id Identifier of the network.
managed_account Managed account name
name Name of the network.
11.1.3 Example
Request
5/28/20 Page 40 of 90
curl https://10.110.134.12/api/v1/networks \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"paging": {
"offset": 0,
"limit": 100,
"total": 4
},
"data": [
{
"id": "TEST_AUTOMATION_NETWORK",
"managed_account": "testmsp",
"name": "TEST_AUTOMATION_NETWORK"
},
{
"id": "default",
"managed_account": "",
"name": "default"
},
{
"id": "Automation",
"managed_account": "testmsp",
"name": "Automation"
},
{
"id": "test_net_1",
"managed_account": "testmsp",
"name": "test_net_1"
}
]
}
POST /api/v1/networks
POST /api/v1/msp/managed_accounts/{msp_name}/networks
11.2.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
Header Value
name Network of the new network (required)
managed_account Managed account name in which to create the network
11.2.2 Response
5/28/20 Page 41 of 90
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
11.2.3 Example
Request
curl https://10.110.134.12/api/v1/networks \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "new-network-name"
}
Response
{
"message": "success"
}
11.3.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
Header Value
managed_account Managed account name in which network exists
name Network of the new network (required)
11.3.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
11.3.3 Example
Request
curl https://10.110.134.12/api/v1/networks/network-name \
-X PUT -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "new-network-name"
}
Response
5/28/20 Page 42 of 90
{
"message": "success"
}
11.4.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
11.4.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
11.5 Sub-Resources
The following sub-resources can be applied to Network URLs.
12 Sites API
12.1 Overview
Note
If the MSP feature is enabled, only Networks in the Base Infrastructure can be individually
accessed through Network ID using this API. To access Networks mapped to a Managed Service
using Network ID, please use the Managed Service API (defined later).
12.1.1 Request
HTTP Headers
5/28/20 Page 43 of 90
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
Note
The Site ID may be replaced with the Site Name as long as the name is unique in the system. If the
name is not unique, an HTTP error code 422 (Unprocessable Entity) will be returned.
12.1.2 Response
Body
Name Details
address Address of the site
created_at Site creation date and time
id Identifier of the site.
location Location of the site.
Managed account name filter.
/api/v1/msp/managed_accounts/{msp_name}/networks/{Network
POST ID}/sites
12.2.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
5/28/20 Page 44 of 90
Header Value
address Address of the site
id Site ID
latitude Geo location latitude
longitude Geo location longitude
managed_account Managed account name in which to create the site
name Name of the new site (required)
Note
If the Site already exists with given name then no duplicate Site will be created.
12.2.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
12.2.3 Example
Request
curl https://10.110.134.12/api/v1/networks/{Network_ID}/sites \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "new-site-name"
}
Response
{
"message": "success"
}
/api/v1/msp/managed_accounts/{msp_name}/networks/{Network
PUT ID}/sites/{Site ID}
12.3.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
Header Value
address Address of the site
5/28/20 Page 45 of 90
id Site ID
latitude Geo location latitude
longitude Geo location longitude
managed_account Managed account name in which site exists
name Name of the new site
12.3.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
12.3.3 Example
Request
curl https://10.110.134.12/api/v1/networks/{Network_ID}/sites/site-name \
-X PUT -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "new-site-name"
}
Response
{
"message": "success"
}
/api/v1/msp/managed_accounts/{msp_name}/networks/{Network
DELETE ID}/sites/{Site ID}
12.4.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
12.4.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
12.5 Sub-Resources
The following sub-resources can be applied to Site URLs.
5/28/20 Page 46 of 90
13 Towers API
13.1 Overview
GET /api/v1/networks/{Network ID}/towers
Note
If the MSP feature is enabled, only Networks in the Base Infrastructure can be individually
accessed through Network ID using this API. To access Networks mapped to a Managed Service
using Network ID, please use the Managed Service API (defined later).
13.1.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
Note
The Tower ID may be replaced with the Tower Name as long as the name is unique in the system.
If the name is not unique, an HTTP error code 422 (Unprocessable Entity) will be returned.
13.1.2 Response
Body
Name Details
id Identifier of the tower.
location Location of the tower.
managed_account Managed account name
name Name of the tower.
network Network to which the tower belongs.
/api/v1/msp/managed_accounts/{msp_name}/networks/{Network
POST ID}/towers
5/28/20 Page 47 of 90
13.2.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
Header Value
latitude Geo location latitude
longitude Geo location longitude
managed_account Managed account name in which to create the tower
name Name of the new tower
Note
If the Tower already exists with given name then no duplicate Tower will be created.
13.2.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
13.2.3 Example
Request
curl https://10.110.134.12/api/v1/networks/{Network_ID}/towers \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "new-tower-name"
}
Response
{
"message": "success"
}
/api/v1/msp/managed_accounts/{msp_name}/networks/{Network
POST ID}/towers/{Tower ID}
13.3.1 Request
HTTP Headers
Header Value
5/28/20 Page 48 of 90
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
Header Value
latitude Geo location latitude
longitude Geo location longitude
managed_account Managed account name in which tower exists
name Name of the new tower
13.3.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
13.3.3 Example
Request
curl https://10.110.134.12/api/v1/networks/{Network_ID}/towers/tower-name \
-X PUT -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "new-tower-name"
}
Response
{
"message": "success"
}
/api/v1/msp/managed_accounts/{msp_name}/networks/{Network
DELETE ID}/towers/{Tower ID}
13.4.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
13.4.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
5/28/20 Page 49 of 90
13.5 Sub-Resources
The following sub-resources can be applied to Tower URLs.
14 Statistics API
14.1.1 Overview
GET /api/v1/devices/statistics
Retrieve statistics data from a resource (currently only devices are supported). Statistics parameters
can be used in tandem with parameters available for the resource.
14.1.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
14.1.3 Response
Body
5/28/20 Page 50 of 90
[ap, sm]
name Device name AP/SM AP/SM All All All
network Network AP/SM AP/SM All All All
parent_mac Parent MAC All
reboots Reboot count AP/SM
site Site name All All
site_id Site unique identifier All All
Status
status
[online, offline,
AP/SM AP/SM All All All
claimed, waiting,
onboarding]
status_time
Uptime/downtime interval
AP/SM AP/SM All All All
(sec)
temperature Temperature AP/SM All
tower Tower name AP AP All All
Device type
[epmp, pmp, wifi-
type home, wifi- All All All
enterprise, ptp,
cnreach, cnmatrix]
vlan VLAN AP/SM All
Networks
default_gateway Default gateway AP/SM AP/SM All All
ip IP address AP/SM AP/SM All All All
ipv6 IPv6 AP/SM All
ip_dns DNS AP/SM AP/SM All All
ip_dns_secondary Secondary DNS AP/SM All All
ip_wan WAN IP AP/SM All
LAN mode status
lan_mode_status AP/SM
[no-data, half, full]
lan_mtu MTU size SM
lan_speed_status LAN speed status AP/SM All
LAN status wifi-
lan_status AP/SM AP/SM All
[down, up] home
netmask Network mask AP/SM AP/SM All All
Radios (Fixed Wireless)
radio.auth_mode Authentication mode AP/SM
Authentication type
ePMP
[open, wpa1, eap-
radio.auth_type AP/SM
ttls]
PMP:
[disabled, enabled]
radio.byte_error_ratio Byte Error Ratio All
Channel width
ePMP:
[5 MHz, 10 MHz, 20
radio.channel_width AP/SM AP/SM All
MHz, 40 MHz]
PMP:
[…]
radio.color_code Color code AP/SM AP/SM All
DFS status
ePMP:
[not-applicable,
channel-
availability-check,
in-service, radar-
radio.dfs_status AP/SM AP/SM
signal-detected,
alternate-channel-
monitoring, not-in-
service]
PMP:
[Status String]
radio.dl_err_drop_pkts
Downlink error drop
SM
packets
5/28/20 Page 51 of 90
radio.dl_err_drop_pkts_percentage
Downlink error drop
SM
packets percentage
radio.dl_frame_utilization Downlink frame utilization AP
radio.dl_lqi
Downlink Link Quality
SM
Indicator
radio.dl_mcs MCS SM
radio.dl_modulation Modulation SM
radio.dl_pkts Usage (packet count) AP/SM AP/SM
radio.dl_pkts_loss Downlink packet loss AP/SM
radio.dl_retransmits Retransmission SM
radio.dl_retransmits_pct Retransmission percentage AP/SM
radio.dl_rssi RSSI SM SM
radio.dl_rssi_imbalance Downlink RSSI imbalance AP
radio.dl_snr SNR (dB) SM
radio.dl_snr_v Downlink SNR (dB) vertical SM
radio.dl_snr_h
Downlink SNR (dB)
SM
horizontal
radio.dl_throughput Downlink throughput AP
radio.frame_period Frame period AP
radio.frequency RF frequency AP/SM AP/SM
radio.mac Wireless MAC AP/SM
Radio mode
[eptp-master, eptp-
radio.mode AP/SM
slave, tdd, tdd-ptp,
ap/sm]
radio.rx_frquency Receive frequency All
radio.sessions_dropped Session drops AP AP/SM
radio.software_key_throughput
Software key – max
SM
throughput
radio.ssid SSID AP/SM
radio.sync_source Synchronization source AP
radio.sync_state Synchronization state AP
TDD ratio
ePMP:
[75/25, 50/50,
radio.tdd_ratio AP/SM AP/SM
30/70, flexible]
PMP:
[…]
radio.tx_capacity SM transmit capacity SM
radio.tx_frequency Transmit frequency All
radio.tx_power Radio transmit power AP/SM AP/SM All
radio.tx_quality SM transmit quality SM
radio.ul_frame_utilization Uplink frame utilization AP
radio.ul_mcs Uplink MCS AP/SM
radio.ul_modulation Modulation SM
e.g. [2X MIMO-B)]
radio.ul_pkts Usage (packet count) AP/SM AP/SM
radio.ul_pkts_loss Uplink packet loss AP/SM
radio.ul_retransmits Retransmission SM
radio.ul_retransmits_pct Retransmission percentage AP/SM
radio.ul_err_drop_pkts Uplink error drop packets SM
radio.ul_err_drop_pkts_percentage
Uplink error drop packets
SM
percentage
radio.ul_lqi Uplink Link Quality Indicator SM
radio.ul_rssi RSSI SM SM
radio.ul_snr SNR (dB) SM
radio.ul_snr_v Uplink SNR (dB) vertical SM
radio.ul_snr_h Uplink SNR (dB) horizontal SM
radio.ul_throughput Uplink throughput AP
radio.wlan_status
WLAN status
AP/SM
[down, up]
Radios (Wi-Fi)
radio.24ghz.airtime Airtime All
radio.24ghz.bssid Radio mac Enterprise
5/28/20 Page 52 of 90
radio.24ghz.channel Channel All
radio.24ghz.multicast_rate Multicast rate All
radio.24ghz.noise_floor Noise floor All
radio.24ghz.num_clients Number of clients All
radio.24ghz.num_wlans Number of WLANs Enterprise
radio.24ghz.power Transmit power All
radio.24ghz.quality RF Quality description Enterprise
radio.24ghz.radio_state Radio state Enterprise
radio.24ghz.rx_bps Receive bits/second Enterprise
radio.24ghz.rx_bytes Receive bytes All
radio.24ghz.tx_bps Transmit bits/second Enterprise
radio.24ghz.tx_bytes Transmit bytes All
radio.24ghz.unicast_rates Unicast rates All
radio.24ghz.utilization Radio utilization Enterprise
radio.5ghz.airtime Airtime All
radio.5ghz.bssid Radio mac Enterprise
radio.5ghz.channel Channel Enterprise
radio.5ghz.multicast_rate Multicast rate All
radio.5ghz.noise_floor Noise floor All
radio.5ghz.num_clients Number of clients Enterprise
radio.5ghz.num_wlans Number of WLANs Enterprise
radio.5ghz.power Transmit power All
radio.5ghz.quality RF quality description Enterprise
radio.5ghz.radio_state Radio state Enterprise
radio.5ghz.rx_bps Receive bits/second Enterprise
radio.5ghz.rx_bytes Receive bytes All
radio.5ghz.tx_bps Transmit bits/second Enterprise
radio.5ghz.tx_bytes Transmit bytes All
radio.5ghz.unicast_rates Unicast rates All
radio.5ghz.utilization Radio utilization Enterprise
Radios (cnReach)
radio.radio1.device_id Device ID Radios
radio.radio1.linked_with Linked with Radios
radio.radio1.mac Radio MAC Radios
radio.radio1.margin Margin Radios
radio.radio1.mode Radio mode
Radios
[ap, ep, rep]
radio.radio1.neighbors Radio neighbors Radios
radio.radio1.network_address Network address Radios
radio.radio1.noise Average noise (dB) Radios
radio.radio1.power Transmit power Radios
radio.radio1.rssi RSSI value (dB) Radios
radio.radio1.rx_bytes Receive bytes Radios
radio.radio1.software_version Current software version. Radios
radio.radio1.temperature Radio temperature Radios
radio.radio1.tx_bytes Transmit bytes Radios
radio.radio1.type Radio type
Radios
[ptp, ptmp]
radio.radio2.device_id Device ID Radios
radio.radio2.linked_with Linked with Radios
radio.radio2.mac Radio MAC Radios
radio.radio2.margin Margin Radios
radio.radio2.mode Radio mode
Radios
[ap, ep, rep]
radio.radio2.neighbors Radio neighbors Radios
radio.radio2.network_address Network address Radios
radio.radio2.noise Average noise Radios
radio.radio2.power Transmit power Radios
radio.radio2.rssi RSSI value (dB) Radios
radio.radio2.rx_bytes Receive bytes Radios
radio.radio2.software_version
Radio current software
Radios
version.
radio.radio2.temperature Radio temperature Radios
radio.radio2.tx_bytes Transmit bytes Radios
5/28/20 Page 53 of 90
radio.radio2.type
Radio type
Radios
[ptp, ptmp]
Ethernet (PTP)
ethernet.aux_interface.rx_frames Aux Rx Frames Oversize All
ethernet.aux_interface.tx_util
Aux Tx Bandwidth
All
Utiliization
ethernet.aux_interface.rx_util
Aux Rx Bandwidth
All
Utiliization
ethernet.aux_interface.speed Aux speed and duplex All
ethernet.main_psu_interface.rx_frames
Main PSU Rx Frames
All
Oversize
ethernet.main_psu_interface.rx_util
Main PSU Rx Bandwidth
All
Utiliization
ethernet.main_psu_interface.speed
Main PSU speed and
All
duplex
ethernet.main_psu_interface.tx_util
Main PSU Tx Bandwidth
All
Utiliization
ethernet.sfp_interface.rx_frames SFP Rx Frames Oversize All
ethernet.sfp_interface.rx_util
SFP Rx Bandwidth
All
Utiliization
ethernet.sfp_interface.speed SFP speed and duplex All
ethernet.sfp_interface.tx_util
SFP Tx Bandwidth
All
Utiliization
15 Performance API
15.1.1 Device
GET /api/v1/devices/performance
Retrieve performance data from a resource (currently only devices are supported). Performance
parameters can be used in tandem with parameters available for the resource.
15.1.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.(These limit and offset are for devices(MACs) and not for
metrics objects count in the response)
Managed account name filter.
5/28/20 Page 54 of 90
15.1.3 Response
Body
5/28/20 Page 55 of 90
radio.5ghz.rx_bps Receive bits/second Enterprise
radio.5ghz.throughput Total throughput All
radio.5ghz.tx_bps Transmit bits/second Enterprise
Radios (cnReach)
radio.radio1.neighbors Radio neighbors Radios
radio.radio1.noise Average noise Radios
radio.radio1.power Transmit power Radios
radio.radio1.rssi RSSI value Radios
radio.radio1.rx_bytes Receive bytes Radios
radio.radio1.throughput Total throughput Radios
radio.radio1.tx_bytes Transmit bytes Radios
radio.radio2.neighbors Radio neighbors Radios
radio.radio2.noise Average noise Radios
radio.radio2.power Transmit power Radios
radio.radio2.rssi RSSI value Radios
radio.radio2.rx_bytes Receive bytes Radios
radio.radio2.throughput Total throughput Radios
radio.radio2.tx_bytes Transmit bytes Radios
Switch (cnMatrix)
switch.rx.broadcast_pkts Broadcast packets All
switch.rx.multicast_pkts Multicast packets All
switch.rx.pkts_err Packet error All
switch.rx.unicast_pkts Unicast packets All
switch.tx.broadcast_pkts Broadcast packets All
switch.tx.multicast_pkts Multicast packets All
switch.tx.pkts_err Packet error All
switch.tx.unicast_pkts Unicast packets All
Ethernet (PTP)
ethernet.aux_interface.max_rx
AUX maximum receive
All
bytes
ethernet.aux_interface.max_tx
AUX maximum transmit
All
bytes
ethernet.aux_interface.min_rx
AUX minimum receive
All
bytes
ethernet.aux_interface.min_tx
AUX minimum transmit
All
bytes
ethernet.aux_interface.pkt_error AUX packet error All
ethernet.aux_interface.rx AUX receive bytes All
ethernet.aux_interface.tx AUX transmit bytes All
ethernet.link_loss Link loss All
ethernet.main_psu_interface.max_rx
Main PSU maximum
All
receive bytes
ethernet.main_psu_interface.max_tx
Main PSU maximum
All
transmit bytes
ethernet.main_psu_interface.min_rx
Main PSU minimum
All
receive bytes
ethernet.main_psu_interface.min_tx
Main PSU minimum
All
transmit bytes
ethernet.main_psu_interface.pkt_error Main PSU packet error All
ethernet.main_psu_interface.rx Main PSU receive bytes All
ethernet.main_psu_interface.tx Main PSU transmit bytes All
ethernet.pcb_temperature PCB temperature All
ethernet.rx_channel_util
Receive channel
All
utilization
ethernet.rx_capacity Receive capacity All
ethernet.ssr Signal strength ratio All
ethernet.rx_power Receive power All
ethernet.rx_throughput Receive throughput All
ethernet.sfp_interface.max_rx
SFP maximum receive
All
bytes
ethernet.sfp_interface.max_tx
SFP maximum transmit
All
bytes
ethernet.sfp_interface.min_rx
SFP minimum receive
All
bytes
5/28/20 Page 56 of 90
ethernet.sfp_interface.min_tx
SFP minimum transmit
All
bytes
ethernet.sfp_interface.pkt_error SFP packet error All
ethernet.sfp_interface.rx SFP receive bytes All
ethernet.sfp_interface.tx SFP transmit bytes All
ethernet.tx_channel_util
Transmit channel
All
utilization
ethernet.tx_capacity Transmit capacity All
ethernet.tx_power Transmit power All
ethernet.tx_throughput Transmit throughput All
ethernet.vector_error Vector error All
16 WiFi APIs
16.1 WiFi Clients
GET /api/v1/devices/clients
Retrieve data for WiFi Clients. This API only works with cnPilot Enterprise and cnPilot Home.
16.1.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
16.1.2 Response
Body
5/28/20 Page 57 of 90
radio.tx_bytes Transmitted bytes
total_quota Total quota (Note: only applicable for Guest Client)
total_quota_balance Total quota balance (Note: only applicable for Guest Client)
upload_quota Upload quota (Note: only applicable for Guest Client)
upload_quota_balance Upload quota balance (Note: only applicable for Guest Client)
user Name of the user getting authenticated
Retrieve data for WiFi Wired Clients. This API only works with cnPilot Enterprise and cnPilot Home.
16.2.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
16.2.2 Response
Body
5/28/20 Page 58 of 90
upload_quota_balance Upload quota balance (Note: only applicable for Guest Client)
vlan VLAN id
Retrieve all Wi-Fi Peers data or a specific peer data or a peers of an AP. This API only works with
cnPilot Enterprise.
16.3.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
16.3.2 Response
Body
Name Details
Mesh Base AP
ap.base_mac Mesh Base MAC address
ap.description AP description
ap.last_sync AP last synchronization time
ap.mac AP MAC address
ap.name AP hostname
ap.site Site to which the AP belongs
ap.status Status of AP (online/offline)
ap.status_time Duration since the AP is online or offline
ap.24ghz.airtime Airtime utilization on 2.4 GHz radio in percentage (%)
ap.24ghz.noise_floor Noise floor of 2.4 GHz radio
ap.24ghz.rx_bytes Total received bytes on 2.4 GHz radio
ap.24ghz.tx_bytes Total transmitted bytes on 2.4 GHz radio
ap.5ghz.airtime Airtime utilization on 5 GHz radio in percentage (%)
ap.5ghz.noise_floor Noise floor of 5 GHz radio
ap.5ghz.rx_bytes Total received bytes on 5 GHz radio
ap.5ghz.tx_bytes Total transmitted bytes on 5 GHz radio
Mesh Peer
ip Mesh Peer IP address
mac Mesh Peer MAC address
managed_account Managed account name
name Mesh Peer hostname
Radio (Mesh Peer)
5/28/20 Page 59 of 90
radio.band Mesh Peer radio band
radio.data_rate Data rate in Mbps
radio.rssi Mesh Peer RSSI
radio.rx_bytes Total received bytes
radio.snr Mesh Peer SNR
radio.ssid Mesh Peer SSID
radio.tx_bytes Total transmitted bytes
16.3.3 Example
Request
curl https://10.110.134.134/api/v1/devices/mesh/peers/BC-62-9F-05-37-61 \
-X GET -k \
-H "Authorization: Bearer 6b2a1954bf8fd13a93a8772247876d6ace65b304"
Response
{
"paging": {
"limit": 100,
"total": 1
},
"data": [
{
"ip": "10.110.235.73",
"mac": "BC-62-9F-05-37-61",
"managed_account": "testmsp",
"name": "",
"ap": {
"mac": "00:04:56:B6:74:14",
"base_mac": "00-04-56-B6-86-22",
"name": "E400-B67414",
"description": "Base AP For Demo",
"site": "Central",
"up_time": "0d 5h 38m",
"24ghz": {
"noise_floor": "-94",
"airtime": "72/4/68/0",
"tx_bytes": 5464,
"rx_bytes": 3360
},
"5ghz": {
"noise_floor": "-104",
"airtime": "4/0/4/0",
"tx_bytes": 574,
"rx_bytes": 34860
}
},
"radio": {
"band": "2.4GHz",
"rssi": -46,
"snr": 54,
"ssid": "Auto-RF-2G-new",
"tx_bytes": 573464,
"rx_bytes": 349360,
"data_rate": 72.109
}
}
]
}
16.3.4 Sub-Resources
5/28/20 Page 60 of 90
/api/v1/devices/mesh/peers/end_hosts/{End Host MAC} End Host connected to a Mesh Peer.
16.3.4.1 Response
Body
Name Details
Mesh Base AP
ap.base_mac Mesh Base MAC Address
ap.description AP description
ap.ip AP IP address
ap.mac AP MAC address
ap.name AP hostname
ap.site Site to which the AP belongs
ap.24ghz.airtime Airtime utilization on 2.4 GHz radio in percentage (%)
ap.24ghz.noise_floor Noise floor of 2.4 GHz radio
ap.24ghz.rx_bytes Total received bytes on 2.4 GHz radio
ap.24ghz.tx_bytes Total transmitted bytes on 2.4 GHz radio
ap.5ghz.airtime Airtime utilization on 5 GHz radio in percentage (%)
ap.5ghz.noise_floor Noise floor of 5 GHz radio
ap.5ghz.rx_bytes Total received bytes on 5 GHz radio
ap.5ghz.tx_bytes Total transmitted bytes on 5 GHz radio
Mesh Peer
ip Mesh Peer IP address
mac Mesh Peer MAC address
managed_account Managed account name
name Mesh Peer hostname
Radio (Mesh Peer)
radio.band Mesh Peer radio band
radio.data_rate Data rate in Mbps
radio.rx_bytes Total received bytes
radio.rssi Mesh Peer RSSI
radio.snr Mesh Peer SNR
radio.ssid Mesh Peer SSID
radio.tx_bytes Total transmitted bytes
16.3.4.2 Example
Request
curl https://10.110.134.134/api/v1/devices/mesh/peers/end_hosts/00-04-56-0F-A4-D9 \
-X GET -k \
-H "Authorization: Bearer 6b2a1954bf8fd13a93a8772247876d6ace65b304"
Response
{
"paging": {
"limit": 100,
"total": 1
},
"data": [
{
"ip": "10.110.235.73",
"mac": "BC-62-9F-05-37-61",
"managed_account": "testmsp",
"name": "",
"ap": {
"mac": "00:04:56:B6:74:14",
"base_mac": "00-04-56-B6-86-22",
"name": "E400-B67414",
"description": "Base AP For Demo",
"site": "Central",
"up_time": "0d 5h 38m",
"24ghz": {
"noise_floor": "-94",
5/28/20 Page 61 of 90
"airtime": "72/4/68/0",
"tx_bytes": 5464,
"rx_bytes": 3360
},
"5ghz": {
"noise_floor": "-104",
"airtime": "4/0/4/0",
"tx_bytes": 574,
"rx_bytes": 34860
}
},
"radio": {
"band": "2.4GHz",
"rssi": -46,
"snr": 54,
"ssid": "Auto-RF-2G-new",
"tx_bytes": 573464,
"rx_bytes": 349360,
"data_rate": 72.109
}
}
]
}
Retrieve aggregated data for WiFi Clients which got updated in last 24 hours. This API only works
with cnPilot Enterprise and cnPilot Home.
15.3.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
15.3.2 Response
Body
Name Details
mac Client MAC
rx_bytes Aggregated Received bytes
session_duration Aggregated duration (in seconds)
tx_bytes Aggregated Transmitted bytes
5/28/20 Page 62 of 90
15.3.3 Example
Request
curl https://10.110.134.134/api/v1/devices/00:04:56:BD:82:B8/clients/summary \
-X GET -k \
-H "Authorization: Bearer 6b2a1954bf8fd13a93a8772247876d6ace65b304"
Response
{
"paging": {
"limit": 100,
"total": 1
},
"data": [
{
"mac": "7C:6B:9C:21:DB:F5",
"tx_bytes": 61147,
"rx_bytes": 32236,
"session_duration": 923407
},
{
"mac": "D8:32:E3:74:19:0D",
"tx_bytes": 6306416,
"rx_bytes": 876230,
"session_duration": 2755991
}
]
}
17 Alarms API
17.1 Active Alarms
GET /api/v1/alarms
17.1.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
17.1.2 Response
Body
5/28/20 Page 63 of 90
Name Details
acknowledged_by Acknowledged by
code Category code
duration Duration (seconds)
id Alarm Id
ip IP address
ipv6 IPv6 address
mac MAC address
managed_account Managed account name
message Message
name Alarm name
network Network
severity Severity
site Site
source Device name
source_type Device type
status Status
time_raised Raised time
tower Tower
Retrieve active and historical alarm data including Base infrastructure and all managed accounts.
17.2.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
17.2.2 Response
Body
Name Details
acknowledged_by Acknowledged by
code Category code
duration Duration (seconds)
id Alarm Id
5/28/20 Page 64 of 90
ip IP address
ipv6 IPv6 address
mac MAC address
managed_account Managed account name
message Message
name Alarm name
network Network
severity Severity
site Site
source Device name
source_type Device type
status Status
time_cleared Clear time
time_raised Raised time
tower Tower
18 Events API
18.1.1 Overview
GET /api/v1/events
Retrieve event log from all managed accounts including Base infrastructure.
Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
code Event category code ( "CFG_UPD_ST", "DFS_ST", "GPS_SYNC_ST",
"GPS_FW_UPD_ST", "GPS_VER", "LINK_ST", "METRIC_RATELIMIT",
"EVENT_RATELIMIT", "CLIENT_EVENT_RATELIMIT", "CFG_IMP", "CFG_EXP",
"CONFIG_SYNC", "FW_UPD_ST", "STA_REG", "STA_DROP", "SYS_UP",
"SYS_REB", "SA_MODE", "STATUS", "ONBOARDING", "GPS_SYNC",
"RADAR_DETECT", "REGULATORY_FAIL", "RF_OVER_LOAD",
"DHCP_CLIENT_IP", "STA_REG_FAIL", "DEF_KEY_USED_TRAP", "WIFI_CONN",
"WIFI_DISC", "WIFI_MESH_DISC", "SITE_SW_SYNC", "THRESH_CPU_UTIL",
"THRESH_CLIENT_COUNT", "THRESH_DEVICE_TRAFFIC",
"WIFI_CLIENT_DISCONNECTED", "WIFI_CLIENT_CONNECTED",
"WEAK_ADMIN_PWD", "SYSTEM_CONFIG_APPLIED" )
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
Response
5/28/20 Page 65 of 90
Body
Name Details
category Event category
code Category code
id Unique event Id
ip IP address
ipv6 IPv6 address
mac MAC address
managed_account Managed account name
message Message
name Event name
network Network
origin Origin of the event
severity Severity
site Site
source Device name
source_type Device type
sub_category Event sub-category
time_raised Raised time
tower Tower
19 Sessions API
19.1.1 Overview
GET /api/v1/users/sessions
Retrieve the session information for current user sessions normal account login.
Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Managed account name filter.
Response
Body
Name Details
duration Duration of session in seconds
id Session Id
managed_account Managed account name
role Role of the administrator
user User name of the administrator
5/28/20 Page 66 of 90
20 Guest Access Portal API
20.1 List of Guest Access Portals
20.1.1 Overview
GET /api/v1/portals
Display the current Guest Access Portals of Base Infrastructure in cnMaestro and the id used to
reference them. Note Portals first need to be created through the Web UI in order to be visible through
the API.
Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
Managed account name filter.
Response
Body
Name Details
id Id of guest access portal
managed_account Managed account name
name Name of guest access portal
whitelist List of whitelisted domains
20.1.2 Example
Request
curl https://10.110.134.12/api/v1/portals \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"paging": {
"offset": 0,
"limit": 100,
"total": 2
},
"data": [{
5/28/20 Page 67 of 90
"id": "default",
"name": "default",
“managed_account”: “”,
"whitelist": ["cloud.cambiumnetworks.com", "cloud.company.com"]
},
{
"id": "portal_net_1",
"name": "portal_net_1",
“managed_account”: “testmsp”,
"whitelist": ["microsoft.com", "57.34.34.23"]
}
]
}
Update the whitelist in a Guest Access Portal under Base infrastructure. Note that the API requires
the full whitelist to be replaced with the new one.
20.2.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body
Name Details
whitelist Array of whitelisting domains as url encoded string
20.2.3 Example
Below example show the curl command to update the whitelist of portal_net_1 portal with
[“google.com”, “yahoo.com”]
Request
curl https://10.110.134.12/api/v1/portals/portal_net_1/whitelist \
-X PUT -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"whitelist": [“www.google.com”, “www.yahoo.com”]
}
Response
{
"data": {
"result": "Successfully updated guest access portal - portal_net_1"
}
}
Note
5/28/20 Page 68 of 90
Only updating the whitelist field of the Portal object will be supported.
Display the current vouchers list under a plan. Note Portals and plans first need to be created through
the Web UI in order to be visible through the API.
20.3.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
limit, offset Pagination functionality.
Managed account name filter.
Response
Body
Name Details
creation_time Creation time
expiry Expiry time
plan_name Plan name
status Status of voucher (unclaimed, claimed, expired)
voucher_code Voucher code
20.3.3 Example
Below example show the curl command to get vouchers under portal_net_1 portal and plan_1 plan.
Request
curl https://10.110.134.12/api/v1/portals/portal_net_1/vouchers/plan_1 \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"data": {
"paging": {
"offset": 0,
"limit": 100,
"total": 2
},
"data": [
5/28/20 Page 69 of 90
{
"voucher_code": "KWGQQ3C1",
"creation_time": "2018-05-11T07:50:01.654764Z",
"expiry": "2018-05-11T08:00:01+00:00",
"plan_name": "plan_1",
"status": "expired"
},
{
"voucher_code": "4RZR9D1F",
"creation_time": "2018-05-11T07:50:01.654764Z",
"expiry": "2018-05-11T08:00:01+00:00",
"plan_name": " plan_1",
"status": "expired"
}
]
}
}
Generate voucher under a portal and specified plan. Note Portals and plans first need to be created
through the Web UI.
20.4.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body
Name Details
count Quantity of vouchers to be generate
20.4.3 Example
Below example show the curl command to generate 2 vouchers under portal_net_1 portal and
plan_1 plan.
Request
curl https://10.110.134.12/api/v1/portals/portal_net_1/vouchers/plan_1/generate \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"count": 2
}
Response
{
"data": {
"paging": {
"offset": 0,
5/28/20 Page 70 of 90
"limit": 2,
"total": 12
},
"data": [
{
"voucher_code": "LMRR7ZBS",
"creation_time": "2019-03-15T05:41:40.619842Z",
"expiry": "2019-03-15T05:51:40+00:00",
"plan_name": "plan_1 ",
"status": "unclaimed"
},
{
"voucher_code": "RMWWD62Q",
"creation_time": "2019-03-15T05:41:40.619842Z",
"expiry": "2019-03-15T05:51:40+00:00",
"plan_name": "plan_1",
"status": "unclaimed"
}
]
}
}
Display the current client login events. Note Portals first need to be created through the Web UI.
20.5.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
limit, offset Pagination functionality.
Managed account name filter.
Response
Body
Name Details
access_type Type of connection (Free, Paid)
ap_mac Access point MAC
client_mac Client MAC
email Email used to login
login_time Login time
mobile_number Mobile number used to login
portal_name Portal name
ssid WLAN SSID of AP
5/28/20 Page 71 of 90
voucher_code Voucher code
20.5.3 Example
Below example show the curl command to get vouchers under portal_net_1 portal and plan_1 plan.
Request
curl https://10.110.134.12/api/v1/portals/portal_net_1/events \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"data": {
"paging": {
"offset": 0,
"limit": 100,
"total": 2
},
"data": [
{
"ap_mac": "00:04:56:B5:5F:DC",
"client_mac": "C0-CC-F8-F0-B7-06",
"login_time": "2019-03-12T08:11:00.258Z",
"access_type": "Free",
"portal_name": "portal_net_1",
"voucher_code": "",
"ssid": "wlan_1",
"email": "",
"mobile_number": ""
},
{
"ap_mac": "00:04:56:B5:5F:DC",
"client_mac": "C0-CC-F8-F0-B7-06",
"login_time": "2019-03-12T08:11:00.258Z",
"access_type": "Free",
"portal_name": " portal_net_1",
"voucher_code": "",
"ssid": "wlan_1",
"email": "",
"mobile_number": ""
}
]
}
}
GET /api/v1/msp/managed_accounts
This API is only available if MSP is enabled. Access all Managed Accounts, or filter APIs by Managed
Account. See Sub-Resources section at end for a full listing of supported APIs.
Request
5/28/20 Page 72 of 90
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Response
Body
Name Details
managed_account Managed account name
status Status(enabled/disabled) of the managed account
21.1.2 Example
Below example show the curl command to get all the managed accounts from the system
Request
curl https://10.110.134.12/api/v1/msp/managed_accounts \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"paging": {
"offset": "0",
"limit": "100",
"total": 2
},
"data": [
{
"managed_account ": "test1msp",
“status”:”enabled”
},
{
"managed_account ": "test2msp2a"
“status”: “disabled”
}
]
}
POST /api/v1/msp/managed_accounts
21.2.2 Request
HTTP Headers
5/28/20 Page 73 of 90
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body
Name Details
active Enable/disable managed account (true | false)
friendly_name Friendly name of managed account
managed_service.email Managed account user email
managed_service.name Managed service to be linked with
managed_service.role Managed account role (admin | monitor | operator)
name Name of the managed account
21.2.3 Example
Below example show the curl command to create a managed account under a managed service
Request
curl https://10.110.134.12/api/v1/msp/managed_accounts \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "test_account",
"active": true,
"friendly_name": "test account 1",
"managed_service": {
"name": "test_managed_service",
"email": "test@cambium.com",
"role": "operator"
}
}
Response
{
"message": "Account created successfully"
}
PUT /api/v1/msp/managed_accounts/{account_name}
21.3.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body
5/28/20 Page 74 of 90
Name Details
active Enable/disable managed account (true | false)
friendly_name Friendly name of managed account
name Name of the managed account
21.3.3 Example
Request
curl https://10.110.134.12/api/v1/msp/managed_accounts/test_account \
-X PUT -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "test_account_2",
"active": true,
"friendly_name": "test account 2"
}
DELETE /api/v1/msp/managed_accounts/{account_name}
21.4.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
21.4.3 Example
Request
curl https://10.110.134.12/api/v1/msp/managed_accounts/test_account \
-X DELETE -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
21.5 Sub-Resources
The following sub-resources can be applied to Managed Services URLs.
5/28/20 Page 75 of 90
/api/v1/msp/managed_accounts/{account_name}/{Devices API} Managed Service Devices.
/api/v1/msp/managed_accounts/{account_name}/{Events API} Managed Service Events.
/api/v1/msp/managed_accounts/{account_name}/{Networks API} Managed Service Networks.
/api/v1/msp/managed_accounts/{account_name}/{Performance Managed Service Performance
API} Data.
/api/v1/msp/managed_accounts/{account_name}/{Portals API} Managed Service Wi-Fi Portals.
/api/v1/msp/managed_accounts/{account_name}/{Sessions API} Managed Service Admin Sessions.
/api/v1/msp/managed_accounts/{account_name}/{Statistics API} Managed Service Statistics Data.
GET /api/v1/msp/managed_services
GET /api/v1/msp/managed_services/{service_name}
This API is only available if MSP is enabled. Access all the managed services, or filter APIs by
managed service name.
Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
Response
Body
Name Details
account_count Number of accounts attached
color Background color of managed service login template (hex code)
name Managed service name
url_path Managed service login url
user_count Number of users attached
22.1.2 Example
Below example show the curl command to get all the managed services from the system
Request
curl https://10.110.134.12/api/v1/msp/managed_services \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
5/28/20 Page 76 of 90
"paging": {
"offset": "0",
"limit": "100",
"total": 2
},
"data": [
{
"name": "test1",
"url_path": "https://cloud-dev.cambiumnetworks.com:5443/msp/zpu5xu",
"color": "#213F79",
"users_count": 1,
"accounts_count": 1
},
{
"name": "test2",
"url_path": "https://cloud-dev.cambiumnetworks.com:5443/msp/zpj2xu",
"color": "#513F29",
"users_count": 2,
"accounts_count": 3
}
]
}
POST /api/v1/msp/managed_services
22.2.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body
Name Details
color Background color of managed service login template (hex code)
name Name of the managed service
url_path URL postfix for managed service login
22.2.3 Example
Request
curl https://10.110.134.12/api/v1/msp/managed_services \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "test_service",
"url_path": "test_service",
5/28/20 Page 77 of 90
"color": "#cccccc"
}
Response
{
"message": "Managed service created successfully"
}
PUT /api/v1/msp/managed_services/{service_name}
22.3.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body
Name Details
color Background color of managed service login template (hex
code)
media.login_background.contentType Content type of login background image
media.login_background.data Base64 encoded image (Max size 3 mb)
media.login_banner.contentType Content type of login background image
media.login_banner.data Base64 encoded image (Max size 500 kb)
media.logo.contentType Content type of login background image
media.logo.data Base64 encoded image (Max size 500 kb)
name Name of the managed service
url_path URL postfix for managed service login
Note
Supported content types for image upload [‘image/png’, ‘image/jpg’, ‘image/jpeg’, ‘image/gif’]
22.3.3 Example
Request
curl https://10.110.134.12/api/v1/msp/managed_services/test_service \
-X PUT -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"name": "test_service_2",
"url_path": "test_service_2",
"color": "#ccddcc"
}
5/28/20 Page 78 of 90
22.4 Delete managed service
22.4.1 Overview
DELETE /api/v1/msp/managed_services/{service_name}
22.4.2 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
22.4.3 Example
Request
curl https://10.110.134.12/api/v1/msp/managed_services/test_service \
-X DELETE -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
/api/v1/msp/managed_accounts/{msp_name}/wifi-
GET enterprise/wlans/{WLAN Name}/epsk
23.1.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
start_time Will only return entries created after this time, exclusively. (ISO 8601 format)
stop_time Will only return entries created before this time, exclusively. (ISO 8601 format)
5/28/20 Page 79 of 90
23.1.2 Response
Body
Name Details
creation_time Creation timestamp
mac MAC address of the client, if any
managed_account Managed account name
passphrase The Passhprase (Pre Shared Key) to be used in the WPA2 handshake
username Display name of this entry
vlan The VLAN that the user’s traffic should be mapped to
23.1.3 Example
Request
curl https://10.110.134.12/api/v1/wifi-enterprise/wlans/{WLAN Name}/epsk \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"paging": {
"offset": 0,
"limit": 100,
"total": 4
},
"data": [{
"creation_time": "2019-03-25T18:48:14+00:00",
"mac": "0A:00:3E:BB:00:FD",
"managed_account": "",
"passphrase": "cnmaestro123",
"username": "NBI-ePSK",
"vlan": null
},
{
"creation_time": "2019-03-25T18:58:14+00:00",
"mac": null,
"managed_account": "",
"passphrase": "default",
"username": "Default-ePSK",
"vlan": 200
},
{
"creation_time": "2019-03-25T18:58:14+00:00",
"mac": null,
"managed_account": "",
"passphrase": "p455word",
"username": "Test-ePSK-1",
"vlan": 50
},
{
"creation_time": "2019-03-25T18:58:14+00:00",
"mac": null,
"managed_account": "",
"passphrase": "asdf1234",
"username": "Test-ePSK-2",
"vlan": 50
}
]
}
5/28/20 Page 80 of 90
23.2 Generate ePSK Entries
Create new ePSK entries within an ePSK Policy in cnMaestro. Maximum number of ePSK entries per
WLAN may not exceed 1024.
Change made are staged for two minutes since the last ePSK write request before being committed to
the live database. This prevents extra configuration messages needing to be sent to devices for Auto-
Sync. During this two-minute period, staged change will only be viewable to the API session that
made the changes. The associated WLAN will also be locked to that API session during this time,
meaning that other users will be blocked from making changes.
/api/v1/msp/managed_accounts/{msp_name}/wifi-
POST enterprise/wlans/{WLAN Name}/epsk/generate
23.2.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
Name Details
count Number of ePSK entries that should be created
mac MAC address of the client. Ignored if count is greater than 1.
passphrase Passphrase of this entry
Required strength of generated passphrases. Valid values are “strong”,
passphrase_strength “easy” and “numbers”. Only used if passphrase is not supplied. Defaults
to “strong”. Ignored if passphrase is provided.
username Username of the entry. If count is greater than 1 a postfix will be added
for each entry. i.e. username-1, username-2
The VLAN(s) to which the user’s traffic should be mapped . This can be
vlan in the form of a single entry, a comma delimited list, or a range. i.e., “1”,
“1,5,7”, or “1-10”.
23.2.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
23.2.3 Example
Request
curl https://10.110.134.12/api/v1/wifi-enterprise/wlans/{WLAN Name}/epsk/generate
\
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"count": 1,
"mac": "0A:00:3E:BB:00:FD",
"passphrase": "Password123$%^",
5/28/20 Page 81 of 90
"passphrase_strength": "strong",
"username": "Lab laptop",
"vlan": "20-25"
}
Response
{
"message": "success"
}
Change made are staged for two minutes since the last ePSK write request before being committed to
the live database. This prevents extra configuration messages needing to be sent to devices for Auto-
Sync. During this two-minute period, staged change will only be viewable to the API session that
made the changes. The associated WLAN will also be locked to that API session during this time,
meaning that other users will be blocked from making changes.
/api/v1/msp/managed_accounts/{msp_name}/wifi-
POST enterprise/wlans/{WLAN Name}/epsk/delete
23.3.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body Parameters
Name Details
exclude_list Array of ePSK Entry names that should not be deleted to be used in
conjunction with “all” include_list option.
include_list Array of ePSK Entry names that should be deleted or “all” string literal to
delete all entries.
23.3.2 Response
The response will be either HTTP 200 (for success), or an HTTP error code with a JSON body (see
cnMaestro API User Guide for details).
Body
Name Details
delete_count Number of ePSK Policies that were successfully deleted
23.3.3 Examples
Request
5/28/20 Page 82 of 90
curl https://10.110.134.12/api/v1/wifi-enterprise/wlans/{WLAN Name}/epsk/delete
\
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"include_list": [
"default",
"TEST_AUTOMATION_POLICY"
]
}
Response
{
"message": "Success",
"delete_count": 2
}
Request
curl https://10.110.134.12/api/v1/wifi-enterprise/wlans/{WLAN Name}/epsk/delete
\
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"include_list": "all",
"exclude_list": [
"default",
"TEST_AUTOMATION_POLICY"
]
}
Response
{
"message": "Success",
"delete_count": 83
}
POST /api/v1/jobs
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Body
Name Details
5/28/20 Page 83 of 90
auto_reboot Auto reboot after update (default is true) Note: Only applicable for cnMatrix
device
mac_list List of device MACs to update (Note: All devices should have same type)
notes Note to be shown on update
parallel_device_limit Number of devices to be updated simultaneously
parent_first Update parent first (Note: Only applicable for epmp and pmp)
retry_skipped_update Retry update if skipped (default is true)
schedule_time Date/Time to schedule the update (default is now)
software_version Software version to be applied
stop_update_on_error Stop update if any error occurs (default is false)
type type of job ( software )
Request
curl https://10.110.134.12/api/v1/jobs/devices/update \
-X POST -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
BODY
{
"type” : “software”,
"mac_list” : [“C0:00:0B:00:00:0F”],
"software_version": "16.0.0.1",
"schedule_time": "2019-09-05T22:23:58",
"notes": "NBI API",
"parent_first": false
"retry_skipped_update": true,
"stop_update_on_error": true,
"parallel_device_limit": 10
}
Response
{
"message": "Successfully created the Job.",
"job_id": 3
}
GET /api/v1/jobs?type=software
GET /api/v1/jobs/{job_id}?type=software
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Content-Type application/json
Parameters
Header Value
fields Select JSON fields to be returned.
limit, offset Pagination functionality.
type Type of job ( software )
5/28/20 Page 84 of 90
Response
Body
Name Details
completion_time Completion datetime of job
created_by Job creator
creation_time Creation datetime of job
details Contains information specific to update job types.
details.notes Notes on update job configured while starting the job
details.parallel_device_limit Number of devices allowed to be configured in parallel for this job.
details.parent_first true Update parent before child. false otherwise
details.retry_skipped_update true if the update job should be retried again if skipped. false
otherwise.
details.stop_on_error true if the update job should be stopped if an error occurs. false
otherwise.
devices.count Number of devices within this job
devices.failed Number of devices that failed to be configured
devices.remaining Number of devices that are yet to be configured
devices.skipped Number of devices that were skipped
devices.success Number of devices that have been configured successfully
job_id Unique ID of this configuration job
managed_account Account that created the job
schedule_time Scheduled datetime of job
state Current state of job. “not_started”, “stopped”, “complete”,
“in_progress”, “aborted”
target_version Software version to be updated with
type Job type. Currently only “update” is available.
24.2.2 Example
Below example show the curl command to get all the managed services from the system
Request
curl https://10.110.134.12/api/v1/jobs/3?type=software \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"paging": {
"offset": 0,
"limit": 100,
"total": 1
},
"data": [
{
"completion_time": "2019-08-14T11:53:39+00:00",
"creation_time": "2019-08-14T11:53:39+00:00",
"schedule_time": "2019-09-05T22:23:58+00:00",
"job_id": 3,
"target_version": "16.0.0.1",
"created_by": "Administrator",
"managed_account": "All Accounts",
"details": {
"parallel_device_limit": 10,
"stop_on_error": true,
"retry_skipped_update": true,
"parent_first": false,
"notes": "NBI API"
},
5/28/20 Page 85 of 90
"devices": {
"count": 1,
"failed": 0,
"remaining": 1,
"skipped": 0,
"success": 0
},
"state": "Scheduled",
"type": "update"
}
]
}
GET /api/v1/jobs/{job_id}/details?type=software
24.3.1 Request
HTTP Headers
Header Value
Accept (optional) application/json
Authorization Bearer <ACCESS_TOKEN>
Parameters
Header Value
limit, offset Pagination functionality.
Managed account name filter.
24.3.2 Response
Body
Name Details
job_id Unique ID of this configuration job
last_update_time Date/time of last message received from device.
mac MAC address of the device
managed_account Account that created the job
message Detailed description of device state.
mode Device mode
name Name of the device
new_version Target software version of device
original_version Current software version of device
result Software update state
5/28/20 Page 86 of 90
24.3.3 Example
Request
curl https://10.110.134.12/api/v1/jobs/1/details?type=software \
-X GET -k \
-H "Authorization: Bearer ee4e077cf457196eb4d27cf6f02686dc07763059"
Response
{
"paging": {
"offset": 0,
"limit": 100,
"total": 1
},
"data": [
{
"name": "Lab device 5",
"mac": "00:04:56:C0:0C:7C",
"mode": "sm",
"job_id": 1,
"message": "Device timed out while waiting for update",
"result": "Skipped",
"last_update_time": "2018-08-15T15:48:08+00:00",
"managed_account": "Your_MSP",
"original_version": "1.2.3",
"new_version": "4.3.2.1"
}
]
}
python client.py
25.2 Code
# Copyright (C) 2017 Cambium Networks, LTD. All rights reserved.
#
# API test code for cnMaestro that demonstrates session establishment and API
# calls. The client connects to cnMaestro using the Client Id and Client
# Secret downloaded from the Client API page in the cnMaestro UI. The Client
# receives a URL, Access Token, and Expiration Interval (in seconds)
# defining how long the token is valid. The URL and Access Token are used
# for subsequent API requests.
#
# This example also demonstrates the Token Validation API, which connects to
# cnMaestro directly, and not necessarily the URL returned during session
# establishment (though in On-Premises, they will be identical).
#
import sys
import requests
import json
import base64
HOST = '10.10.10.10'
CLIENT_ID = 'b3hmeraj3Xse24Qj'
CLIENT_SECRET = 'oCrhxTwqQ34O2E6pCLXMq9dEs8tzPL'
5/28/20 Page 87 of 90
def check_http_return(section, url, code, request):
if int(code) != 200:
print '%s failed with HTTP status %d' % (section, code)
print 'URL: %s' % url
try:
print json.dumps(request.json(), indent=2)
except: pass
sys.exit(1)
# Main function.
if __name__== '__main__':
# Retrieve access parameters and generate API session
print '\nRetrieve Access Parameters'
access_token, expires_in = get_access_parameters(HOST, CLIENT_ID, CLIENT_SECRET)
print 'Success: access_token (%s) expires_in (%s)\n' % (access_token, expires_in)
Path Details
Alarms API
5/28/20 Page 88 of 90
/api/v1/alarms All active alarms.
/api/v1/alarms/{Alarm ID} Single active alarm (not supported)
/api/v1/alarms/history All historical and active alarms.
/api/v1/alarms/history/{Alarm ID} Single historical or active alarm. (not supported)
Clients API
/api/v1/devices/clients All clients
/api/v1/devices/{MAC Address}/clients/{client MAC} Clients connected a specific device
/api/v1/devices/{MAC Address}/clients/summary Aggregated data for all Wi-Fi clients
/api/v1/devices/{MAC Address}/clients/{client MAC}/summary Aggregated data for a single client
Devices API
/api/v1/devices System device inventory; claim new device
/api/v1/devices/{Alarms API} System device alarms
/api/v1/devices/{Clients API} System WiFi clients
/api/v1/devices/{Events API} System device events
/api/v1/devices/{Mesh API} System WiFi mesh peers.
/api/v1/devices/statistics System device statistics
/api/v1/devices/performance System device performance
/api/v1/devices/{MAC Address} Single device inventory; update device
/api/v1/devices/{MAC Address}/{Alarms API} Single device alarms
/api/v1/devices/{MAC Address}/{Clients API} Single device WiFi clients
/api/v1/devices/{MAC Address}/{Events API} Single device events
/api/v1/devices/{MAC Address}/{Mesh API} Single device WiFi mesh peers
/api/v1/devices/{MAC Address}/reboot Single device reboot operation
/api/v1/devices/{MAC Address}/statistics Single device statistics
/api/v1/devices/{MAC Address}/performance Single device performance
Events API
/api/v1/events All events.
Jobs API
/api/v1/jobs/{job_id} Configuration job management
/api/v1/jobs/{job_id}/devices Configuration job management
Mesh API
/api/v1/devices/mesh/peers All mesh peers
/api/v1/devices/mesh/peers/{peer mac} Specific mesh peer
/api/v1/devices/{MAC Address}/mesh/peers/{peer mac} Mesh peers connected to a specific device
Networks API
/api/v1/networks System network inventory; create new network
/api/v1/networks/{NID} Single network inventory
/api/v1/networks/{NID}/[Devices API] Single network devices
Portals API
/api/v1/portals All clients
/api/v1/portals/{portal id} Clients connected a specific device
PUT request to update the whitelist for a particular
/api/v1/portals/{portal id}/whitelist
portal
Sessions API
/api/v1/users/sessions All user sessions
Sites API
/api/v1/networks/{NID}/sites System site inventory; create new site
/api/v1/networks/{NID}/sites/{SID} Single site inventory
5/28/20 Page 89 of 90
/api/v1/networks/{NID}/sites/{SID}/[Devices API] Single site devices
Towers API
/api/v1/networks/{NID}/towers System towers inventory; create new tower
/api/v1/networks/{NID}/towers/{TID} Single tower inventory
/api/v1/networks/{NID}/towers/{TID}/[Devices API] Single tower devices
5/28/20 Page 90 of 90