<?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 Storeonce API authentication in StoreOnce Backup Storage</title>
    <link>https://community.hpe.com/t5/storeonce-backup-storage/storeonce-api-authentication/m-p/7123496#M1827</link>
    <description>&lt;P&gt;I am trying to script some reports using powershell with the Storeonce api and I am struggling on even getting connected. I'm using the invoke-restmethod cmdlet and my code looks like this:&lt;/P&gt;&lt;P&gt;$username = 'myusername'&lt;BR /&gt;$password = 'mypassword'&lt;BR /&gt;$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))&lt;/P&gt;&lt;P&gt;$resp = Invoke-RestMethod -Method Post -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType 'application/json' -Uri '&lt;A href="https://mystoreonce.domain/pml/login/authenticatewithobject/" target="_blank"&gt;https://mystoreonce.domain/pml/login/authenticatewithobject/&lt;/A&gt;'&lt;/P&gt;&lt;P&gt;The error I'm getting is:&lt;/P&gt;&lt;P&gt;Invoke-RestMethod : No content to map due to end-of-input&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've googled that error with no luck. Any ideas what I'm missing or doing wrong?&lt;/P&gt;</description>
    <pubDate>Tue, 02 Mar 2021 14:02:48 GMT</pubDate>
    <dc:creator>Sean-PA</dc:creator>
    <dc:date>2021-03-02T14:02:48Z</dc:date>
    <item>
      <title>Storeonce API authentication</title>
      <link>https://community.hpe.com/t5/storeonce-backup-storage/storeonce-api-authentication/m-p/7123496#M1827</link>
      <description>&lt;P&gt;I am trying to script some reports using powershell with the Storeonce api and I am struggling on even getting connected. I'm using the invoke-restmethod cmdlet and my code looks like this:&lt;/P&gt;&lt;P&gt;$username = 'myusername'&lt;BR /&gt;$password = 'mypassword'&lt;BR /&gt;$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))&lt;/P&gt;&lt;P&gt;$resp = Invoke-RestMethod -Method Post -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType 'application/json' -Uri '&lt;A href="https://mystoreonce.domain/pml/login/authenticatewithobject/" target="_blank"&gt;https://mystoreonce.domain/pml/login/authenticatewithobject/&lt;/A&gt;'&lt;/P&gt;&lt;P&gt;The error I'm getting is:&lt;/P&gt;&lt;P&gt;Invoke-RestMethod : No content to map due to end-of-input&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've googled that error with no luck. Any ideas what I'm missing or doing wrong?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 14:02:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/storeonce-backup-storage/storeonce-api-authentication/m-p/7123496#M1827</guid>
      <dc:creator>Sean-PA</dc:creator>
      <dc:date>2021-03-02T14:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Storeonce API authentication</title>
      <link>https://community.hpe.com/t5/storeonce-backup-storage/storeonce-api-authentication/m-p/7123952#M1832</link>
      <description>&lt;P&gt;Figured it out:&lt;/P&gt;&lt;P&gt;$username = 'myusername'&lt;BR /&gt;$password = 'mypassword'&lt;BR /&gt;$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))&lt;/P&gt;&lt;P&gt;Invoke-RestMethod -Method Get -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType 'application/json' -Uri 'https://mystoreoncefqdn/api/v1/data-services/cat/stores'&lt;/P&gt;&lt;P&gt;Basically, I dont need to authenticate to the uri given in the curl i just go right to the api endpoint I need and include auth info in the header.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 13:55:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/storeonce-backup-storage/storeonce-api-authentication/m-p/7123952#M1832</guid>
      <dc:creator>Sean-PA</dc:creator>
      <dc:date>2021-03-04T13:55:33Z</dc:date>
    </item>
  </channel>
</rss>

