Hi everyone,
I’m currently working with the F5 iControl REST API to generate an analytics report from the Application Security Manager (ASM) module. According to the F5 documentation, the API endpoint for generating a report is:
/mgmt/tm/analytics/application-security/report
Reference
Issue Description
The API documentation states that the viewBy parameter is required. However, I encountered conflicting behaviors:
If I don’t provide viewBy, the API response states that it is required.
{“code”:400,“message”:“You must enter a view-by entity name”,“errorStack”:[],“apiError”:26214401}
If I provide viewBy (e.g., attack-type), the API returns a 400 Bad Request error with the message:{“code”:400,“message”:“Query parameter viewBy is invalid.”,“errorStack”:[],“apiError”:1}
I also tried both view-by/viewBy/viewby, but neither worked.
My Test Code
Here is the Python script I used to call the API:
# API Endpoint
API_ENDPOINT = “/mgmt/tm/analytics/application-security/report”
# Query Parameters
params = {
“view-by”: “attack-type”
}
Questions
- What are the valid values for the viewBy parameter?
- Has anyone successfully used this API endpoint? If so, could you share a working example?
Any help or insights would be greatly appreciated. Thanks in advance!