IRest - ltm - get measures in an analytics report

Hi,

I’m trying to get specific measures via iREST.  This is something that can be done easily via tmsh but i need iRest now.

This URL works: https://…hostname…/mgmt/tm/analytics/http/report?options=view-by,virtual - it gives me a single value for each virtual name “transactions”.

This URL also works: https://…hostname…/mgmt/tm/analytics/http/report?options=view-by,virtual,limit,1 - it gives me a single value for the first virtual name “transactions”.

In the documentation (https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_analytics_http_report.html) you can see that there is also property measures. I can also use this in my URL and it is recognised. I know this because the error is different when typing measures1 for instance.

I assume I just need to append it to the end of the URL like this: https://…hostname…/mgmt/tm/analytics/http/report?options=view-by,virtual,limit,1,measures,VALUE

Now the problem: I tried everything for VALUE and I always get an error of this kind:

{“code”:400,“message”:“\“average-tps\” unexpected argument”,“errorStack”:[],“apiError”:26214401}

I tried adding {}, all kinds of csv etc.

If anyone knows how to supply measures to this specific URL, that would be great :slightly_smiling_face:

Thanks

Vincent

I fixed my own problem. The value for “measures” needs to be in curly brackets. However, you can’t just use:

https://…hostname…/mgmt/tm/analytics/http/report?options=view-by,virtual,limit,1,measures,{a,b}

Curly brackets are URL unsafe, and my clients didn’t escape them by default. Maybe because they were in the query part? When I did the escaping myself, it worked.

Note:

{ == %7B

} == %7D

A working example:

https://…hostname…/mgmt/tm/analytics/http/report?options=view-by,virtual,limit,1,measures,%7Baverage-tps%7D

Best regards

Vincent