Forum Discussion
Joao_Luis
Nimbostratus
I'm using as reference the JSON returned by the API: GET https://Managment-IP/mgmt/tm/analytics/asm-violation/report/example
{
"kind": "tm:analytics:asm-violation:report:reportstats",
"selfLink": "https://localhost/mgmt/tm/analytics/asm-violation/report/example?ver=16.1.3.1",
"propertyDescriptions": {
"device": "Specifies a BIG-IP device to generate a report on.",
"deviceGroup": "",
"deviceList": "Specifies a custom list of BIG-IP devices to generate a report on.",
"displayedMeasure": "When more than one measure is selected, this field specifies the measure that is shown in the timeseries chart and the bar/pie chart.",
"drilldown": {
"entity": "Specifies the entity that is used as a filter.",
"values": "Specifies the values by which the entity will be filtered. Values that contain whitespace must be surrounded by single or double quotes."
},
"emailAddresses": "Specifies a list of email addresses which the report file is sent to.",
"file": "Specifies the exported file path to be saved. The specified file name should be simple (not a full path).",
"format": "Specifies the exported file format to be saved or sent.",
"limit": "Specifies the (maximum) number of rows in the output result set. The default limit is 10 rows, not including the \"Total\" row. The maximum limit is 1000 rows.",
"measures": "Specifies a list of measures that can be specified for the chosen entity type. Default setting is dependant on the selected \"view-by\" entity.",
"orderBy": {
"measure": "Specifies the measure by which the report results will be ordered.",
"sortType": "Specifies the type of sorting (ascending/descending) that should be used."
},
"range": "Specifies the time/date range of the analytics information that you want to display. The given results will reflect the time range chosen here. Default setting : last hour ( now--now-1h )",
"smtpConfigOverride": "Specifies the SMTP configuration to use when sending reports by email. This overrides the default SMTP settings.",
"viewBy": "The main entity by which the report will be viewed"
},
"device": "",
"deviceGroup": "",
"deviceList": "",
"displayedMeasure": "",
"drilldown": [],
"emailAddresses": [],
"file": "",
"format": "",
"limit": 0,
"measures": [],
"orderBy": [],
"range": "",
"smtpConfigOverride": "",
"viewBy": "",
"naturalKeyPropertyNames": []
}
Taking this JSON as reference I reduced it to this JSON below:
{
"kind": "tm:analytics:asm-violation:report:reportstats",
"selfLink": "https://localhost/mgmt/tm/analytics/asm-violation/report/example?ver=16.1.3.1",
"limit": 10,
"range": "now-1d",
"viewBy": "policy"
}
And the response that I receive is this:
{
"code": 403,
"message": "Operation is not allowed on component /analytics/asm-violation/report.",
"errorStack": [],
"apiError": 1
}
Nikoolayy1
Mar 31, 2023MVP
Did you manage to find the solution?
What about the article below as for a filter you can use not only the support id but also the request status etc. (what you see in the GUI basically).
K50284219: Exporting ASM Event Report in html using iControl Rest API
https://my.f5.com/manage/s/article/K50284219
Also in the link below I see only the urls that Joseph_Martin suggested to you https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_analytics.html