- Community Home
- >
- Storage
- >
- Midrange and Enterprise Storage
- >
- HPE 3PAR StoreServ Storage
- >
- OPManager - HP 3PAR API
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2022 01:47 AM - last edited on тАО06-23-2022 12:48 AM by support_s
тАО06-22-2022 01:47 AM - last edited on тАО06-23-2022 12:48 AM by support_s
We are setting up a Capacity Monitoring Tool called OPManager which is using an API template to integrate with the HP 3PAR. I have enabled wsapi from the command-line but the API URL is not accessible, it is returning an error as show
{"code":9,"desc":"unsupported operation for the resource"}
Kindly assist on how to resolve this
Solved! Go to Solution.
- Tags:
- 3PAR_Primera
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2022 10:48 PM - edited тАО06-22-2022 10:49 PM
тАО06-22-2022 10:48 PM - edited тАО06-22-2022 10:49 PM
SolutionHi,
What port are you using to connect to 3PAR API? From my experience I've seen that 3PAR API listens on port 8080 even when using a security certificate. On the other hand, Primera arrays listen on port 443.
You might want to start troubleshooting by connecting to 3PAR API using Powershell. See below some lines that can help you:
# 3PAR array information
$username = "your_username"
$password = "your_password"
$APIurl = "https://3PAR_AliasOrIP:8080/api/v1"
# Connect to 3PAR WSAPI
$postParams = @{user=$username; password=$password} | ConvertTo-Json
$headers = @{}
$headers["Accept"] = "application/json"
$credentialdata = Invoke-WebRequest -Uri "$APIurl/credentials" -Body $postParams -ContentType "application/json" -Headers $headers -Method POST -UseBasicParsing
$key = ($credentialdata.Content | ConvertFrom-Json).key
# Poll 3PAR System vvolsset
$headers = @{}
$headers["Accept"] = "application/*"
$headers["Accept-Language"] = "en"
$headers["X-HP3PAR-WSAPI-SessionKey"] = $key
$WSAPIdata = Invoke-WebRequest -Uri тАЬ$APIurl/volumesets/тАЭ -ContentType тАЬapplication/*тАЭ -Headers $headers -Method GET -UseBasicParsing
I assume further that WSAPI is enabled and in active state
3PARarray cli% showwsapi
-Service- -State- -HTTP_State- HTTP_Port -HTTPS_State- HTTPS_Port -Version- ----------------API_URL----------------
Enabled Active Disabled 8008 Enabled 8080 1.6.5 https://3PARarray:8080/api/v1
Restarting WSAPI service (stopwsapi & startwsapi) doesn't do any harm if not in use.
Cheers,
Dardan
Hit the Kudo's button to show appreciation or mark as solution if your question was answered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2022 01:02 AM - last edited on тАО06-23-2022 10:52 PM by Sunitha_Mod
тАО06-23-2022 01:02 AM - last edited on тАО06-23-2022 10:52 PM by Sunitha_Mod
Re: OPManager - HP 3PAR API
Thank you Dardan,
i was able to create a session using the below out put
#Credentials
>> $username = "username"
>> $password = "Password"
>>
>> #IP of the 3PAR device
>> $IP = "..........................."
>> #API URL
>> $APIurl = "https://devicename or IP:8080/api/v1"#avoid issues with an invalid (self-signed) certificate, try avoid tabs/spaces as this might mess up the string block
>> #http://stackoverflow.com/questions/11696944/powershell-v3-invoke-webrequest-https-error
>> add-type @"
>> using System.Net;
>> using System.Security.Cryptography.X509Certificates;
>> public class TrustAllCertsPolicy : ICertificatePolicy {
>> public bool CheckValidationResult(
>> ServicePoint srvPoint, X509Certificate certificate,
>> WebRequest request, int certificateProblem) {
>> return true;
>> }
>> }
>> "@
>> [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
>>
>>
>> $postParams = @{user=$username;password=$password} | ConvertTo-Json
>> $headers = @{}
>> $headers["Accept"] = "application/json"
>> $credentialdata = Invoke-WebRequest -Uri "$APIurl/credentials" -Body $postParams -ContentType "application/json" -Headers $headers -Method POST -UseBasicParsing
>> $key = ($credentialdata.Content | ConvertFrom-Json).key
However i was unable to connect it to OPmanager because the WSAPI is low version and the device is end of life.
Cheers
Cecilio.