Developer

last person joined: 8 days ago 

Expand all | Collapse all

Airwave API - Ansible - timeout issue

This thread has been viewed 2 times
  • 1.  Airwave API - Ansible - timeout issue

    Posted Aug 09, 2019 10:08 AM

    I am developing Ansible playbooks and using the Airwave REST API 

     

    The client search URL takes a very long time to return results (few minutes) while client query etc takes a couple of seconds. I understand it causes a longer search. However, in the GUI the results come back quickly if I use the magnifying glass in the top right.

     

    For example, if I use the following in a browser it takes 3-4 minutes:

    buckrogers@york.ac.uk" target="_blank" rel="nofollow noopener noreferrer">https://airwave.abc.com/client_search.xml?query=buckrogers@york.ac.uk

     

    If I go to Airwave UI searching for the same thing takes about 10 seconds. The results listed are the same.

    __________________________________

    My question is if this is expected/the same for everyone?

    If using Ansible this query will always timeout and there is no way to prevent this.

     

    Is there a way to get a quicker result using this URL (e.g. limit information to just assocaited devices)?

     

     

     



  • 2.  RE: Airwave API - Ansible - timeout issue

    MVP GURU
    Posted Aug 12, 2019 06:22 AM

    Hi,

     

    May be the API query is not really optimized...

     

    it will be a good idea to open a issue on TAC



  • 3.  RE: Airwave API - Ansible - timeout issue

    EMPLOYEE
    Posted Aug 26, 2019 08:42 PM

    constantpinger,

     

    Q:My question is if this is expected/the same for everyone?

    A:The client search URL doesn't usually take long. It should return a result almost immediately even if you use the URL in the browser or in any script. 

    I tried using it in the Ansible script and it returns the result as expected.

     

    Q:Is there a way to get a quicker result using this URL (e.g. limit information to just assocaited devices)?

    A:This URL should return a quick response since we are only searching for a single client by providing their username/mac details in the query field.

     

     

     

    Also, if you haven't yet checked our Github repo, please visit:

    https://github.com/aruba/aruba-ansible-modules

     

    Here, we have sample scripts for most of our products including AirWave.



  • 4.  RE: Airwave API - Ansible - timeout issue

    Posted Aug 27, 2019 03:04 AM

    Hi nikunjshah

     

    Thank you for the reply. I think you might be confusing 

     

    search.xm  (Provides an interface to AirWave's client search functionality.  This API requires a query string and returns an XML version of the AirWave WebUI's search results.)
     
    and
     
    detail.xml  (Provides detailed information about wireless clients, including a history of associations.  This API requires one or more client MAC addresses.)
     
    The first is what I am using. It looks in all the database tables in Airwave and provides information on a search string. It is the same as when you click the magnifying glass in the top-right on the web UI. I agree the second API returns a single result quickly.
     
    My problem is that if I use the WebUI to search for a string it comes back after 5 seconds. If I use the URL it takes minutes.
     
    Therefore I either need to limit the scope of the search or find a way to optimise it.
     
    Thanks
    Ian.