Forum Discussion
asmapiquestions
Aug 22, 2023Nimbostratus
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:
items:[]
itemsPerPage:500
kind:tm:asm:events:requests:requestcollectionstate
pageIndex:1
selfLink:https://localhost/mgmt/tm/asm/events/requests?$top=500&ver=14.1.5&$filter=id%20eq%208704491664851628377
startIndex:1
totalItems:0
totalPages:0
How can we get this to work correctly?