Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

5617

October 31st, 2017 20:00

SRM multiple properties in a REST query?

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

24 Posts

November 1st, 2017 18:00

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

24 Posts

November 2nd, 2017 20:00

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

141 Posts

November 3rd, 2017 08:00

Hi John1978,

It is possible to do so.

curl -ku admin:changeme "https:// :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

24 Posts

November 7th, 2017 18:00

Hi Isaka ,

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

 

-John Fjeldberg

5 Posts

November 8th, 2017 19:00

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?

141 Posts

November 9th, 2017 06:00

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

5 Posts

November 9th, 2017 18:00

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?

5 Posts

November 9th, 2017 21:00

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.

Rick Zhou

Service Delivery Advisor, Infrastructure Managed Services / Virtustream

BMW Brilliance Automotive Account

Mobile +86 186 2402 2055

hao.zhou@virtustream.com

Virtustream, A Dell Technologies Business

141 Posts

November 10th, 2017 05:00

Hi rickzhou ,

 

Sure, i will definitively do what i can to help you out or point you in the right direction.

Unfortunately i dont see any screenshot's attached in this thread.

 

 

Regards,

Isaka

5 Posts

November 12th, 2017 21:00

hi Isaka,

May I send it to you by e-mail? send a email to me, and I will reply you.

thank you very much.

5 Posts

November 12th, 2017 21:00

hi Isaka,

it will be better if you can send the e-mail to my another address, Rock.Zhou@partner.bmw-brilliance.cn

thank you so much

141 Posts

November 13th, 2017 11:00

Hi rickzhou


I sent you an email.



regards,

Isaka

4 Posts

December 11th, 2019 10:00

How would I setup CIM query to SRM? Please help? I'm new to SRM.

No Events found!

Top