Making Your First API Call

This sample API call demonstrates how to access the Info APIs and retrieve WLAN information.

To make REST API calls:

  1. Download cURL for your environment.

    Tip

    If you use Windows, use a Bash shell to make cURL calls.
  2. Log in to the REST API server using administrator credentials.
    Note

    Note

    You must forward the session_id variable for authentication with each API call.
  3. Use the GET method to access the wlan_info endpoint and fetch the IDs and corresponding WLAN names.

    Sample Request

    curl -X GET --cookie auth_token=$cookie http://134.141.242.93/nsight-ui/api/v1/wlan_info

    Sample Response (200 OK)

    {    
      "data": [        
      {            
        "_id": 1039860226,            
        "name": "nav-wpa",            
        "ssid": "nav-wpa"        
      },        
      {            
        "_id": 1249164677,            
        "name": "nav-open",            
        "ssid": "nav-open"        
      },        
      {            
        "_id": 522874370,            
        "name": "nav-eap",            
        "ssid": "nav-eap"        
      },        
      {            
        "_id": 1544565661,            
        "name": "nav-5ghz",            
        "ssid": "nav-5ghz"        
       },        
      {            
        "_id": 753558181,            
        "name": "rfs-wpa",            
        "ssid": "rfs-wpa"        
      },        
      {            
        "_id": 2108519761,            
        "name": "4k-trend",            
        "ssid": "4k-trend"        
      },        
      {            
        "_id": 946589352,            
        "name": "rfs-1",            
        "ssid": "rfs-1"        
      }],    
    "success": true
    }
For other common NSight API use cases, see API Usage Examples.