StoreVirtual Storage
cancel
Showing results for 
Search instead for 
Did you mean: 

Storevirtual VSA V2 API Access

 
keiransteele
Occasional Advisor

Storevirtual VSA V2 API Access

I have this document detailing the V2 Storevirtual API: https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-a00004048en_us. It seems to show that I can use it on our Storevirtual VSAs but I can't get it to work. V1 API works no problem. All our 60+ appliances are on 12.7.00.0226.0. Patch 57007-00 is installed, it relates to "get" and "put" operations on the API.

Port 443 doesn't seem to be open on the appliance which is pretty much my main problem at the moment.

I'm would like to use this API version as it includes the ability to create management groups and the V1 API doesn't. Can anyone provide any insight?

9 REPLIES 9
VikasMandal
Advisor

Re: Storevirtual VSA V2 API Access

Dear @keiransteele

According to the document you listed, I see the following note:

The REST server listens on the standard HTTPS port 443. The server also listens on port 8081 for backwards
compatability. To specify the port in the URI, use the following format:
https://<storage node ip>:8081/lhos/v2/<resource-type-in-plural></id><?<query-string>

Please let me know if this works.

Regards,
Vikas

I work for HPE.

Accept or Kudo

keiransteele
Occasional Advisor

Re: Storevirtual VSA V2 API Access

Hi Vikas,

No that doesn't work either. I do a POST with the json data below with the listed results:

{
  "user":"username",
  "password":"password"
}

https://ip_address:8081/lhos/credentials => 201 created. This is the expected result.

https://ip_address:8081/lhos/v2/credentials => 401 Unauthorised. I would expect this to work too given the backwards compatibility but it doesn't.

https://ip_address/lhos/v2/credentials => No response. Port is closed to this is expected.

Thanks.

Keiran.

VikasMandal
Advisor

Re: Storevirtual VSA V2 API Access

Dear @keiransteele

Thank you for your response.

Yes, port 8081 ideally should work. 

Use the HTTP standard Authorization (or Auth) header (as recommended by CHRP) to pass along the session key when making REST API calls. Failure to use a valid session key will result in a failed API call with a 401 (Unauthorized) http status. Clients can use session tokens on the VIP, but if the VIP node goes down, then clients will need to have retry logic.

Did you send authentication credentials along with your request?

Regards,
Vikas

I work for HPE.

Accept or Kudo

keiransteele
Occasional Advisor

Re: Storevirtual VSA V2 API Access

Hi Vikas,

Yes, I'm using the credential request method as is shown in the linked document with the username and password in the body. This works in the V1 API and i'm using it in scripts already, it returns an authtoken as expected but the V2 api just returns unauthorised with the same credentials.

{
  "user":"username",
  "password":"password"
}

Thanks.

Keiran.

msimm29
Occasional Visitor

Re: Storevirtual VSA V2 API Access

Did you ever get this working?  We just updated to VSA 12.7 and I am also unable to hit the v2 API.

PS C:\WINDOWS\system32> Invoke-WebRequest -Uri https://ourvsa:8081/lhos/v2/credentials -Method Post -Body $body -ContentType 'application/JSON'

Invoke-WebRequest : The remote server returned an error: (401) Unauthorized.

 

But if you pull the v2 out of it, it works fine.

PS C:\WINDOWS\system32> Invoke-WebRequest -Uri https://ourvsa:8081/lhos/credentials -Method Post -Body $body -ContentType 'application/JSON'

 

StatusCode        : 201

StatusDescription : Created

keiransteele
Occasional Advisor

Re: Storevirtual VSA V2 API Access

No, I haven't got it working. My next step would be HP support probably but I haven't put more time into it as it's not critical.

I'm having the same problem as yourself. Did it work on the previous version? We're only running 12.7 and I only have that installer handy.

BenLoveday
Valued Contributor

Re: Storevirtual VSA V2 API Access

I'd also love to see this working with the v2 API. It appears to introduce a lot of performance monitoring now which means we can actually get some useful performance history out of them finally. The CMC is still way too limited and SNMP monitoring is rubbish.

keiransteele
Occasional Advisor

Re: Storevirtual VSA V2 API Access

HP Support confirmed for me that the V2 API only works on the newer physical appliances.

BenLoveday
Valued Contributor

Re: Storevirtual VSA V2 API Access

Well that sucks...why bother releasing a new API for only the physical product. To be fair the VSA probably has more useful life in it than the hardware product. Particularly when the CMC management tool and current monitoring features are crap. With a feature rich API a customer can write their own management/monitoring tools...

I might log a support job and ask about an ETA.