Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

IRest - ltm - get measures in an analytics report

Vinne73
Cirrus
Cirrus

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 🙂

Thanks

Vincent

 

 

 

1 ACCEPTED SOLUTION

Vinne73
Cirrus
Cirrus

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,%7Bave...7D

Best regards

Vincent

View solution in original post

1 REPLY 1

Vinne73
Cirrus
Cirrus

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,%7Bave...7D

Best regards

Vincent