Monitoring, Management & Location Tracking

Use AirWave XML API with cURL and new X-BISCOTTI header

Aruba Employee
Aruba Employee

Summary : This article explains how to query the AirWave XML API using cURL and the new X-BISCOTTI header requirement.


Introduction : Starting in AirWave 8.0.X the AirWave XML API now requires specifying an X-BISCOTTI header when making API requests. This article will show an example query of the AirWave XML API using cURL and this new header requirement.


Environment : AirWave 8.0.X versions XML API


Answer :


First we need to do an initial login to create an authentication cookie and get the X-BISCOTTI value.

[root@localhost mercury]# curl -k -D /tmp/hjar -c /tmp/cjar -d "credential_0=admin" -d "credential_1=admin" -d "destination=/" -d "login=Log In"

<title>302 Found</title>
<p>The document has moved <a href="/">here</a>.</p>
<address>Apache Server at localhost.localdomain Port 80</address>

Next we can verify the contents of /tmp/cjar contains an authentication cookie and that /tmp/hjar contains the header response including the X-BISCOTTI value.

[root@localhost mercury]# cat /tmp/cjar
# Netscape HTTP Cookie File
# This file was generated by libcurl! Edit at your own risk.    FALSE    /    TRUE    1415035555    Mercury::Handler::AuthCookieHandler_AMPAuth    9372d76ffaca0879cec19d84225eab0d

[root@localhost mercury]# cat /tmp/hjar

HTTP/1.1 302 Found
Date: Mon, 06 Oct 2014 16:26:19 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000; includeSubDomains
Set-Cookie: Mercury::Handler::AuthCookieHandler_AMPAuth=6153f42e8c05a1f9b3cc5e83660cd0aa; expires=Mon, 03 Nov 2014 17:26:19 GMT; path=/; secure
Pragma: no-cache
Location: /
Content-Length: 256
Content-Type: text/html; charset=iso-8859-1
Expires: Mon, 06 Oct 2014 16:26:19 GMT

We may now query the AirWave XML API using the following cURL command which includes the X-BISCOTTI value from the /tmp/hjar output above:

[root@localhost mercury]# curl -k --header "X-BISCOTTI: /UfiqpiCRcDRGRyl32SWDsw" -b /tmp/cjar
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<amp:amp_ap_list version="1" xmlns:amp="" xmlns:xsi="" xsi:schemaLocation=" amp_ap_list.xsd">
  <ap id="9">
    <group id="1">Access Points</group>
...output truncated...

This completes an AirWave XML API query with cURL using the new X-BISCOTTI header value.


Troubleshooting :


Confirm the values in /tmp/cjar and /tmp/hjar when making your initial login request. This will allow you to verify if you have successfully authenticated. Check the cURL manual for further information on options specified and additional options by running the "man curl" command.

Version history
Revision #:
1 of 1
Last update:
‎11-09-2014 10:48 AM
Updated by:
Labels (1)
Search Airheads
Showing results for 
Search instead for 
Did you mean: