<?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 Cannoit change Encryption Passphrase through REST API in Application Integration</title>
    <link>https://community.hpe.com/t5/application-integration/cannoit-change-encryption-passphrase-through-rest-api/m-p/7044721#M1139</link>
    <description>&lt;P&gt;When I attempt to change my&amp;nbsp;Encryption Passphrase through the rest API I keep getting "The remote server returned an error: (401) Unauthorized." Below is the commands im running to attempt to update the passphrase. If I am reading/understanding the REST API documentation (&lt;A href="https://infosight.hpe.com/InfoSight/media/cms/active/public/pubs_REST_API_Reference_NOS_51x.whz/qyk1480349012860.html)&amp;nbsp;" target="_blank"&gt;https://infosight.hpe.com/InfoSight/media/cms/active/public/pubs_REST_API_Reference_NOS_51x.whz/qyk1480349012860.html)&amp;nbsp;&lt;/A&gt; all I need to submit to update the passphrase is the ID of the master key, the current passphrase and the new passphrase.&amp;nbsp; Any help would be appericated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Get the Token to connect to the Nimble&lt;BR /&gt;$data = @{&lt;BR /&gt;username = $username&lt;BR /&gt;password = $password&lt;BR /&gt;}&lt;BR /&gt;$body = convertto-json (@{ data = $data })&lt;/P&gt;&lt;P&gt;$uri = "https://" + $nimblearray + ":5392/v1/tokens"&lt;BR /&gt;$nimbleToken = try {&lt;BR /&gt;Invoke-RestMethod -Uri $uri -Method Post -Body $body&lt;BR /&gt;}&lt;BR /&gt;catch&lt;BR /&gt;{&lt;BR /&gt;throw "Nimble - Couldn't connect to $nimblearray"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if ($nimbleToken -ne $null)&lt;BR /&gt;{&lt;BR /&gt;$token = $nimbleToken.data.session_token&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Get the information about the user you need to change&lt;BR /&gt;$header = @{"X-Auth-Token" = $token}&lt;BR /&gt;$uri = "https://" + $nimblearray + ":5392/v1/master_key"&lt;BR /&gt;$keyList = Invoke-RestMethod -Uri $uri -Method Get -Header $header&lt;/P&gt;&lt;P&gt;$data = @{&lt;BR /&gt;id = $keyList.data.id&lt;BR /&gt;passphrase = $passphrase&lt;BR /&gt;new_passphrase = $new_passphrase&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$body = convertto-json (@{ data = $data })&lt;/P&gt;&lt;P&gt;$uri = "https://" + $nimblearray + ":5392/v1/master_key/" + $keyList.data.id&lt;BR /&gt;Invoke-RestMethod -Uri $uri -Method Put -Body $body -Headers $header&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2019 15:00:04 GMT</pubDate>
    <dc:creator>yolinares</dc:creator>
    <dc:date>2019-05-02T15:00:04Z</dc:date>
    <item>
      <title>Cannoit change Encryption Passphrase through REST API</title>
      <link>https://community.hpe.com/t5/application-integration/cannoit-change-encryption-passphrase-through-rest-api/m-p/7044721#M1139</link>
      <description>&lt;P&gt;When I attempt to change my&amp;nbsp;Encryption Passphrase through the rest API I keep getting "The remote server returned an error: (401) Unauthorized." Below is the commands im running to attempt to update the passphrase. If I am reading/understanding the REST API documentation (&lt;A href="https://infosight.hpe.com/InfoSight/media/cms/active/public/pubs_REST_API_Reference_NOS_51x.whz/qyk1480349012860.html)&amp;nbsp;" target="_blank"&gt;https://infosight.hpe.com/InfoSight/media/cms/active/public/pubs_REST_API_Reference_NOS_51x.whz/qyk1480349012860.html)&amp;nbsp;&lt;/A&gt; all I need to submit to update the passphrase is the ID of the master key, the current passphrase and the new passphrase.&amp;nbsp; Any help would be appericated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Get the Token to connect to the Nimble&lt;BR /&gt;$data = @{&lt;BR /&gt;username = $username&lt;BR /&gt;password = $password&lt;BR /&gt;}&lt;BR /&gt;$body = convertto-json (@{ data = $data })&lt;/P&gt;&lt;P&gt;$uri = "https://" + $nimblearray + ":5392/v1/tokens"&lt;BR /&gt;$nimbleToken = try {&lt;BR /&gt;Invoke-RestMethod -Uri $uri -Method Post -Body $body&lt;BR /&gt;}&lt;BR /&gt;catch&lt;BR /&gt;{&lt;BR /&gt;throw "Nimble - Couldn't connect to $nimblearray"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if ($nimbleToken -ne $null)&lt;BR /&gt;{&lt;BR /&gt;$token = $nimbleToken.data.session_token&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Get the information about the user you need to change&lt;BR /&gt;$header = @{"X-Auth-Token" = $token}&lt;BR /&gt;$uri = "https://" + $nimblearray + ":5392/v1/master_key"&lt;BR /&gt;$keyList = Invoke-RestMethod -Uri $uri -Method Get -Header $header&lt;/P&gt;&lt;P&gt;$data = @{&lt;BR /&gt;id = $keyList.data.id&lt;BR /&gt;passphrase = $passphrase&lt;BR /&gt;new_passphrase = $new_passphrase&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$body = convertto-json (@{ data = $data })&lt;/P&gt;&lt;P&gt;$uri = "https://" + $nimblearray + ":5392/v1/master_key/" + $keyList.data.id&lt;BR /&gt;Invoke-RestMethod -Uri $uri -Method Put -Body $body -Headers $header&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 15:00:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/application-integration/cannoit-change-encryption-passphrase-through-rest-api/m-p/7044721#M1139</guid>
      <dc:creator>yolinares</dc:creator>
      <dc:date>2019-05-02T15:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cannoit change Encryption Passphrase through REST API</title>
      <link>https://community.hpe.com/t5/application-integration/cannoit-change-encryption-passphrase-through-rest-api/m-p/7044723#M1140</link>
      <description>&lt;P&gt;well my issue was with special characters and storing the intial passphrase in a double quotes string vs a single quotes string in my testing. my commands below worked once i fixed the special characters.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 15:15:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/application-integration/cannoit-change-encryption-passphrase-through-rest-api/m-p/7044723#M1140</guid>
      <dc:creator>yolinares</dc:creator>
      <dc:date>2019-05-02T15:15:30Z</dc:date>
    </item>
  </channel>
</rss>

