0% found this document useful (0 votes)
124 views55 pages

H3C Cloudnet Platform APIs

This document provides information about H3C Oasis platform APIs including how to activate open APIs, configure API request authentication, and obtain device and radio information through various API calls. It describes the API parameters, request and response formats, and examples of API usage.

Uploaded by

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

H3C Cloudnet Platform APIs

This document provides information about H3C Oasis platform APIs including how to activate open APIs, configure API request authentication, and obtain device and radio information through various API calls. It describes the API parameters, request and response formats, and examples of API usage.

Uploaded by

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

H3C Oasis Platform APIs

This document provides information about H3C Oasis platform APIs and the methods to configure
API-related settings.

Usage guidelines
Activate open APIs for third-party platforms
1. Log in to the Oasis platform.
2. Hover over the grid icon , and then select Network Management.
3. Select a site from the scenario menu, and then select Settings > Open Platforms from the
navigation pane.
4. Click Activate. The page displays the authentication key if open APIs have been activated.
Figure 1 Activating open APIs for third-party platforms

Configure API request authentication


The Oasis platform supports only key authentication for third-party access through APIs.
To configure API request authentication:
1. Hover over the grid icon , and select Network Management.
2. Select a site from the scenario menu, and then select Settings > Open Platforms from the
navigation pane.
3. Obtain the key for authentication.
Figure 2 Obtaining the key for authentication

To change the key, click Change Key. The current key will become invalid after a new key is
generated.
If you click Disable, the key will become invalid. For the key to take effect again, click Enable.
Figure 3 Obtaining the key for authentication

4. Add the key to the headers of API requests, as shown in Figure 4.


Figure 4 Adding keys to the headers of API requests

Obtain device serial numbers


1. Hover over the grid icon , and select Network Management.
2. Select a site from the scenario menu, and then select Dashboard > Network > Dashboard
from the navigation pane.
3. Click the Device tab to view device serial numbers. If the Serial Number column is not
displayed in the device list, click the Columns icon and then select Serial Number.
Figure 5 Displaying device serial numbers
API parameters
Site
Obtain manageable sites of users
Limit: 100 times/day
Interface URL: https://oasiscloudapi.h3c.com/user/shop
Request method: GET
Table 1 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 2.

Table 2 Data field parameters

Parameter Format Description


userName String Username.
shopName String Site name.
shopId Index Site ID.
province String Province.
city String City.
area String District.
address String Detailed address.
phone String Phone number.
scenarioName String Scenario name.
Site label information. Members include:
columns Data structure  name.
 value.
name String Site label name.
value String Site label value.

Example:
Device
Obtain device information in a site
Limit: 1 time/second
Interface URL: https://oasiscloudapi.h3c.com/shop/device
Request method: POST
Table 3 Request parameters

Parameter Format Description


shopIds String array Site IDs. This field is required.

Table 4 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean
 0—Success.
Parameter Format Description
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 5.

Table 5 Data field parameters

Parameter Format Description


devSN String Device serial number.
devModel String Device model.
shopId String Site ID.
Device type. Options include:
devType String  AC.
 XIAOBEIROUTER—Xiaobei router.

aliasName String Device alias.

Example:

Obtain device operation information


Interface URL: https://oasiscloudapi.h3c.com/device/operation
Request method: POST
Table 6 Request parameters

Parameter Format Description


This field is required and the value is
method String
getBasicDevInfo.

Device serial numbers. This field can contain a


devSN String array maximum of 100 characters.
This field is required.

Table 7 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 8.

Table 8 Data field parameters

Parameter Format Description


devSN String Device serial number.
devName String Device name.
devHardVersion String Device hardware version.
devSoftVersion String Device software version.
devMode String Device model.
devType String Device type.
devOnlineTime Integer Device online duration, in seconds.
Device location, including country, province, and
devLocation Object
city information.

devAddress String IP address of the device egress interface.


devMAC String MAC address of the device.
memoryTotalSize Integer Memory size.
diskTotalSize Integer Flash size.
Device state. Options include:
devStatus String  online.
 offline.

Example:
Obtain AP information
Limit: 1 time/second
Interface URL: https://oasiscloudapi.h3c.com/device/apinfo
Request method: GET
Table 9 Request parameters

Parameter Format Description


devsn String Device serial number. This field is required.

Table 10 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 11.

Table 11 Data field parameters

Parameter Format Description


apIp String AP IP address.
apSN String AP serial number.
apName String AP name.
apModel String AP model.
apSoftVersion String Software version.
AP state. Options include:
apStatus Integer  1—Online.
 2—Offline.
Parameter Format Description
 3—Downloading the image.

apOnlineTime Integer AP online duration.


apMAC String AP MAC address.

Example:

Obtain radio information


Limit: 1 time/second
Interface URL: https://oasiscloudapi.h3c.com/device/radioinfo
Request method: GET
Table 12 Request parameters

Parameter Format Description


devsn String Device serial number. This field is required.

Table 13 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 14.

Table 14 Data field parameters

Parameter Format Description


devSN String Device serial number.
apSN String AP serial number.
apName String AP name.
radioId Integer Radio ID.
radioMode String Radio mode.
Parameter Format Description
radioChannel Integer Radio working channel.
radioPower String Radio transmit power.

Example:

Obtain SSID information


Limit: 1 time/second
Interface URL: https:// oasiscloudapi.h3c.com/device/ssidinfo? devsn=XXX
Request method: GET
Table 15 Request parameters

Parameter Format Description


devsn String Device serial number. This field is required.

Table 16 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 17.

Table 17 Data field parameters

Parameter Format Description


devSN String Device serial number.
SSIDName String SSID.
spName String Wireless service name.
Wireless service state. Options include:
status Integer  1—Enabled.
 2—Disabled.
Parameter Format Description
Whether the SSID is hidden. Options include:
hide Integer  0—No.
 1—Yes.

maxClient Integer Maximum number of concurrent connected clients.


maxSendRatio Integer Maximum transmission rate.
maxReceiveRatio Integer Maximum receiving rate.

Example:

Obtain client MAC addresses by SSID or device serial


number
Limit: 1 time/second
Interface URL: https://oasiscloudapi.h3c.com/device/ssid/clientmac
Request method: POST
Table 18 Request parameters

Parameter Format Description


Request method. This field is required and the
method String
value is getClientMacbySsid.
Request parameters. Members include:
 shopId.
param Object  devSN.
 SSID.
This field is required.
shopId String Site ID. This field is required.
devSN String Device serial number. This field is required.
SSID String SSID. This field is required.
Table 19 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data String array Client MAC addresses.

Example:

Obtain associated client history


Limit: 100 times/day
Interface URL: https://oasiscloudapi.h3c.com/device/historyclients?devSN=XXXX
&skipnum=10&limitnum=10
Request method: POST
Table 20 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 21.

Table 21 Data field parameters

Parameter Format Description


count_total Integer Total number of clients.
count_left Integer Number of displayed clients.
Parameter Format Description
Client list. Members include:
 macAddr.
 apName.
 clientMAC.
 clientIP.
histClientList Data structure
 clientVendor.
 clientSSID.
 onlineTime.
 onLineDate.
 offLineDate.
macAddr String AP MAC address.
apName String AP name.
clientMAC String Client MAC address.
clientIP String Client IP address.
clientVendor String Client vendor.
clientSSID String SSID.
onlineTime Integer Online duration.
onLineDate String Time at which the client came online, in UTC format.
offLineDate String Time at which the client went offline, in UTC format.

Example:

Obtain detailed online client information


Limit: 1 time/second
Interface URL:
https://oasiscloudapi.h3c.com/device/onlineclients?devSN=XXXX&skipnum=10&limitnum=10
Request method: POST
Table 22 Request parameters

Parameter Format Description


Fields by which the displayed information is filtered.
For example, to display statistics only about clients
findoption Object associated with a specified AP, enter findoption
{ApName: "apname"}. The apname field represents
the AP name.
Fields by which the displayed information is sorted.
sortoption Object For example, to sort statistics in the response by AP
name, enter sortoption {ApName: apname }.

Table 23 Response parameters

Parameter Format Description


clientList Data structure Client list. For more information, see Table 24.

Table 24 clientList field parameters

Parameter Format Description


count_total Integer Total number of clients.
count_left Integer Number of displayed clients.
Client information. Members include:
 NegoMaxRate.
 apName.
 clientMAC.
clientInfo Data structure  clientIP.
 clientVendor.
 clientSSID.
 onlineTime.
 onLineDate.
NegoMaxRate String Maximum negotiated rate, in Mbps.
apName String AP name.
clientMAC String Client MAC address.
clientIP String Client IP address.
clientVendor String Client vendor.
clientSSID String SSID.
onlineTime Integer Online duration.
onLineDate String Time at which the client came online, in UTC format.

Example:
Obtain client traffic and rate statistics
Interface URL: https://oasiscloudapi.h3c.com/device/interfaceflow
Request method: POST
Table 25 Request parameters

Parameter Format Description


This field is required and the value is
method String
getAllInterfaceFlow.

devSN String Client serial number. This field is required.


startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 26 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 27.

Table 27 Data field parameters

Parameter Format Description


speedDown Integer Downlink speed, in Kbps.
speedUp Integer Uplink speed, in Kbps.
downFlow Integer Downloaded traffic, in Kb.
upFlow Integer Uploaded traffic, in Kb.
updateTime Time object Update time, in UTC format.
Example:

Obtain AP longitude and latitude information by device serial


number
Interface URL: https://oasiscloudapi.h3c.com/device/apgps
Request method: GET
Table 28 Request parameters

Parameter Format Description


devsn String Device serial number. This field is required.

Table 29 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 30.

Table 30 Data field parameters

Parameter Format Description


apSN String AP serial number.
apName String AP name.
apLongitude String Longitude.
apLatitude String Latitude.
Horizontal velocity. This field displays N/A if the AP
apVelocity String did not report GPS information automatically. You
can manually configure GPS information for the AP.
Parameter Format Description
apOrientation String Orientation.
apElevation String Elevation.
Time at which the GPS information is obtained, in
gpsObtainTime Date
UTC format.

Example:

Obtain AP longitude and latitude information by AP serial


number
Interface URL: https://oasiscloudapi.h3c.com/device/apgps
Request method: GET
Table 31 Request parameters

Parameter Format Description


devsn String Device serial number. This field is required.
apsn String AP serial number. This field is required.

Table 32 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 33.

Table 33 Data field parameters

Parameter Format Description


apSN String AP serial number.
apName String AP name.
apLongitude String Longitude.
Parameter Format Description
apLatitude String Latitude.
Horizontal velocity. This field displays N/A if the AP
apVelocity String did not report GPS information automatically. You
can manually configure GPS information for the AP.
apOrientation String Orientation.
apElevation String Elevation.
Time at which the GPS information is obtained, in
gpsObtainTime Date
UTC format.

Example:

Authentication
The Oasis platform can obtain authenticated users' IP, MAC, associated AP, and social media
information, including WeChat profile photo, name, and registration location. The information is
saved in the database and is accessible for third parties through open APIs.

Obtain the authentication history


Limit: 1 time/second
Interface URL: https://oasiscloudapi.h3c.com/api/o2oportal/getAuthUserInfo
Request method: POST
Table 34 Request parameters

Parameter Format Description


shop_id Digit array Site ID. This field is required.
Start time, in milliseconds.
Information about clients whose association time is
begin_time Integer
within the time range will be displayed.
This field is required.

End time, in milliseconds.

end_time Integer Information about clients whose association time is


within the time range will be displayed.
The time difference between the start time and the
Parameter Format Description
end time cannot be larger than 168 hours.
This field is required.
Maximum number of history entries that can be
page_size Integer displayed on one page, in the range of 1 to 5000.
The default value is 1000.
Number of the start page to be displayed, a positive
integer larger than 0.
page_index Integer
By default, the start page is the first page (page
number 1).

Table 35 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 36.

Table 36 Data field parameters

Parameter Format Description


total_count Integer Total number of history entry matches.
ap_group_id String AP group ID.
ap_mac String AP MAC address.
upstream String Uploaded traffic.
downstream String Downloaded traffic.
user_group String User group.
shop_id Integer Site ID.
Authentication type. Options include:
 1—One-key authentication.
 2—SMS authentication.
 6—WeChat official account authentication.
user_type Boolean
 7—WeChat Wi-Fi authentication.
 8—App authentication.
 9—Tencent secure Wi-Fi authentication.
 10—Fixed account authentication.

access_start_time Integer Client access time, in milliseconds.


access_duration Integer Online duration.
access_ac_ip Integer IP address of the associated AC.
user_mac String Client MAC address.
user_ip Integer Client IP address.
vendor String Client vendor.
Parameter Format Description
terminal_model String Client model.
access_duration_sum Integer Total online duration.
login_freq_sum Integer Total number of logins.
upstream_sum Integer Total uploaded traffic.
downstream_sum Integer Total downloaded traffic.
Disassociation type. This field is reserved for future
offline_type Integer
use.

mobile_no String Phone number.


user_name String Username.
app_auth_id String APP authentication ID.
app_account String APP authentication username.
preliminary String Permissions.
open_id String WeChat OpenID.
nickname String WeChat username.
WeChat user gender. Options include:
 0 or –1—Unknown. This indicates that the user
gender in not set in WeChat or the Oasis
sex Boolean platform failed to obtain gender information
from WeChat.
 1—Male.
 2—Female.

province String Province set in WeChat.


city String City set in WeChat.
country String Country set in WeChat.
headimgurl String WeChat user profile photo.
unionid String Unique identifier of the WeChat user.
tid String Encrypted phone number of the WeChat user.
app_id String AppID of the WeChat official account.
mobile_decode String Decrypted phone number.

Example:
New guest and regular guest statistics
Obtain current guest statistics
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getCurrentClientCount
Request method: POST
Table 37 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 38 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 39.
Table 39 Data field parameters

Parameter Format Description


new Integer Number of new guests.
old Integer Number of regular guests.
total Integer Total number of guests.

Example:

Obtain history guest statistics


Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryDayClientCount
Request method: POST
Table 40 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 41 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
Parameter Format Description
data Object Returned data. For more information, see Table 42.

Table 42 Data field parameters

Parameter Format Description


new Integer Number of new guests.
old Integer Number of regular guests.
total Integer Total number of guests.

Example:

Online client statistics


Obtain the online client quantity
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getCurrentOnlineClientCount
Request method: POST
Table 43 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.

startTime Integer Start time, in milliseconds. This field is required.


endTime Integer End time, in milliseconds. This field is required.

Table 44 Response parameters

Parameter Format Description


code Boolean Status code. Options include:
Parameter Format Description
 0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 45.

Table 45 Data field parameters

Parameter Format Description


onlineCount Integer Number of online clients.

Example:

Peak statistics
Obtain peak statistics for the specified time range
The statistics are collected on a per-day basis. You cannot obtain peak statistics for the current day.
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryPeakNumber
Request method: POST
Table 46 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array
operation obtains statistics about clients in all sites.
Parameter Format Description
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 47 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 48.

Table 48 Data field parameters

Parameter Format Description


avgRxBytes Integer Maximum average downloaded traffic, in MB.
avgTxBytes Integer Maximum average uploaded traffic, in MB.
clientCount Integer Maximum guest quantity.
totalTxBytes Integer Maximum total uploaded traffic, in MB.
totalRxBytes Integer Maximum total downloaded traffic, in MB.
avgTime Integer Maximum average length of stay, in seconds.
newCount Integer Maximum number of new guests.
oldCount Integer Maximum number of regular guests.

Example:
Client trend statistics
Obtain history client trend statistics
The statistics are displayed on a per-hour basis.
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryHourClientCountDetail
Request method: POST
Table 49 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 50 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 51.

Table 51 Data field parameters

Parameter Format Description


clientCount Integer Total number of clients.
time String Time, in UTC format.

Example:
Obtain history guest trend statistics
The statistics are displayed on a per-day basis.
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryDayClientCountDetail
Request method: POST
Table 52 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 53 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 54.

Table 54 Data field parameters

Parameter Format Description


newCount Integer Number of new guests.
Parameter Format Description
oldCount Integer Number of regular guests.
clientCount Integer Total number of guests.
time String Time, in UTC format.

Example:

Visit statistics
Obtain client visit statistics for the current week
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getCurrentWeekClientTimes
Request method: POST
Table 55 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 56 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean
 0—Success.
Parameter Format Description
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 57.

Table 57 Data field parameters

Parameter Format Description


one Integer Number of clients with one visit.
two Integer Number of clients with two visits.
three Integer Number of clients with three visits.
gteFour Integer Number of clients with four or more visits.

Example:

Obtain client visit statistics for the specified weeks


Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getCurrentWeekClientTimes
Request method: POST
Table 58 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.
Table 59 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 60.

Table 60 Data field parameters

Parameter Format Description


one Integer Number of clients with one visit.
two Integer Number of clients with two visits.
three Integer Number of clients with three visits.
gteFour Integer Number of clients with four or more visits.

Example:

Detailed visit statistics


Obtain detailed client visit statistics for the specified week
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryWeekClientTimesDetail
Request method: POST
Table 61 Request parameters

Parameter Format Description


user String Username. This field is required.
Parameter Format Description
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 62 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 63.

Table 63 Data field parameters

Parameter Format Description


one Integer Number of clients with one visit.
two Integer Number of clients with two visits.
three Integer Number of clients with three visits.
gteFour Integer Number of clients with four or more visits.
Date and time (0 o'clock on Monday of the week), in
date String
UTC format.

Example:
Average length of stay
Obtain the average length of stay of the current day
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getCurrentClientStayAvgDuration
Request method: POST
Table 64 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 65 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 66.

Table 66 Data field parameters

Parameter Format Description


time Integer Average length of stay, in seconds.

Example:
Obtain history length of stay statistics
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryClientStayAvgDuration
Request method: POST
Table 67 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 68 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 69.
Table 69 Data field parameters

Parameter Format Description


time Integer Average length of stay, in seconds.

Example:

Length of stay ratios


Obtain the length of stay ratios for the current day
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getCurrentClientStayDurationRatio
Request method: POST
Table 70 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.

startTime Integer Start time, in milliseconds. This field is required.


endTime Integer End time, in milliseconds. This field is required.
Table 71 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 72.

Table 72 Data field parameters

Parameter Format Description


Number of clients whose length of stay is 0 to 5
lt5Minutes Integer
(excluded) minutes.

Number of clients whose length of stay is 5 to 30


lt30Minutes Integer
(excluded) minutes.

Number of clients whose length of stay is 30 to 120


lt120Minutes Integer
(excluded) minutes.

Number of clients whose length of stay is 120 or


gte120Minutes Integer
more minutes.

Example:

Obtain the history length of stay ratios


Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryClientStayDurationRatio
Request method: POST
Table 73 Request parameters

Parameter Format Description


user String Username. This field is required.
shops String array Site IDs. If you do not specify this parameter, the
Parameter Format Description
operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 74 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 75.

Table 75 Data field parameters

Parameter Format Description


Number of clients whose length of stay is 0 to 5
lt5Minutes Integer
(excluded) minutes.

Number of clients whose length of stay is 5 to 30


lt30Minutes Integer
(excluded) minutes.

Number of clients whose length of stay is 30 to 120


lt120Minutes Integer
(excluded) minutes.

Number of clients whose length of stay is 120 or


gte120Minutes Integer
more minutes.

Example:

Length of stay trend


You cannot obtain the length of stay trend for the current day.
Obtain the length of stay trend statistics
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryClientStayDurationDetail
Request method: POST
Table 76 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 77 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 72.

Table 78 Data field parameters

Parameter Format Description


date String Date, in UTC format.
time Integer Average length of stay, in seconds.

Example:
Client traffic statistics
Obtain client traffic statistics for the current day
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getCurrentNetFlowBytes
Request method: POST
Table 79 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 80 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 81.

Table 81 Data field parameters

Parameter Format Description


totalTxBytes Integer Total uploaded traffic.
totalRxBytes Integer Total downloaded traffic.
avgTxBytes Integer Average uploaded traffic per day for each site.
avgRxBytes Integer Average downloaded traffic per day for each site.

Example:
Obtain history client traffic statistics
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryNetFlowBytes
Request method: POST
Table 82 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 83 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 84.

Table 84 Data field parameters

Parameter Format Description


totalTxBytes Integer Total uploaded traffic.
totalRxBytes Integer Total downloaded traffic.
avgTxBytes Integer Average uploaded traffic.
Parameter Format Description
avgRxBytes Integer Average downloaded traffic.

Example:

Total traffic trend


You cannot obtain the total traffic trend for the current day.

Obtain history client traffic trend


Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryNetFlowDetail
Request method: POST
Table 85 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the
shops String array operation obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 86 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 87.
Table 87 Data field parameters

Parameter Format Description


totalTxBytes Integer Total uploaded traffic, in MB.
totalRxBytes Integer Total downloaded traffic, in MB.
avgTxBytes Integer Average uploaded traffic, in MB.
avgRxBytes Integer Average downloaded traffic, in MB.
Time at which the statistics were collected, in UTC
date String
format.

Example:

Top 5 and Bottom 5 client quantity and traffic


Obtain Top 5 and Bottom 5 client quantity statistics
If only one site is specified, the statistics are returned by date. If multiple sites are specified, the
statistics are returned by site ID.
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getClientCountTopAndBottom
Request method: POST
Table 88 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the operation
shops String array obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.
Parameter Format Description
Client type. Options include:
 new.
clientType String
 old.
 total.

Table 89 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 90.

Table 90 Data field parameters

Parameter Format Description


top5 Data structure Top 5 client quantity statistics.
bottom5 Data structure Bottom 5 client quantity statistics.
index String Rank index, by which the statistics are returned.
count Integer Client quantity.

Example:

Obtain Top 5 and Bottom 5 client traffic statistics


If only one site is specified, the statistics are returned by data. If multiple sites are specified, the
statistics are returned by site ID.
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getFlowTopAndBottom
Request method: POST
Table 91 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the operation
shops String array obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.
Traffic type. Options include:
 totalRx—Total downloaded traffic.
flowType String  totalTx—Total uploaded traffic.
 avgRx—Average downloaded traffic.
 avgTx—Average uploaded traffic.

Table 92 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 93.

Table 93 Data field parameters

Parameter Format Description


top5 Data structure Top 5 client traffic statistics.
bottom5 Data structure Bottom 5 client traffic statistics.
index String Rank index, by which the statistics are returned.
count Integer Client traffic, in MB.

Example:
Report management
Obtain daily report data
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryDayReport
Request method: POST
Table 94 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the operation
shops String array obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.
Request page. Options include:
 firstPage.
 lastPage.
active String
 prePage.
 nextPage.
This field is required.
Rank order. Options include:
sortRoule String  ascending.
 descending.
sortName String Name of the field to sort by.
Number of clients to be displayed per page. This field is
limit Integer
required.
Page break identifier.
local JSON object To obtain the next page, fill in the field with the last entry on
this page. To obtain the previous page, fill in the field with
Parameter Format Description
the first entry on this page.

Total number of pages.


totalPage Integer
This field is required if you obtain data in the last page.
Report type. Options include:

authType String  relevance—Association.


 portal—Authentication. This field is required to obtain
authentication statistics.

Table 95 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
Returned data. If only one site is specified, the returned
Data structure or data contains parameters as shown in Table 96. If more
data
object than one site are specified, the returned data contains
parameters as shown in Table 96.

Table 96 Data field parameters (one site)

Parameter Format Description


info Data structure Returned data.
totalPage Integer Total number of matches.

Table 97 Data field parameters (multiple sites)

Parameter Format Description


_id String Unique identifier of returned data.
scenarioid String Site ID.
statTime String Access time, in UTC format.
clientCount Integer Total number of guests.
avgTime Integer Average length of stay, in seconds.
newCount Integer Number of new guests.
oldCount Integer Number of regular guests.
totalRxBytes Integer Total downloaded traffic, in MB.
totalTxBytes Integer Total uploaded traffic, in MB.
avgRxBytes Integer Average downloaded traffic, in MB.
avgTxBytes Integer Average uploaded traffic, in MB.

Example:
Obtain weekly report data
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryWeekReport
Request method: POST
Table 98 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the operation
shops String array obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.
Request page. Options include:
 firstPage.
 lastPage.
active String
 prePage.
 nextPage.
This field is required.
Rank order. Options include:
sortRoule String  ascending.
 descending.
sortName String Name of the field to sort by.
Number of clients to be displayed per page. This field is
limit Integer
required.
Page break identifier.
local JSON object To obtain the next page, fill in the field with the last entry on
this page. To obtain the previous page, fill in the field with
the first entry on this page.
totalPage Integer Total number of pages.
Parameter Format Description
This field is required if you obtain data on the last page.
Report type. Options include:

authType String  relevance—Association.


 portal—Authentication. This field is required to obtain
authentication statistics.

Table 99 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
Returned data. If only one site is specified, the returned
Data structure or data contains parameters as shown in Table 100. If
data
object multiple sites are specified, the returned data contains
parameters as shown in Table 100.

Table 100 Data field parameters (one site)

Parameter Format Description


info Data structure Returned data.
totalPage Integer Total number of matches.

Table 101 Data field parameters (multiple sites)

Parameter Format Description


_id String Unique identifier of returned data.
scenarioid String Site ID.
statTime String Access time, in UTC format.
clientCount Integer Total number of guests.
avgTime Integer Average length of stay, in seconds.
newCount Integer Number of new guests.
oldCount Integer Number of regular guests.
totalRxBytes Integer Total downloaded traffic, in MB.
totalTxBytes Integer Total uploaded traffic, in MB.
avgRxBytes Integer Average downloaded traffic, in MB.
avgTxBytes Integer Average uploaded traffic, in MB.
fourTimes Integer Number of guests with four or more visits.
threeTimes Integer Number of guests with three visits.
twoTimes Integer Number of guests with two visits.
oneTime Integer Number of guests with one visit.
maxavgTime Integer Maximum average length of stay.
Parameter Format Description
minavgTime Integer Minimum average length of stay.

Example:

Obtain monthly report data


Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryMonthReport
Request method: POST
Table 102 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the operation
Shops String array obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.
Request page. Options include:
 firstPage.
 lastPage.
Active String
 prePage.
 nextPage.
This field is required.
Rank order. Options include:
sortRoule String  ascending.
 descending.
sortName String Name of the field to sort by.
Number of clients to be displayed per page. This field is
Limit Integer
required.

Page break identifier.


Local JSON object To obtain the next page, fill in the field with the last entry on
this page. To obtain the previous page, fill in the field with
Parameter Format Description
the first entry on this page.

Total number of pages.


totalPage Integer
This field is required if you obtain data on the last page.
Report type. Options include:

authType String  relevance—Association.


 portal—Authentication. This field is required to obtain
authentication statistics.

Table 103 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
Returned data. If only one site is specified, the returned
Data structure or data contains parameters as shown in Table 104Table 100.
data
object If multiple sites are specified, the returned data contains
parameters as shown in Table 104.

Table 104 Data field parameters (one site)

Parameter Format Description


info Data structure Returned data.
totalPage Integer Total number of matches.

Table 105 Data field parameters (multiple sites)

Parameter Format Description


_id String Unique identifier of returned data.
scenarioid String Site ID.
statTime String Access time, in UTC format.
clientCount Integer Total number of guests.
avgTime Integer Average length of stay, in seconds.
newCount Integer Number of new guests.
oldCount Integer Number of regular guests.
totalRxBytes Integer Total downloaded traffic, in MB.
totalTxBytes Integer Total uploaded traffic, in MB.
avgRxBytes Integer Average downloaded traffic, in MB.
avgTxBytes Integer Average uploaded traffic, in MB.

Example:
Report statistics
Obtain report summary
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getReportStaticData
Request method: POST
Table 106 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the operation
shops String array obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.
Report type. Options include:
 day—Daily report.
reportType String
 week—Weekly report.
 month—Monthly report.

Table 107 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Object Returned data. For more information, see Table 108.
Table 108 Data field parameters

Parameter Format Description


new Integer Number of new guests.
old Integer Number of regular guests.
total Integer Total number of guests.
Number of guests with one visit.
one Integer
This field is supported only in weekly reports.

Number of guests with two visits.


two Integer
This field is supported only in weekly reports.
Number of guests with three visits.
three Integer
This field is supported only in weekly reports.
Number of guests with four or more visits.
four Integer
This field is supported only in weekly reports.
avgTime Integer Average length of stay, in seconds.

Example:

Site-based SSID statistics


Obtain history SSID statistics
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistorySSIDData
Request method: POST
Table 109 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the operation
shops String array
obtains statistics about clients in all sites.
Parameter Format Description
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 110 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 111.

Table 111 Data field parameters

Parameter Format Description


SSID String SSID.
Number of associated clients, including both online and
count Integer
offline clients.

Example:

Obtain current SSID statistics


Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getCurrentSSIDData
Request method: POST
Table 112 Request parameters

Parameter Format Description


user String Username. This field is required.
Parameter Format Description
Site IDs. If you do not specify this parameter, the operation
shops String array obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 113 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 114.

Table 114 Data field parameters

Parameter Format Description


SSID String SSID.
count Integer Number of clients associated with the SSID.

Example:

Site-based vendor statistics


Obtain history vendor statistics
Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getHistoryVendorData
Request method: POST
Table 115 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the operation
shops String array obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 116 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 117.

Table 117 Data field parameters

Parameter Format Description


clientVendorEn String Vendor name in English.
count Integer Number of clients made by the vendor.
clientVendor String Vendor name in Chinese.

Example:

Obtain current vendor statistics


Interface URL: https://oasiscloudapi.h3c.com/stamonitor/getCurrentVendorData
Request method: POST
Table 118 Request parameters

Parameter Format Description


user String Username. This field is required.
Site IDs. If you do not specify this parameter, the operation
shops String array obtains statistics about clients in all sites.
This field is required.
startTime Integer Start time, in milliseconds. This field is required.
endTime Integer End time, in milliseconds. This field is required.

Table 119 Response parameters

Parameter Format Description


Status code. Options include:
code Boolean  0—Success.
 Others—Failure.
message String Failure reason.
data Data structure Returned data. For more information, see Table 120.

Table 120 Data field parameters

Parameter Format Description


clientVendorEn String Vendor name in English.
count Integer Number of clients made by the vendor.
clientVendor String Vendor name in Chinese.

Example:

You might also like