NoDecaf
2 Bronze

SRM multiple properties in a REST query?

Jump to solution

Hello,

I've had some success with querying values out of the ViPR SRM REST API. I've got a question I was hoping someone could explain me if it is possible.

E, g. I've figured out that I can get 'Capacity' and 'UsedCapacity' by running two different queries specifying what property I want,e.g.

https://srm.mydomain.local:58443/APG-REST/metrics/series/values?filter=name='UsedCapacity'&part='0002A'&properties=device,part,model,dgstype,poolname,ismapped,ismasked,alias,unit&period=86400&type=last&limit=-1


https://srm.mydomain.local:58443/APG-REST/metrics/series/values?filter=name='Capacity'&part='0002A'&properties=device,part,model,dgstype,poolname,ismapped,ismasked,alias,unit&period=86400&type=last&limit=-1

Is there a way I could combine them so I could see both capacity and used capacity in on query?

-John Fjeldberg

Labels (1)
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
isakats
3 Argentium

Re: SRM multiple properties in a REST query?

Jump to solution

Hi John,

It is doable, try the following: https://<Redacted>:58443/APG-REST/metrics/series/values?filter=name=%27Capacity%27%7Cname=%27UsedCap...

it returns both Capacity & UsedCapacity in my lab.

regards,

Isaka

13 Replies
isakats
3 Argentium

Re: SRM multiple properties in a REST query?

Jump to solution

Hi John,

It is doable, try the following: https://<Redacted>:58443/APG-REST/metrics/series/values?filter=name=%27Capacity%27%7Cname=%27UsedCap...

it returns both Capacity & UsedCapacity in my lab.

regards,

Isaka

NoDecaf
2 Bronze

Re: SRM multiple properties in a REST query?

Jump to solution

Thanks Isaka,

I thought I had tried that, but I must have missed something. I got it working now. Thanks for the quick response.

John

0 Kudos
Highlighted
NoDecaf
2 Bronze

Re: SRM multiple properties in a REST query?

Jump to solution

Isaka,

I just have one question, is it possible to use some form of parentheses? It does not mention it, but I find that OR counts higher than AND operations, e.g.:

filter=name=x&alias=z|name=y&alias=z gives me values x,y for z , however

filter=name=x|name=y&alias=z seems to give me all x in the system. It would be great if we could do :

filter=(name=x|name=y)&alias=z

Not big deal if we can't, just have to be aware of it. Probably should be mentioned in an example in the manual?

Thanks&Regards.

-John

0 Kudos
isakats
3 Argentium

Re: SRM multiple properties in a REST query?

Jump to solution

Hi John1978,

It is possible to do so.

curl -ku admin:changeme "https://<REDACTED>:58443/APG-REST/metrics/series/values?filter=%28name=%27Capacity%27%7Cname=%27UsedCapacity%27%29%26device=%27vnx5200T_S26%27&properties=device,part,name,unit&period=86400&type=last&limit=-1"|python -m json.tool

Returns UsedCapacity or Capacity for my vnx5200T_S26 array, you just have to encode the parenthesis. %28 to open the parenthesis and %29 to close it.

I'll ping the documentation team to see if we can add a few more examples.

regards,

Isaka

NoDecaf
2 Bronze

Re: SRM multiple properties in a REST query?

Jump to solution

Hi Isaka,

That worked great! Thanks for helping out with these questions, much appriciated!

-John Fjeldberg

0 Kudos
rickzhou
1 Copper

Re: SRM multiple properties in a REST query?

Jump to solution

hi John,

there is a need, in my environment, to use the REST API of SRM to get some capacity or performance data out.

but I have little experience on it. and I can not find more documentation.

May I contact you for more information for the API?

0 Kudos
isakats
3 Argentium

Re: SRM multiple properties in a REST query?

Jump to solution

Hi rickzhou,

Have you seen the VIPR SRM 4.X REST API; it gives a good overview of the API and database structure.

regards,

Isaka

0 Kudos
rickzhou
1 Copper

Re: SRM multiple properties in a REST query?

Jump to solution

dear Isaka,

yes, but it is very general for me. I used the SRM, but has no experience on its config. I try to get more info about the pattern for SRM. May I set up a connection with you to get some helps?

0 Kudos
rickzhou
1 Copper

Re: SRM multiple properties in a REST query?

Jump to solution

Dear Isaka,

I am using the SRM now, but has little experience on the configuration. I just set up the REST API, but I don’t know how to use the Pattern in the documentation you mentioned.

I attach the screen show, I just wonder how make it give the data out?

Thank you very much.

<http://www.virtustream.com/>

Rick Zhou

Service Delivery Advisor, Infrastructure Managed Services / Virtustream

BMW Brilliance Automotive Account

Mobile +86 186 2402 2055

hao.zhou@virtustream.com<mailto:hao.zhou@virtustream.com>

Virtustream, A Dell Technologies Business

0 Kudos