<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REST API response error in HPE Primera Storage</title>
    <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239415#M943</link>
    <description>hi @veeryarvi&lt;BR /&gt;&lt;BR /&gt;this is a great help. appreciate the assistance and thank you.</description>
    <pubDate>Sun, 30 Mar 2025 11:44:17 GMT</pubDate>
    <dc:creator>raysa321</dc:creator>
    <dc:date>2025-03-30T11:44:17Z</dc:date>
    <item>
      <title>REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239003#M932</link>
      <description>&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is anyone can see what is the problem when I trying to execute the curl command to get the CPG's on the Primera storage?&amp;nbsp; Got the key from successful POST method using my user and password as Header then when i try to use the key to get the CPG's info I got invalid session key.&amp;nbsp;&lt;/P&gt;&lt;P&gt;% showwsapi&lt;BR /&gt;-Service- -State- HTTPS_Port -Version- ----------API_URL----------&lt;BR /&gt;Enabled Active 443 1.10.0 &lt;A href="https://PRIMERA_IPADDRESS/api/v1" target="_blank" rel="noopener"&gt;https://PRIMERA_IPADDRESS/api/v1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;See curl command and error below:&lt;/P&gt;&lt;P&gt;curl -k -i -X GET -H "X-HP3PAR-WSAPI-SessionKey: 0-eb6507cde8a2fb82cc579ce1a5d55398-2a1ce167" \&lt;BR /&gt;&amp;gt; &lt;A href="https://PRIMERA_IPADDRESS/api/v1/cpgs" target="_blank" rel="noopener"&gt;https://PRIMERA_IPADDRESS/api/v1/cpgs&lt;/A&gt;&lt;BR /&gt;HTTP/2 403&lt;BR /&gt;cache-control: no-cache, no-store, private, max-age=-1, must-revalidate&lt;BR /&gt;content-language: en-US&lt;BR /&gt;content-security-policy: default-src 'self' &lt;A href="https://www.google-analytics.com/" target="_blank" rel="noopener"&gt;https://www.google-analytics.com/&lt;/A&gt; ; script-src 'unsafe-eval' 'self' &lt;A href="https://www.googletagmanager.com/gtag/js" target="_blank" rel="noopener"&gt;https://www.googletagmanager.com/gtag/js&lt;/A&gt; &lt;A href="https://www.google-analytics.com/analytics.js" target="_blank" rel="noopener"&gt;https://www.google-analytics.com/analytics.js&lt;/A&gt; 'sha256-v0Q8X6xSNmwWcfldSEWqW+3imFpJurfHYdywm3hw6+w=' ; style-src 'nonce-d29tZSBjb29sIHN0cmluZyB3aWxsIHBvcCB1cCAxMjM=' 'self' blob:; frame-src 'self'; object-src 'self'; media-src 'self' data: blob:; font-src 'self' data:; frame-ancestors 'self'&lt;BR /&gt;content-type: application/json&lt;BR /&gt;pragma: no-cache&lt;BR /&gt;server: hp3par-wsapi&lt;BR /&gt;strict-transport-security: max-age=31536000; includeSubDomains;&lt;BR /&gt;vary: Accept-Encoding&lt;BR /&gt;vary: Origin&lt;BR /&gt;x-content-type-options: nosniff&lt;BR /&gt;x-frame-options: SAMEORIGIN&lt;BR /&gt;x-xss-protection: 1; mode=block&lt;BR /&gt;content-length: 39&lt;/P&gt;&lt;P&gt;{"code":6,"desc":"invalid session key"}&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 09:44:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239003#M932</guid>
      <dc:creator>raysa123</dc:creator>
      <dc:date>2025-03-28T09:44:47Z</dc:date>
    </item>
    <item>
      <title>Query: REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239009#M933</link>
      <description>&lt;P style="margin: 0;"&gt;&lt;STRONG&gt;System recommended content:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;1. &lt;A href="https://hpe.to/66030FkS1" target="_blank" rel="noopener"&gt;HPE XP Common Services REST API Reference Guide (10.9.3)&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Please click on "Thumbs Up/Kudo" icon to give a "Kudo".&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Thank you for being a HPE valuable community member.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 10:55:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239009#M933</guid>
      <dc:creator>support_s</dc:creator>
      <dc:date>2025-03-24T10:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Query: REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239092#M935</link>
      <description>&lt;P&gt;thanks but still could not get what is wrong in my syntax above as I am using the latest key generated using put method. the documentation is for HPE XP still confusing to me.&lt;/P&gt;&lt;P&gt;Is there any idea on what will be the correct syntax base on my error above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 09:40:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239092#M935</guid>
      <dc:creator>raysa123</dc:creator>
      <dc:date>2025-03-25T09:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239176#M938</link>
      <description>&lt;P&gt;Hi Raysa123,&lt;BR /&gt;&lt;BR /&gt;I assume, the correct session key is used.&lt;BR /&gt;&lt;SPAN&gt;curl -k -H 'Content-Type:application/json' --data '{ "user":"username" ,"password":"user_password"}' -X POST &lt;/SPAN&gt;&lt;A class="c-link" href="https://10.157.192.192/api/v1/credentials" target="_blank" rel="noopener noreferrer" data-stringify-link="https://10.157.192.192/api/v1/credentials" data-sk="tooltip_parent"&gt;https://&amp;lt;array ip&amp;gt;/api/v1/credentials&lt;/A&gt;&lt;SPAN&gt; {"key":"0-5a2d2c9b9ec72c42c5dd0cf1b544c226-19dec165"}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fetch the session key from above output and use it with the key name " X-HP3PAR-WSAPI-SessionKey "&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Try the below command:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;curl -ki&amp;nbsp;&lt;A href="https://primera_ipaddress/api/v1/cpgs" target="_blank" rel="noopener nofollow noreferrer"&gt;https://PRIMERA_IPADDRESS/api/v1/cpgs&lt;/A&gt; X GET -H "X-HP3PAR-WSAPI-SessionKey":"&amp;lt;session key from above output&amp;gt;" &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Veeyaarvi&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 11:26:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239176#M938</guid>
      <dc:creator>veeyarvi</dc:creator>
      <dc:date>2025-03-26T11:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239180#M939</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1937123"&gt;@veeyarvi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You provide the right syntax! thanks a lot for sharing.&lt;/P&gt;&lt;P&gt;By the way is it possible to fetch or query a specific key to display the value from the response body? For example i want to monitor only the Primera system "freeCapacityMiB" from the output of this endpoint "/api/v1/system'.&amp;nbsp;Hope you could extend your kindness for a little more if you know something about it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below is my example result&amp;nbsp; using this endpoint&amp;nbsp; "/api/v1/system'.&lt;/P&gt;&lt;P&gt;curl -k https://&amp;lt;not revealing IPAddr&amp;gt;/api/v1/system?query="name" -X GET -H "X-HP3PAR-WSAPI-SessionKey":"0-f288cbcf927e53fa0ccd9a4afd41ae6b-7feee367"&lt;BR /&gt;{"code":9,"desc":"unsupported operation for the resource"}&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 13:17:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239180#M939</guid>
      <dc:creator>raysa321</dc:creator>
      <dc:date>2025-03-26T13:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239187#M940</link>
      <description>&lt;P&gt;Hi Raysa321,&lt;BR /&gt;&lt;BR /&gt;I do not think '&lt;SPAN&gt;freeCapacityMiB' is a supported one. As per&amp;nbsp;&lt;A href="https://support.hpe.com/hpesc/public/docDisplay?docId=a00118592en_us&amp;amp;page=v23270679.html" target="_blank"&gt;Success | HPE Alletra 9000: Web Services API v1.10 developer reference&lt;/A&gt;&amp;nbsp;, I could see 'freeMiB' and 'freeInitializedMiB' might be the one you are looking for (as per requirement).&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Veeyaarvi&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 15:08:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239187#M940</guid>
      <dc:creator>veeyarvi</dc:creator>
      <dc:date>2025-03-26T15:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239202#M941</link>
      <description>Hi @vveeyarvi,&lt;BR /&gt;&lt;BR /&gt;would you help what is the correct query? i tried it the one i showed above but it returns an error.</description>
      <pubDate>Wed, 26 Mar 2025 17:26:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239202#M941</guid>
      <dc:creator>raysa321</dc:creator>
      <dc:date>2025-03-26T17:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239357#M942</link>
      <description>&lt;P&gt;Hi Raysa,&lt;/P&gt;
&lt;P&gt;The below will list the complete endpoint&lt;BR /&gt;&lt;BR /&gt;key=$(curl -k -H 'Content-Type:application/json' --data '{ "user":"username" ,"password":"password"}' -X POST IP address/api/v1/credentials | jq -r '.key'); curl -k -H "Accept:application/json" -H "Content-Type:application/json" -H "X-HP3PAR-WSAPI-SessionKey":"$key" IP Address/api/v1/system | jq -r&lt;BR /&gt;&lt;BR /&gt;I think jq has options to fileter the required output (only) but I am yet to explore that option.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Veeyaarvi&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 08:44:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239357#M942</guid>
      <dc:creator>veeyarvi</dc:creator>
      <dc:date>2025-03-28T08:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239415#M943</link>
      <description>hi @veeryarvi&lt;BR /&gt;&lt;BR /&gt;this is a great help. appreciate the assistance and thank you.</description>
      <pubDate>Sun, 30 Mar 2025 11:44:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239415#M943</guid>
      <dc:creator>raysa321</dc:creator>
      <dc:date>2025-03-30T11:44:17Z</dc:date>
    </item>
    <item>
      <title>Query: REST API response error</title>
      <link>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239503#M944</link>
      <description>&lt;P style="margin: 0;"&gt;Hello,&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Let us know if you were able to resolve the issue.&lt;BR /&gt;&lt;BR /&gt;If you are satisfied with the answers then kindly click the "Accept As Solution" button for the most helpful response so that it is beneficial to all community members.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Please click on "Thumbs Up/Kudo" icon to give a "Kudo".&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2025 05:21:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-primera-storage/rest-api-response-error/m-p/7239503#M944</guid>
      <dc:creator>support_s</dc:creator>
      <dc:date>2025-04-01T05:21:33Z</dc:date>
    </item>
  </channel>
</rss>

