No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

eSight V300R010C00SPC200, 300, and 500 Self-Service Integration Guide 10

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Northbound APIs for WLAN Management

Northbound APIs for WLAN Management

Query the AC List Information

Function

This interface is used to query the basic AC information and key counter list.

URI

/rest/openapi/network/wlan/aclist

Access Method

GET

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

orderby

Optional

URL

String

Indicates the field to sort the query results.

desc

Optional

URL

boolean

Specifies whether query results are sorted in a descending order. The default value is false.

pageSize

Optional

URL

int

Indicates the number of records on each page. The default value is 20 and the maximum value is 100.

start

Optional

URL

int

Indicates the start position to return query results. The default value is 0.

condition

Optional

URL

Map

Indicates the query condition. The condition must be in the following format:

condition:

{"condition ID1":"condition expression",

{"condition ID2":"condition expression",

...

"logic":"condition ID1|(condition ID2&condition ID3)"

}

Note: "&" indicates "and", and "|" indicates "or".

A condition includes the following fields:

1. Fields in the AC list

For example:

condition:

{

"acState":"=1",

"acName":"=[AC6605]",

"logic":"acState&acName"

}

For details, see Condition Field Specifications.

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

Indicates the total number of items in the query results that are returned.

data

List

Indicates the queried AC information list.

The following table lists the fields contained in the data object.

Field

Value Type

Description

neDn

String

Indicates the unique identifier of the AC.

acName

String

Indicates the AC name.

acState

int

Indicates the status. The options are as follows: 0 (Unmanaged), 1 (Online), 2 (Offline), 3 (Unknown), 4 (SNMP Unreachable), and 5 (Error).

acIp

String

Indicates the AC's IP address.

acType

String

Indicates the AC type.

apAuthMode

int

Indicates the AP authentication mode.

  • 1: MAC address authentication
  • 2: SN authentication
  • 3: non-authentication

forwardMode

int

Indicates the data forwarding mode.

  • 1: ESS
  • 2: AP

countryCode

String

Indicates the country code.

regionLoaction

String

Indicates the region where an AC is located.

interfaceMethod

int

Indicates the source interface type.

interfaceValue

String

Indicates the source interface value. Check whether a source interface value is the IP address of the source interface based on the source interface type.

apTotal

String

Indicates the total number of APs.

apOnlineNum

String

Indicates the number of online APs.

userOnlineNum

String

Indicates the number of online users.

cpuUseRate

String

Indicates the device's average CPU usage.

memUseRate

String

Indicates the device's average memory usage.

responseTime

String

Indicates the response time of an AC.

unreachRate

String

Indicates the rate of daily ping failures.

Precautions

None.

Request Example

curl -X get -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/aclist'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 410

{"code":0,"totalSize":1,"description":"Operate Successfully.","data":[{"forwardMode":-1,"regionLoaction":"/","apTotal":"1","interfaceValue":"500","acState":2,"userOnlineNum":"","countryCode":"","neDn":"NE=34603126","apAuthMode":1,"acName":"AC6605_42","memUseRate":"","acType":"AC6605-26-PWR","apOnlineNum":"1","acIp":"10.137.240.42","cpuUseRate":"","interfaceMethod":2,"responseTime":"4","unreachRate":"0.0"}]}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class QueryAcList
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/aclist";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "GET";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters 
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("pageSize", "1"),
                new BasicNameValuePair("start", "1")
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":1,
"description":"Operate Successfully.",
"data":[{"forwardMode":-1,"regionLoaction":"/","apTotal":"1","interfaceValue":"500","acState":2,"userOnlineNum":"","countryCode":"","neDn":"NE=34603126","apAuthMode":1,"acName":"AC6605_42","
memUseRate":"","acType":"AC6605-26-PWR","apOnlineNum":"1","acIp":"10.137.240.42","cpuUseRate":"","interfaceMethod":2,"responseTime":"4","unreachRate":"0.0"}]
}

Query the AP List Information

Function

This interface is used to query the basic AP information and key counter list.

URI

/rest/openapi/network/wlan/aplist

Access Method

GET

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

orderby

Optional

URL

String

Indicates the field to sort the query results.

desc

Optional

URL

boolean

Specifies whether query results are sorted in a descending order. The default value is false.

pageSize

Optional

URL

int

Indicates the number of records on each page. The default value is 20 and the maximum value is 100.

start

Optional

URL

int

Indicates the start position to return query results. The default value is 0.

condition

Optional

URL

Map

Indicates the query condition. The condition must be in the following format:

condition:

{"condition ID1":"condition expression",

{"condition ID2":"condition expression",

"logic":"condition ID1|(condition ID2&condition ID3)"

Note: "&" indicates "and", and "|" indicates "or".

A condition includes the following fields:

1. Fields in the AP list (except ssidList)

For example:

condition:

{

"neDn":"=NE=1111|=NE=2222|=NE=3333",

"apId":"=1",

"logic":"neDn&apId"

}

For details, see Condition Field Specifications.

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

Indicates the total number of items in the query results that are returned.

data

List

Indicates the queried AP information list.

The following table lists the fields contained in the data object.

Field

Value Type

Description

nodeDn

String

Indicates the unique identifier of the AP.

neDn

String

Indicates the unique identifier of the connected AC.

apId

String

Indicates the AP index.

apName

String

Indicates the AP name.

status

int

Indicates the AP status.

  • 5, 7, 8, and 9: normal
  • 1 and 4: offline
  • 2: unknown
  • 12: unmatched versions
  • Others: error

apType

String

Indicates the AP type.

mac

String

Indicates the MAC address.

apIp

String

Indicates the IP address.

groupName

String

Indicates the AP group name.

acName

String

Indicates the name of the connected AC.

locationId

String

Indicates the region ID.

regionLocation

String

Indicates the region where an AP is located.

apAlias

String

Indicates the AP alias.

category

String

Indicates the AP category.

  • 1: fit AP
  • 2: fat AP

apVersion

String

Indicates the AP software version.

sn

String

Indicates the AP SN.

apRegionName

String

Indicates the AP domain.

antennaMode

int

Indicates the antenna mode.

  • 1: auto mode
  • 2: left mode
  • 3: right mode

cpuUseRate

String

Indicates the AP's CPU usage.

memUseRate

String

Indicates the AP's memory usage.

apPortRate

String

Indicates the uplink port rate, in kbit/s.

userOnlineNum

String

Indicates the number of online users.

accessSucRate

String

Indicates the user access failure rate.

userFail

String

Indicates the user offline rate.

apPortBytes

String

Indicates the uplink port traffic, in KB.

ssidList

List

Indicates the SSID list. (The number of SSIDs of an AP cannot exceed 16.)

Precautions

None.

Request Example

curl -X get -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/aplist'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 590

{"code":0,"totalSize":106,"description":"Operate Successfully.","data":[{"apName":"AP-0","antennaMode":1,"accessSucRate":"","apPortRate":"","userOnlineNum":40,"locationId":"/>NEGROUP=34603009","mac":"C1-CA-01-01-01-01","nodeDn":"NE=34603016","apId":"0","apIp":"190.0.0.1","apVersion":"V200R001C00","memUseRate":"","regionLocation":"test","sn":"zyin0","apRunTime":"","apAlias":"","status":8,"apPortBytes":"","apRegionName":"zyin","neDn":"NE=34603010","userFail":"","apType":"AP6010AGN-DN","acName":"AC-SPU-zhs-9","category":"1","clientNum":"","cpuUseRate":"","ssidList":["ssid","ssid_5G"]}]}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class QueryApList
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/aplist";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "GET";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters 
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("pageSize", "1"),
                new BasicNameValuePair("start", "1")
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}
The returned result is as follows:
{
"code":0,
"totalSize":106,
"description":"Operate Successfully.",
"data":[{"apName":"AP-0","antennaMode":1,"accessSucRate":"","apPortRate":"","userOnlineNum":40,"locationId":"/>NEGROUP=34603009","mac":"C1-CA-01-01-01-01","nodeDn":"NE=34603016","apId":"0","apIp":"190.0.0.1","apVersion":"V200R001C00","memUseRate":"","regionLocation":"test","sn":"zyin0","apRunTime":"","apAlias":"","status":8,"apPortBytes":"","apRegionName":"zyin","neDn":"NE=34603010","userFail":"","apType":"AP6010AGN-DN","acName":"AC-SPU-zhs-9","category":"1","clientNum":"","cpuUseRate":"","ssidList":["ssid","ssid_5G"]}]
}

Query the User List Information

Function

This interface is used to query the basic user information and key counter list.

URI

/rest/openapi/network/wlan/stalist

Access Method

GET

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

orderby

Optional

URL

String

Indicates the field to sort the query results.

desc

Optional

URL

boolean

Specifies whether query results are sorted in a descending order. The default value is false.

pageSize

Optional

URL

int

Indicates the number of records on each page. The default value is 20 and the maximum value is 100.

start

Optional

URL

int

Indicates the start position to return query results. The default value is 0.

condition

Optional

URL

Map

Indicates the query condition. The condition must be in the following format:

condition:

{"condition ID1":"condition expression",

{"condition ID2":"condition expression",

"logic":"condition ID1|(condition ID2&condition ID3)"

Note: "&" indicates "and", and "|" indicates "or".

A condition includes the following fields:

1. Fields in the user list

For example:

condition:

{

"nodeDn":"=NE=1111|=NE=2222|=NE=3333",

"username":"=[htc]",

"logic":"nodeDn&username"

}

For details, see Condition Field Specifications.

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

Indicates the total number of items in the query results that are returned.

data

List

Indicates the queried basic user information list.

The following table lists the fields contained in the data object.

Field

Value Type

Description

userName

String

Indicates the user name.

mac

String

Indicates the MAC address.

neDn

String

Indicates the unique identifier of the connected AC.

acName

String

Indicates the name of the connected AC.

nodeDn

String

Indicates the unique identifier of the connected AP.

apId

String

Indicates the index of the connected AP.

apName

String

Indicates the name of the connected AP.

userIp

String

Indicates the user's IP address.

userIpv6Address

String

Indicates the user's IPv6 address.

status

int

Indicates the user's status.

accessIf

String

Indicates the access interface.

vlanId

int

Indicates the access VLAN.

starttime

String

Indicates the time when the user goes online.

ssid

String

Indicates the associated SSID.

accessOnlineTime

String

Indicates the online duration, in seconds.

authType

int

Indicates the authentication type.

authenMethod

String

Indicates the AAA authentication method.

linkAuthType

int

Indicates the link authentication type.

radioId

int

Indicates the radio ID.

radioFrequency

String

Indicates the working frequency band.

rfMode

String

Indicates the connection mode.

bandWidth

int

Indicates the channel bandwidth.

snr

String

Indicates the signal-to-noise ratio.

rxPower

String

Indicates the signal quality.

txRate

String

Indicates the sent rate, in kbit/s.

rxRate

String

Indicates the receive rate, in kbit/s.

txBytes

String

Indicates the sent traffic, in KB.

rxBytes

String

Indicates the received traffic, in KB.

losePackage

String

Indicates the packet loss rate.

retranserPackage

String

Indicates the packet retransmission rate.

regionId

String

Indicates the region ID.

regionName

String

Indicates the region name, in City>Building>Floor format, such as Nanjing>N3>3F.

Precautions

None.

Request Example

curl -X get -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/stalist'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 761

{"code":0,"totalSize":1,"description":"Operate Successfully.","data":[{"userName":"2400ba40c4dd","mac":"24-00-BA-40-C4-DD","neDn":"NE=34603149","acName":"AC6605-NJ-R&D-Center","nodeDn":"NE=34603149_D4-B1-10-AB-FB-40","apId":"D4-B1-10-AB-FB-40","apName":"d4b1-10ab-fb40","userIp":"0.0.0.0","userIpv6Address":null,"status":1,"accessIf":"Wlan-Dbss12","vlanId":950,"starttime":"2018-01-2614:20:01","ssid":"24095001","accessOnlineTime":"6536","authType":0,"authenMethod":null,"linkAuthType":6,"radioId":0,"radioFrequency":"2.4G","rfMode":"802.11n","bandWidth":3,"snr":"1000","rxPower":"-8500","txRate":"0.00","rxRate":"0.00","txBytes":"1.72","rxBytes":"0.15","losePackage":"0.00","retranserPackage":"0.00","regionId":"NEGROUP=11111111","regionName":"nanjin>N3>3F"}]}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class QueryStaList
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/stalist";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "GET";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters 
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("pageSize", "1"),
                new BasicNameValuePair("start", "1"),
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{"code":0,"totalSize":1,"description":"Operate Successfully.","data":[{"userName":"2400ba40c4dd","mac":"24-00-BA-40-C4-DD","neDn":"NE=34603149","acName":"AC6605-NJ-R&D-Center","nodeDn":"NE=34603149_D4-B1-10-AB-FB-40","apId":"D4-B1-10-AB-FB-40","apName":"d4b1-10ab-fb40","userIp":"0.0.0.0","userIpv6Address":null,"status":1,"accessIf":"Wlan-Dbss12","vlanId":950,"starttime":"2018-01-26 14:20:01","ssid":"24095001","accessOnlineTime":"6536","authType":0,"authenMethod":null,"linkAuthType":6,"radioId":0,"radioFrequency":"2.4G","rfMode":"802.11n","bandWidth":3,"snr":"1000","rxPower":"-8500","txRate":"0.00","rxRate":"0.00","txBytes":"1.72","rxBytes":"0.15","losePackage":"0.00","retranserPackage":"0.00","regionId":"NEGROUP=11111111","regionName":"nanjin>N3>3F"}]}

Query the Radio List Information

Function

This interface is used to query the basic radio information and key counter list.

URI

/rest/openapi/network/wlan/radiolist

Access Method

GET

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

orderby

Optional

URL

String

Indicates the field to sort the query results.

desc

Optional

URL

boolean

Specifies whether query results are sorted in a descending order. The default value is false.

pageSize

Optional

URL

int

Indicates the number of records on each page. The default value is 20 and the maximum value is 100.

start

Optional

URL

int

Indicates the start position to return query results. The default value is 0.

condition

Optional

URL

Map

Indicates the query condition. The condition must be in the following format:

condition:

{"condition ID1":"condition expression",

{"condition ID2":"condition expression",

"logic":"condition ID1|(condition ID2&condition ID3)"

Note: "&" indicates "and", and "|" indicates "or".

A condition includes the following fields:

1. Fields in the radio list

For example:

condition:

{

"neDn":"=NE=1111|=NE=2222|=NE=3333",

"apId":"=1",

"logic":"neDn&apId"

}

For details, see Condition Field Specifications.

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

Indicates the total number of items in the query results that are returned.

data

List

Indicates the queried radio information list.

The following table lists the fields contained in the data object.

Field

Value Type

Description

radioId

String

Indicates the radio ID.

radioFrequency

String

Indicates the working frequency band.

neDn

String

Indicates the unique identifier of the connected AC.

apId

String

Indicates the index of the connected AP.

nodeDn

String

Indicates the unique identifier of the connected AP.

mac

String

Indicates the MAC address.

runPower

int

Indicates the transmit power, in dBm.

channelBandwidth

String

Indicates the frequency bandwidth, in MHz.

workChannel

int

Indicates the working channel.

radioStaNumber

String

Indicates the number of terminals connected to an AP radio.

radioChannelRate

String

Indicates the channel usage.

radioNoise

String

Indicates the interference noise strength.

radioReceiveRate

String

Indicates the receive rate of a radio, in kbit/s.

radioSendRate

String

Indicates the transmit rate of a radio, in kbit/s.

Precautions

None.

Request Example

curl -X get -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/radiolist'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 412

{"code":0,"totalSize":211,"description":"Operate Successfully.","data":[{"channelValue":147,"availableAntennaNumber":1,"radioNoise":"","runPower":1700,"radioStaNumber":"","mac":"C1-CA-01-01-01-16","nodeDn":"NE=34603033","neDn":"NE=34603010","apId":"15","radioFrequency":"","radioChannelRate":"","radioProfileName":"zyin1","powerLevel":"1","radioId":1,"radioReceiveRate":"","workChannel":149,"radioSendRate":""}]}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class QueryRadioList
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/radiolist";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "GET";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("pageSize", "1"),
                new BasicNameValuePair("start", "1"),
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":211,
"description":"Operate Successfully.",
"data":[{"channelValue":147,"availableAntennaNumber":1,"radioNoise":"","runPower":1700,"radioStaNumber":"","mac":"C1-CA-01-01-01-16","nodeDn":"NE=34603033","neDn":"NE=34603010","apId":"15","radioFrequency":"","radioChannelRate":"","radioProfileName":"zyin1","powerLevel":"1","radioId":1,"radioReceiveRate":"","workChannel":149,"radioSendRate":""}]
}

Querying the Historical User Access List

Function

This interface is used to query the user log information list within a specified period.

URI

/rest/openapi/network/wlan/staloglist

Access Method

GET

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates the session ID, which is used for open API authentication.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

orderby

Optional

URL

String

Indicates the field to sort the query results.

desc

Optional

URL

boolean

Specifies whether query results are sorted in a descending order. The default value is false.

pageSize

Optional

URL

int

Indicates the number of records on each page. The default value is 20 and the maximum value is 100.

start

Optional

URL

int

Indicates the start position to return query results. The default value is 0.

condition

Optional

URL

Map

Indicates the query condition. The condition must be in the following format:

condition:

{"condition ID1":"condition expression",

"condition ID2": "condition expression",

"logic": "condition ID1|(condition ID2&condition ID3)"

Note: "&" indicates "and", and "|" indicates "or".

A condition includes the following fields:

1. Fields in the historical user access list

2. starttime: indicates the query start time. The value is a number of milliseconds elapsed since 00:00:00 of January 1, 1970.

2. endtime: indicates the query end time. The value is a number of milliseconds elapsed since 00:00:00 of January 1, 1970.

For example:

condition:

{

"starttime":"1439308800000",

"endtime":"1439395200000",

"neDn":"=NE=1111|=NE=2222|=NE=3333",

"apId":"=1",

"logic":"neDn&apId"

}

For details, see Condition Field Specifications.

NOTICE:

If a condition does not specify the start time and end time, the system queries users in half an hour by default.

Result

Field

Value Type

Description

code

int

Indicates the operation return code. The options are as follows:

  • 0: successful
  • Others: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

Indicates the total number of user logs in the query results that are returned.

data

List

Indicates the queried user log list.

The following table lists the fields contained in the data object.

Field

Value Type

Description

neDn

String

Indicates the unique identifier of the connected AC.

nodeDn

String

Indicates the unique identifier of the connected AP.

apId

String

Indicates the index of the connected AP.

acName

String

Indicates the name of the connected AC.

apName

String

Indicates the name of the connected AP.

userName

String

Indicates the user name.

mac

String

Indicates the MAC address.

occurrenceTime

long

Indicates the event occurrence time.

ssid

String

Indicates the associated SSID.

radioId

String

Indicates the radio ID.

staOnlineTime

String

Indicates the online duration, in seconds.

staTraffic

String

Indicates the total traffic volume, in KB.

staTrafficUp

String

Indicates the sent traffic, in KB.

staTrafficDown

String

Indicates the received traffic, in KB.

type

String

Indicates the category.

  • [WLAN_STA_INFO_AP_ASSOCIATE]: User Association
  • [WLAN_STA_INFO_AUTHENTICATION]: User Authentication
  • [WLAN_STA_INFO_IP_CONNECTION]: IP Acquisition
  • [IWAP_CLIENT_INFO_OFFLINE_FLOW_INFO]: User Disassociation
  • [IWAP_CLIENT_INFO_ROAM_INFO]: User Roam
  • [WLAN_STA_INFO_OFFLINE]: User Offline
  • [WLAN_STA_INFO]: Other

regionId

String

Indicates the region ID.

regionName

String

Indicates the region name, in City>Building>Floor format, such as Nanjing>N3>3F.

Precautions

None.

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class QueryStaLogList
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/staloglist";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "GET";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("pageSize", "1"),
                new BasicNameValuePair("start", "1"),
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":1,
"description":"Operate Successfully.",
"data":[{"apName":"ap1","result":"1","timeStamp":1439438400000,"mac":"CA-00-01-01-01-01","nodeDn":"","neDn":"","apId":"","acName":"ac1","time":"2015-08-13_13:30:00","description":"","radioId":0,"userName":"htcOne","ssid":"wifi101",
"type":"[IWAP_CLIENT_INFO_ROAM_INFO]","regionId":"NEGROUP=11111111","regionName":"nanjin>N3>3F"}]
}

Query the AP Group Information

Function

This interface is used to query the AP group information.

URI

/rest/openapi/network/wlan/apgroup

Access Method

GET

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

orderby

Optional

URL

String

Indicates the field to sort the query results.

desc

Optional

URL

boolean

Specifies whether query results are sorted in a descending order. The default value is false.

pageSize

Optional

URL

int

Indicates the number of records on each page. The default value is 20 and the maximum value is 100.

start

Optional

URL

int

Indicates the start position to return query results. The default value is 0.

condition

Optional

URL

Map

Indicates the query condition. The condition must be in the following format:

condition:

{"condition ID1":"condition expression",

{"condition ID2":"condition expression",

"logic":"condition ID1|(condition ID2&condition ID3)"

Note: "&" indicates "and", and "|" indicates "or".

A condition includes the following fields:

  1. Fields in the AP group list

For example:

Condition:

{

"neDn": "=NE=1111|=NE=2222|=NE=3333",

"name": "=group1",

"logic": "neDn&name"

}

For details, see Condition Field Specifications.

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

Indicate the total number of AP groups.

data

List

Indicates the queried AP group list.

The following table lists the fields contained in the data object.

Field

Value Type

Description

neDn

String

Indicates the unique identifier of the connected AC.

id

String

Indicate the AP ID.

name

String

Indicates the AP group name.

description

String

Indicates AP group description.

Precautions

None.

Request Example

curl -X get -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/apgroup'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 178

{"code":0,"totalSize":1,"description":"Operate Successfully.","data":[{"id":"Group-e71a91d8-d4ef-4f07-b540-d86eab4e06fb","nedn":"NE=34603009","description":"","name":"default"}]}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class QueryApGroup
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/apgroup";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "GET";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("pageSize", "1"),
                new BasicNameValuePair("start", "1"),
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":1,
"description":"Operate Successfully.",
"data":[{"id":"Group-e71a91d8-d4ef-4f07-b540-d86eab4e06fb","nedn":"NE=34603009","description":"","name":"default"}]
}

Create AP Groups

Function

This interface is used to create AP groups for a specified AC.

URI

/rest/openapi/network/wlan/apgroupmgr

Access Method

PUT

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

param

Mandatory

URL

String

Indicates the parameters, in the JSON format. Example:

{"nedn":"NE=XXX","name":"group1"}

The following table lists the fields contained in the param object.

Field

Value Type

Description

nedn

String

Indicates the unique identifier of the AC.

name

String

Indicates the AP group name.

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

The field is displayed as 0.

data

List

The field is displayed as null.

Precautions

None.

Request Example

curl -X put -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/apgroupmgr?param={"nedn":"NE=XXX","name":"group1"}'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 74

{"code":0,"totalSize":0,"description":"Operate Successfully.","data":null}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class CreateApGroup
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/apgroupmgr";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "PUT";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("param", "{\"nedn\":\"NE=XXX\",\"name\":\"group1\"}")
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":0,
"description":"Operate Successfully.",
"data":null
}

Delete AP Groups

Function

This interface is used to delete AP groups for a specified AC.

URI

/rest/openapi/network/wlan/apgroupmgr

Access Method

DELETE

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

param

Mandatory

URL

String

Indicates the parameters, in the JSON format. Example:

{"nedn":"NE=XXX","name":"group1"}

The following table lists the fields contained in the param object.

Field

Value Type

Description

nedn

String

Indicates the unique identifier of the AC.

name

String

Indicates the AP name.

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

The field is displayed as 0.

data

List

The field is displayed as null.

Precautions

None.

Request Example

curl -X delete -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/apgroupmgr?param={"nedn":"NE=XXX","name":"group1"}'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 74

{"code":0,"totalSize":0,"description":"Operate Successfully.","data":null}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class DeleteApGroup
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/apgroupmgr";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "DELETE";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("param", "{\"nedn\":\"NE=XXX\",\"name\":\"group1\"}")
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":0,
"description":"Operate Successfully.",
"data":null
}

Add APs to an AP Group

Function

  1. This interface is used to add an AP to an AP group.
  2. This interface is used to add APs to an AP group in a batch.

URI

/rest/openapi/network/wlan/apgroupbindmgr

Access Method

PUT

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

param

Mandatory

URL

String

Indicates the parameters, in the JSON format. Example:

{"apidlist":"[\"D4-B1-10-AB-D2-A0\",\"00-E0-4C-3C-BE-EB\"]","nedn":"NE=XXX","name":"group1"}

The following table lists the fields contained in the param object.

Field

Value Type

Description

nedn

String

(Mandatory) Indicates the unique identifier of the AC.

name

String

Indicates the AP group name (mandatory).

apidlist

String[]

Indicates the AP ID list, containing the IDs or MAC addresses of APs to be added.

(At least one of the following lists must be contained: AP ID list, AP IP address list, and AP SN list.)

In V200R006 and later versions, the MAC address of an AP is the same as the AP ID. The value is in JSON format, for example, "[\"D4-B1-10-AB-D2-A0\",\"00-E0-4C-3C-BE-EB\"]".

apiplist

String[]

Indicates the AP IP address list. (At least one of the following lists must be contained: AP ID list, AP IP address list, and AP SN list.)

The value is in JSON format for example, "[\"192.168.0.1\",\"192.168.0.2\"]".

apsnlist

String[]

Indicates the AP SN list. (At least one of the following lists must be contained: AP ID list, AP IP address list, and AP SN list.)

The value is in JSON format, for example, "[\"sn1\",\"sn2\"]".

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

The field is displayed as 0.

data

List

The field is displayed as null.

Precautions

None.

Request Example

curl -X put -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/apgroupbindmgr?param={"apidlist":["D4-B1-10-AB-D2-A0","00-E0-4C-3C-BE-EB"],"nedn":"NE=XXX","name":"group1"}'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 74

{"code":0,"totalSize":0,"description":"Operate Successfully.","data":null}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class BindApGroup
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/apgroupbindmgr";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "PUT";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("param", "{\"nedn\":\"NE=XXX\",\"name\":\"group1\",\"apidlist\":[\"00-E0-4C-3C-BE-EB\"]}")
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":0,
"description":"Operate Successfully.",
"data":null
}

Remove APs from an AP Group

Function

  1. This interface is used to remove an AP from an AP group.
  2. This interface is used to remove APs from an AP group in a batch.

URI

/rest/openapi/network/wlan/apgroupbindmgr

Access Method

DELETE

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

param

Mandatory

URL

String

Indicates the parameters, in the JSON format. Example:

{"apidlist":"[\"D4-B1-10-AB-D2-A0\",\"00-E0-4C-3C-BE-EB\"]","nedn":"NE=XXX","name":"group1"}

The following table lists the fields contained in the param object.

Field

Value Type

Description

nedn

String

(Mandatory) Indicates the unique identifier of the AC.

name

String

(Mandatory) Indicates the AP group name.

apidlist

String[]

Indicates the AP ID list, containing the IDs or MAC addresses of APs to be removed.

(At least one of the following lists must be contained: AP ID list, AP IP address list, and AP SN list.)

In V200R006 and later versions, the MAC address of an AP is the same as the AP ID. The value is in JSON format, for example, "[\"D4-B1-10-AB-D2-A0\",\"00-E0-4C-3C-BE-EB\"]".

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

The field is displayed as 0.

data

List

The field is displayed as null.

Precautions

None.

Request Example

curl -X delete -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/apgroupbindmgr?param={"apidlist":["D4-B1-10-AB-D2-A0","00-E0-4C-3C-BE-EB"],"nedn":"NE=XXX","name":"group1"}'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 74

{"code":0,"totalSize":0,"description":"Operate Successfully.","data":null}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class UnbidApGroup
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/apgroupbindmgr";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "DELETE";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("param", "{\"nedn\":\"NE=XXX\",\"name\":\"group1\",\"apidlist\":[\"00-E0-4C-3C-BE-EB\"]}")
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":0,
"description":"Operate Successfully.",
"data":null
}

Delete APs

Function

1. This interface is used to delete APs based on rights and domains.

2. This interface is used to delete an AP based on keywords, such as the AP ID, MAC address, IP address, or SN.

3. This interface is used to delete APs in a batch.

URI

/rest/openapi/network/wlan/aplist

Access Method

DELETE

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

keywords

Mandatory

URL

String

Specifies the keywords for deleting an AP, which can only be the AP's MAC address, ID, IP address, or SN. Multiple keywords are separated using a comma (,).

Example:

10.137.75.56, 10-1B-55-41-E7-5A

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

Indicates the number of deleted APs.

data

map

Indicates the AP deletion result.

The following table lists the fields contained in the data object.

Field

Value Type

Description

delSuccApList

String

Indicates the list of keywords of deleted APs.

delFailApList

String

Indicates the list of keywords of APs that fail to be deleted.

notManagedApList

String

Indicates the list of keywords of APs that cannot be deleted.

Precautions

None.

Request Example

curl -X delete -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/aplist?keywords=10.137.75.56,10-1B-55-41-E7-5A'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 151

{"code":0,"totalSize":1,"description":"Operate Successfully.","data":[{"delSuccApList:["10-1B-55-41-E7-5A"],"delFailApList":[],"notManagedApList":[]}]}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class DeleteApList
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/aplist";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "DELETE";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("keywords", "10-1B-55-41-E7-5A")
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":1,
"description":"Operate Successfully.",
"data":[{"delSuccApList:["10-1B-55-41-E7-5A"],"delFailApList":[],"notManagedApList":[]}]
}

Create an AP Whitelist

Function

This interface is used to create an AP whitelist. You can create whitelists for all APs under an AC in batches.

URI

/rest/openapi/network/wlan/apwhitelist

Access Method

PUT

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates the session identifier. It is used for open API authentication.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

param

Mandatory

URL

String

The parameter is in JSON format. The apMacList parameter indicates the MAC address of the AP under the AC. The value can contain a maximum of 4096 MAC addresses. Example:

{"nedn":"NE=XXX","apMacList":["20-00-00-00-00-00","10-00-00-00-00-00"]}

The following table lists the fields contained in the param object.

Field

Value Type

Description

nedn

String

Indicates the unique identifier of the AC.

apMacList

List

Indicates the list of AP MAC addresses.

Result

Field

Type

Description

code

int

Indicates the code of the returned result. The options are as follows:

  • 0: successful
  • Others: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

Indicates the total size. Here, the value is 0.

data

List

The field is displayed as null.

Precautions

None

Request Example

curl -X put -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/apwhitelist?param={"nedn":"NE=XXX","apMacList":["20-00-00-00-00-00","10-00-00-00-00-00"]}'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 74

{"code":0,"totalSize":0,"description":"Operate Successfully.","data":null}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class QueryApList
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/apwhitelist";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "PUT";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("param", "{\"nedn\":\"NE=XXX\",\"apMacList\":["20-00-00-00-00-00", "10-00-00-00-00-00"]}")
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":0,
"description":"Operate Successfully.",
"data":null
}

Delete an AP Whitelist

Function

This interface is used to delete an AP whitelist.

URI

/rest/openapi/network/wlan/apwhitelist

Access Method

DELETE

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Header

String

Indicates the session ID, which is used for open API authentication.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

param

Mandatory

URL

String

The parameter is in JSON format. The apMacList parameter indicates the MAC address of the AP under the AC. The value can contain a maximum of 4096 MAC addresses. Example:

{"nedn":"NE=XXX","apMacList":["20-00-00-00-00-00","10-00-00-00-00-00"]}

The following table lists the fields contained in the param object.

Field

Value Type

Description

nedn

String

Indicates the unique identifier of the AC.

apMacList

List

Indicates the list of AP MAC addresses.

Result

Field

Type

Description

code

int

Indicates the code of the returned result. The options are as follows:

  • 0: successful
  • Others: failed

description

String

Indicates the description of the interface invoking result.

totalSize

int

Indicates the total size. Here, the value is 0.

data

List

The field is displayed as null.

Precautions

None

Request Example

curl -X delete -k -H 'openid: 6c719e7633c0194237f5ae4aa5f45f4def2bf323c5d21fb4' -i 'https://10.120.66.130:32102/rest/openapi/network/wlan/apwhitelist?param={"nedn":"NE=XXX","apMacList":["20-00-00-00-00-00","10-00-00-00-00-00"]}'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 74

{"code":0,"totalSize":0,"description":"Operate Successfully.","data":null}

Example

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;

public class QueryApList
{
    private static final String EAM_TYPE = "/rest/openapi/network/wlan/apwhitelist";
    
    public static void main(String[] args) throws Exception
    { 
        Login.login();
        queryTest();
    }

    public static void queryTest()
        throws Exception
    {
        //set the URL and method 
        String openidURL = EAM_TYPE;
        String method = "DEL";

        //set headers
        BasicNameValuePair[] headers = NewRosSecurity.getRosHttpHeader(openidURL, method);
        //set parameters
        BasicNameValuePair[] parameters =
            { 
                new BasicNameValuePair("param", "{\"nedn\":\"NE=XXX\",\"apMacList\":["20-00-00-00-00-00", "10-00-00-00-00-00"]}")
            };
        //send the request
        HttpResponse response =
            NewHttpsAccess.access(GlobalVar.GLOBAL_IP, GlobalVar.GLOBAL_PORT, openidURL, method, headers, parameters);
        //get the result
        String body = NewHttpsAccess.getResult(response); System.out.println(body);
    }
}

The returned result is as follows:

{
"code":0,
"totalSize":0,
"description":"Operate Successfully.",
"data":null
}

Condition Field Specifications

Specifications

Keyword

Description

Example

=

Equal

name:=test

!=

Not equal

name:!=test

>

Greater than

index:>1

>=

Greater than or equal to

index:>=100

<

Less than

index:<100

<=

Less than or equal to

index:<=100

=[value]

Include

name:=[Router]

!=[value]

Not include

name:!=[Router]

=[value*]

Start with

name:=[Router*]

!=[value*]

Not start with

name:!=[Router]

=[*value]

End with

name:=[*Router]

!=[*value]

Not end with

name:!=[*Router]

|

or

type:=Router|=Switch

&

and

type:=Router&=[Switch]

Description

1. If a value contains "|" and "&", "|" and "& can be located between two conditions, but cannot be located in one condition.

For example, name: =[jack]|=[James]. name is the key value in the map, and =[jack]|=[James] indicates the value mapped to name.

This condition means that the name contains jack or the name contains James.

If the map is written as name: =[jack|James], a parsing error occurs.

2. A condition must contain a logic. The fields in maps must be contained in the logic. The logic value uses "|" and "&" to show the logic relationship. Otherwise, a parsing error occurs.

For example:

map.put(name, =[jack]|=[James]);

map.put(age,>12&<15);

map.put(hometown,=jiangsu);

map.put(logic,name|age&hometown)

This condition can be converted into the SQL statement as follows:

where (lower(name) like lower('%jack%') or lower(name) like lower('%James%')) or (age>12 and age <15) and (lower(hometown) = lower('jiangsu'))

Translation
Download
Updated: 2019-10-30

Document ID: EDOC1100044386

Views: 15222

Downloads: 83

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next