Wireless Access

last person joined: 11 hours ago 

Access network design for branch, remote, outdoor, and campus locations with HPE Aruba Networking access points and mobility controllers.
Expand all | Collapse all

XML API Requests Redirecting

This thread has been viewed 0 times
  • 1.  XML API Requests Redirecting

    Posted Feb 11, 2016 11:23 PM

    Having some problems with the XML API.

    Running ArubaOS 6.3.1.13

     

    The external server is able to successfully reach the controller, but when requesting auth/command.xml it's returned a HTTP 302 code with no redirect location.

     

    Is there something I'm missing?

     

    Thanks



  • 2.  RE: XML API Requests Redirecting

    EMPLOYEE
    Posted Feb 12, 2016 07:13 AM

    Did this ever work?

    What command is being sent and what is the format?

     

     



  • 3.  RE: XML API Requests Redirecting

    Posted Feb 14, 2016 04:29 PM

    No, brand new setup.

    It returns a HTTP 302 even when just hitting it with a browser or any random HTTP GET which is making me think it's something related to the API itself.

     

    POST https://<server>/auth/command.xml HTTP/1.1
    Content-Type: text/xml; encoding='utf-8'
    Host: <server>
    Content-Length: 200
    Expect: 100-continue
    Connection: Keep-Alive

    <?xml version="1.0"?>
    <aruba command="user_add">
    <ipaddr>ip</ipaddr>
    <role>authenticated<role>
    <key>mysharedkey</key>
    <authentication>cleartext</authentication>
    <version>1.0</version>
    </aruba>



  • 4.  RE: XML API Requests Redirecting

    Posted Feb 18, 2016 08:08 PM

    Bump

     

    Any ideas?

    I've tried restarting controllers etc just incase there was something dumb going on at the controller. Everything I look at seems to point at something on the controller that's not quite working or configured as intended.

    As far as I can read, there is no further controller configuration required other than to add an XML API server. We do have the PEFNG licences as required which are being consumed by the APs.

    I can't really think of anything else.



  • 5.  RE: XML API Requests Redirecting
    Best Answer

    EMPLOYEE
    Posted Feb 18, 2016 08:58 PM

    Did you try to do a test with curl?

    #!/bin/sh
    /usr/bin/curl -vikd "xml=<aruba command="user_add">
                        <ipaddr>10.168.84.14</ipaddr>
                        <macaddr>00:0c:41:cf:b8:e3</macaddr>
                        <name>User_Name</name>
                        <role>Role_Name</role>
                        <password>test123</password>
                        <version>1.0</version>
                        <authentication>cleartext</authentication>
                        <key>key123</key></aruba>" -H "Content-Type: text/xml" https://10.168.83.10/auth/command.xml
     


  • 6.  RE: XML API Requests Redirecting

    Posted Feb 18, 2016 11:14 PM

    Thanks Colin. Really great pointer :)

     

    I merely wasn't including the xml= in the POST request. Something so simple yet broke me badly.