Create a New WLAN and Assign it to a Profile

To create a new WLAN named New-Event and assign it to an access point profile:

  1. Log in to the REST API server using valid management user credentials.
    Note

    Note

    You must forward the auth_token as a cookie with each API call.
  2. Use the PUT method to access the /cfg/wlan/ URI and create a new WLAN configuration.
    Note

    Note

    The WiNG API, in its current form does not differentiate between PUT and POST methods. The API behaves the same way for both requests.

    Sample Request

    curl -X PUT --cookie auth_token=$cookie https://10.190.50.43/rest/v1/cfg/wlan 
    -d '{
          "ssid" : "New-Event", 
          "name" : "New-Event", 
          "encryption_type" : "ccmp", 
          "wpa_wpa2_psk" : "accessneweventkey",
          "client_client_communication" : false,
          "vlans" : [
              {
                "limit" : 0,
                "vlan" :23
              }]
    }
    Click to expand in new window

    Request Body Parameters

    Parameter Description Required/Optional Data Type
    ssid Service Set Identifier for this WLAN Optional. Default value is the name of the WLAN truncated to 32 characters. String (1 to 32 characters)
    name Name of this WLAN Required String (1 to 32 characters)
    encryption_type Encryption to use on this WLAN Optional. Default value is none. Enumeration[none,wep64, wep128-keyguard, keyguard, tkip-ccmp, ccmp]
    wpa_wpa2_psk Pre-shared key Optional String (8 to 63 characters)
    client_client_communication A flag to allow switching of frames from one wireless client to another on this WLAN Optional. Default value is true Boolean
    vlans The VLAN where traffic from this WLAN is mapped. Optional Integer (1 to 4094) of String (1 to 32 characters)

    Sample Response (200 OK)

    {    
    "return_code": 0
    }
  3. Use the PUT method to access the /cfg/profile/ URI and assign the new WLAN to the 'Conference-Room' access point profile with the 2.4 GHz radio interface.

    Sample Request

    curl -X PUT --cookie auth_token=$cookie https://10.190.50.43/rest/v1/cfg/profile/
    Conference-Room/interface/radio1/wlanbssmap 
    -d '{
          "wlan" : "New-Event", 
          "bss" : 2, 
          "primary" : true
    }
    Click to expand in new window

    Request Body Parameters

    Parameter Description Required/Optional Data Type
    wlan The name of the WLAN Required String (1 to 32 characters)
    bss BSS number on the radio where this WLAN is to be mapped. Optional Integer (1 to 16)
    primary A flag to indicate if this WLAN is primary if there are multiple WLANs on this BSS. Optional Boolean

    Sample Response (200 OK)

    {    
    "return_code": 0
    }