Example of accessing AMP APIs using Zend

Aruba Employee
Aruba Employee

This example uses the Zend Framework (framework.zend.com) to get data from ap_list.xml:


$baseUrl = "https://myampserver.domain.com";
$username = "myuser";
$password = "mypassword";

$client = new Zend_Http_Client();
// we are simply authenticating
$response = $client->request('POST');

// Then we can go on and use other uri's for example getting an AP with
id of '123' in xml
// Just comment out the $arguments line if you want to grab all of them
$arguments = array('id' => 123);


foreach($arguments as $arg => $value)
$client->setParameterGet($arg, $value);

$response = $client->request('GET');
$xml = new SimpleXMLElement($response->getBody());

Version history
Revision #:
1 of 1
Last update:
‎06-27-2014 12:07 PM
Updated by:
Labels (1)
Search Airheads
Showing results for 
Search instead for 
Did you mean: