Hitachi Ops Center​

 View Only

 powershell for rest api's

  • Hitachi Ops Center
  • Hitachi Ops Center
Nick britton's profile image
Nick britton posted 03-05-2018 16:05

is anyone using powershell to make your rest api calls with?  If so have you found that to be a good platform to use or would you recommend another language to use for automations.  

We are looking to start using the api's to do full allocation deployments, from registering the host to allocations.


#HitachiOpsCenter
Craig Chan's profile image
Craig Chan

Nick,

I haven't seen anyone use PowerShell with our REST APIs yet.  We have Python scripts for our REST APIs and maybe those can help with your development in PowerShell.

Data Conversion's profile image
Data Conversion

Nick,

I think it depends on your companies preference of programming language. REST API is nice because it's not limited to the language you use. I have seen a lot of Python implementations of REST. But that doesn't mean you can't do it in Powershell or CURL or Java or...

One nice thing about Python is a REST script can work on Windows, Mac, Linux etc...

Hope that helps!

Mike

Jaijeet Kakkar's profile image
Jaijeet Kakkar

Nick,

I agree with Michael's statement above. If you are not required to use powershell, your best bet is to use Python or any other language of choice were you can make REST calls.

Since you are using windows, try installing anaconda IDE, and use the spyder editor tool to write your code in Python. Works great, you don't need to worry about installing all the libraries and python modules you need for windows. It is a simple installer and gets you off the ground running with python on any windows or Mac host (Mac has python built in).

Regards,

Jai

Dale Sides's profile image
Dale Sides

I know this is an old post but I have used a lot of powershell with Protector APIs. Once you get the login methods the restapi calls are really better than what Python does.  The interaction with them is great.  I have used it with both the old 5.1 PSH and the latest powershell 7.x. I also have a customer who is using powershell on Linux against Analyzer and Protector.  It is just easier to use than Python.