Forum Discussion

4 Replies

  • Hi,

    You can do it like this:


    Where id is support_id

    Hope this helps.

    • SvenF_288567's avatar
      Icon for Nimbostratus rankNimbostratus

      Hi, I tried this on 12.1.1 (Icontrol Rest) but then I get the top 500 results. So it's doesn't take the filter based on the supportID

      The only thing that works is


      Does someone knows how to use the the filter with the rest api, for example all blocked requests for policy X. Do you need to post a json that contains specific filter info, or just a GET with parameters?


  • Karim's avatar
    Icon for Cirrostratus rankCirrostratus



    do you guys have a suggestion on how we can, via API, get all the logged requests for a specific violation ?


    To to get a specific request (with support id) you can use :


    Many thanks,

  • This doesn't seem to work. 

    I generated a support ID and used the ASM GUI to search for it while capturing network traffic in Chrome developer tools. The GUI returns results correctly and from the dev tools I can see the GET request looks like this: https://<url>/mgmt/tm/asm/events/requests?$filter=id+eq+8704491664851628377&top=10&servertime=true. 

    When I try to recreate this request with the REST API, I have tried the following (where support_id=8704491664851628377):


    url_suffix = f'asm/events/requests/{support_id}' return self._http_request(method='GET', headers=self.headers, url_suffix=url_suffix, json_data={})


    Which results in a 404 error: "Could not get the Request Log, No matching record was found." However I know there is a matching record because of the dev tools request/response. 

    I also tried:


    url_suffix = f'asm/events/requests?$filter=id eq {support_id}' return self._http_request(method='GET', headers=self.headers, url_suffix=url_suffix, json_data={})


    Which returns some json but no results: 


    How can we get this to work correctly?