<?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: Set default login directory in HPE OneView</title>
    <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057869#M4447</link>
    <description>&lt;P&gt;Hi Bashkar,&lt;/P&gt;&lt;P&gt;When I just give the name, it responds with malformed json.&amp;nbsp; When I remove the '--header&amp;nbsp;"content-type: application/json",' the error message changes to: "Invalid global settings.&amp;nbsp; Property: ADHQ=, Value: {1}\nThe specificed enterprise directory name ADHQ= does not exist."&lt;/P&gt;&lt;P&gt;So, this API is not correctly documented.&amp;nbsp; This API reference also states no authorization is required.&amp;nbsp; &lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2019 12:12:18 GMT</pubDate>
    <dc:creator>BradV</dc:creator>
    <dc:date>2019-08-07T12:12:18Z</dc:date>
    <item>
      <title>Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7044675#M4146</link>
      <description>&lt;P&gt;Trying to set the default login directory using the REST API.&amp;nbsp; I ran:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# Follow instructions in: OneView-API_Get_Session_Credentials.txt
curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "{ \"allowLocalLogin\"" true, \"defaultLoginDomain\"; { \"loginDomain\": \"2\", \"name\": \"${ADD}\", \"type\": \"LoginDomainConfigInfoDto\", \"uri\": \"/rest/logindomains/s\" }}" \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;which gives back:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "data": {},
  "nestedErrors": [],
  "errorSource": null,
  "recommendedActions": [
    "Correct the JSON as appropriate array or collection and try the request again."
  ],
  "details": "The JSON sent in the request is not a valid array or collection.",
  "message": "The JSON can not be mapped to array or collection.",
  "errorCode": "INVALID_JSON_ELEMENT"
}&lt;/PRE&gt;&lt;P&gt;If I just echo the data segment to jq, I get:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;echo "{ \"allowLocalLogin\"" true, \"defaultLoginDomain\"; { \"loginDomain\": \"2\", \"name\": \"${ADD}\", \"type\": \"LoginDomainConfigInfoDto\", \"uri\": \"/rest/logindomains/s\" }}" | jq -r '.'
{
  "defaultLoginDomain": {
    "uri": "/rest/logindomains/2",
    "type": "LoginDomainConfigInfoDto",
    "name": "HQ",
    "loginDomain": "2"
  },
  "allowLocalLgin": true
}&lt;/PRE&gt;&lt;P&gt;which looks fine as far as I can tell.&amp;nbsp; Anyone have an idea what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 10:06:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7044675#M4146</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-05-02T10:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7044740#M4148</link>
      <description>&lt;P&gt;You are using the wrong URI to set the default directory.&amp;nbsp; The correct URI would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;POST    https://{appl}/rest/logindomains/global-settings/default-login-domain

Auth: abcdefghijklmnopqrstuvwxyz012345
X-Api-Version: 1000
Content-Type: application/json

"myDirectoryName"&lt;/PRE&gt;&lt;P&gt;This is documented in our REST API reference document, under&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Login Domains Global Settings&lt;/FONT&gt;.&amp;nbsp; You could have searched that same API documentation for default directory:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OneView Default Directory API Search.jpg" style="width: 1085px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/109613i22BA6D582BCF3F28/image-size/large?v=v2&amp;amp;px=2000" role="button" title="OneView Default Directory API Search.jpg" alt="OneView Default Directory API Search.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 16:47:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7044740#M4148</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-05-02T16:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7056523#M4396</link>
      <description>&lt;P&gt;Sorry Chris, I just realized I never closed this out.&amp;nbsp; I did get it working with:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#
# Set the default login directory
# First, get a listing of configured directories:
curl --insecure \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --request GET ${OneView}/rest/logindomains | jq -r '.'
# From the above, get the loginDomain number and the corresponding uri:
LGURI="/rest/logindomains/2"
LGDOMNUM="2"
# Note: If you have only one directory configured, can set LGURI directly with:
LGURI=$(curl --insecure \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --request GET ${OneView}/rest/logindomains | jq -r '.members[] | .directoryServers[] | .uri')
# And the LGDOMNUM with:
LGDOMNUM=$(curl --insecure \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --request GET ${OneView}/rest/logindomains | jq -r '.members[] | .loginDomain')
ADD="ADHQ"
DATA='{ "allowLocalLogin": true, "defaultLoginDomain": { "loginDomain": "'${LGDOMNUM}'", "name": "'${ADD}'", "type": "LoginDomainConfigInfoDto", "uri": "'${LGURI}'"
curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "${DATA}" \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 Jul 2019 09:39:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7056523#M4396</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-07-26T09:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057112#M4416</link>
      <description>&lt;P&gt;Hi Brad,&lt;/P&gt;&lt;P&gt;Looks like you pasted the old request !&lt;/P&gt;&lt;P&gt;Did you have to change the URI to /rest/logindomains/global-settings or the request body to pass only the directory name as string as Chris suggested? Is it possible for you to confirm and update the request so that it can help anyone else facing a similar issue?&lt;/P&gt;&lt;P&gt;DATA='{ "allowLocalLogin": true, "defaultLoginDomain": { "loginDomain": "'${LGDOMNUM}'", "name": "'${ADD}'", "type": "LoginDomainConfigInfoDto", "uri": "'${LGURI}'"&lt;BR /&gt;curl --insecure \&lt;BR /&gt;--header "content-type: application/json" \&lt;BR /&gt;--header "X-API-Version: ${currentVersion}" \&lt;BR /&gt;--header "auth: ${sessionID}" \&lt;BR /&gt;--data "${DATA}" \&lt;BR /&gt;--request POST ${OneView&lt;FONT color="#ff0000"&gt;}/rest/logindomains/global-settings/default-login-domain&lt;/FONT&gt; | jq -r '.'&lt;/P&gt;&lt;P&gt;~Poongkodi&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 04:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057112#M4416</guid>
      <dc:creator>Poongkodi</dc:creator>
      <dc:date>2019-08-01T04:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057166#M4419</link>
      <description>&lt;P&gt;You are right that I don't have that correct.&amp;nbsp; However, the documentation needs some work.&amp;nbsp; For example, the REST API reference, the "Authorization" section states: "This API requires no authorization."&amp;nbsp; However, the "Request" section shows an "Auth" line and the "Request Headers" section has an Auth entry with: "Session authorization token obtained from logging in.&amp;nbsp; If this header is not included or if the session-token is invalid, the response code will be 401 Unauthorized."&amp;nbsp; It definately could use a better example of what is required in the request body.&amp;nbsp; I tried:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DATA="ADHQ"
curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "${DATA}" \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and get back malformed JSON.&amp;nbsp; I tried:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DATA='{ "name": "ADHQ" }'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;and get back invalid JSON.&amp;nbsp; The REST API reference "Request Body" section talks about a very large number of items.&amp;nbsp; I ran:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --request GET ${OneView}/rest/logindomains/global-settings | jq -r '.'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and copied the entire section related to ADHQ into the DATA variable and tried again.&amp;nbsp; I got back that the JSON sent in the request is not a valid array or collection.&amp;nbsp; Like I said, the API reference is not clear.&amp;nbsp; Could someone please provide a more clear example of what is the proper JSON to supply for setting the default login domain?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 10:11:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057166#M4419</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-08-01T10:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057278#M4422</link>
      <description>&lt;P&gt;Well, from a previous conversation,&amp;nbsp;&lt;A href="https://community.hpe.com/t5/HPE-OneView/Change-default-login-domain-back-to-local/td-p/7039280#.XUQBTVVKhEI" target="_blank" rel="noopener"&gt;Set default login domain back to local&lt;/A&gt;, implies just the directory name.&amp;nbsp; So, I tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ADD="ADHQ"
curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "${ADD}" \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but that still gives me "malformed JSON cannot be parsed."&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 09:31:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057278#M4422</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-08-02T09:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057705#M4438</link>
      <description>&lt;P&gt;Hi Brad,&lt;/P&gt;&lt;P&gt;I see that you missed to surround the value with quotes like you mentioned in the other thread.&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;ADD="ADHQ"&lt;BR /&gt;curl --insecure \&lt;BR /&gt;--header "content-type: application/json" \&lt;BR /&gt;--header "X-API-Version: ${currentVersion}" \&lt;BR /&gt;--header "auth: ${sessionID}" \&lt;BR /&gt;--data '"${ADD}"' \&lt;BR /&gt;--request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2019 06:52:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057705#M4438</guid>
      <dc:creator>Poongkodi</dc:creator>
      <dc:date>2019-08-06T06:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057739#M4441</link>
      <description>&lt;P&gt;No, that was not it.&amp;nbsp; I found in the REST API reference, that "MALFORMED_JSON" means that the data did not parse as JSON.&amp;nbsp; Just having the name "ADHQ" is not a JSON.&amp;nbsp; So, I attempted:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DATA='"name": "'${ADD}'"'
curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "${DATA}" \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;/LI-CODE&gt;&lt;P&gt;and this time got back:&lt;/P&gt;&lt;P&gt;Invalid global settings.&amp;nbsp; Property: name, Value: {1}\nThe specified enterprise directory name name does not exist.&lt;/P&gt;&lt;P&gt;AUTHN_GLOBALSETTINGS_VALIDATION_RESOURCE_ERROR&lt;/P&gt;&lt;P&gt;Not sure what that means?&amp;nbsp; When I retrieve a listing of the logindomains, that field, name, has value ADHQ.&amp;nbsp; So, what am I missing?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2019 10:27:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057739#M4441</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-08-06T10:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057812#M4443</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1179670"&gt;@BradV&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about the trouble this API has been causing you.&lt;BR /&gt;There is something odd about this specific API.&lt;BR /&gt;We have taken your input.&lt;BR /&gt;This specific API does not accept standard JSON as the POST body.&lt;BR /&gt;So in your attempt below, you have DATA: { "name" : "AHQ" } which is what you would expect a standard API to accept.&lt;BR /&gt;While most of our other APIs do accept a format such as this, this specific one instead takes just a string "ADHQ" enclosed in double quotes as the *only* input in the POST body.&lt;/P&gt;&lt;P&gt;So do not pass the DATA = '"name": "'${ADD}'"' as the argument to --data.&lt;BR /&gt;Instead you need to pass just --data "ADHQ" as the argument.&lt;/P&gt;&lt;P&gt;When doing this from curl on the command line, the below would work.&lt;/P&gt;&lt;P&gt;curl --insecure \&lt;BR /&gt;--header "content-type: application/json" \&lt;BR /&gt;--header "X-API-Version: ${currentVersion}" \&lt;BR /&gt;--header "auth: ${sessionID}" \&lt;BR /&gt;--data '"ADHQ"' \&amp;nbsp; &amp;nbsp;#(that is an opening single quote followed by ADHQ in double quotes followed by a closing single quote)&lt;BR /&gt;--request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;/P&gt;&lt;P&gt;Try after making that change. I have justed tested it and that works.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATA='"name": "'${ADD}'"'
curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "${DATA}" \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;/PRE&gt;&lt;P&gt;And let us know.&lt;BR /&gt;Thank you for being patient with this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Bhaskar&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 05:51:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057812#M4443</guid>
      <dc:creator>BhaskarV</dc:creator>
      <dc:date>2019-08-07T05:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057869#M4447</link>
      <description>&lt;P&gt;Hi Bashkar,&lt;/P&gt;&lt;P&gt;When I just give the name, it responds with malformed json.&amp;nbsp; When I remove the '--header&amp;nbsp;"content-type: application/json",' the error message changes to: "Invalid global settings.&amp;nbsp; Property: ADHQ=, Value: {1}\nThe specificed enterprise directory name ADHQ= does not exist."&lt;/P&gt;&lt;P&gt;So, this API is not correctly documented.&amp;nbsp; This API reference also states no authorization is required.&amp;nbsp; &lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 12:12:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057869#M4447</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-08-07T12:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057917#M4451</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1179670"&gt;@BradV&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wasnt expecting to see the "ADHQ=" in the error.&lt;/P&gt;&lt;P&gt;My request looks like this&lt;/P&gt;&lt;P&gt;curl -k -X POST \&lt;BR /&gt;--header "Content-Type:application/json" \&lt;BR /&gt;--header "X-API-Version:800" \&lt;BR /&gt;--header "Auth:xyz" \&lt;BR /&gt;--data '"ADHQ"' '&lt;A href="https://myappliance.hpe.com/rest/logindomains/global-settings/default-login-domain" target="_blank"&gt;https://myappliance.hpe.com/rest/logindomains/global-settings/default-login-domain&lt;/A&gt;'&lt;/P&gt;&lt;P&gt;Can you check and compare against what you send to the server after all the substitutions?&lt;BR /&gt;ADHQ is the name of the directory that I want to be set as default.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Bhaskar&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 16:35:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057917#M4451</guid>
      <dc:creator>BhaskarV</dc:creator>
      <dc:date>2019-08-07T16:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057924#M4453</link>
      <description>&lt;P&gt;Changing any setting within OneView via the API requires authorization.&amp;nbsp; Your account needs to have Infrastructure administrator role.&lt;/P&gt;&lt;P&gt;As for setting the default auth directory for the appliance, you need to just encapsulate the directory name in double-quotes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;--data "ADHQ"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise, the API will be wanting to look for &lt;FONT face="courier new,courier"&gt;'ADHQ'&lt;/FONT&gt;, not just &lt;FONT face="courier new,courier"&gt;ADHQ&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;Also, when providing code, either use the Insert Code button (which is the &amp;lt;/&amp;gt; icon), or use another font type like &lt;FONT face="courier new,courier"&gt;Courier New&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 17:03:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7057924#M4453</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-08-07T17:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058024#M4456</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;I was just pointing out that the API Reference is invalid again.&amp;nbsp; &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;It says:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Authorization
This API requires no authorization.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then in the Request Headers section:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Auth   Session authorization token obtained from logging in.  If this header is not included or if the session-token is invalid, the response code will be 401 Unauthorized.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;So, inconsistent.&lt;/P&gt;&lt;P&gt;Bashkar/Chris,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just using --data "ADHQ."&amp;nbsp; I believe the API reference example is also missleading.&amp;nbsp; It shows including the header, Content-Type: application/json.&amp;nbsp; The single name is not a valid json.&amp;nbsp; So, if I include that header, I get malformed json as the error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --insecure \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "ADHQ" \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the error with "errorSource": "ADHQ=" in the response.&amp;nbsp; I don't see any difference between what I have and what you presented other than the json header?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 11:08:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058024#M4456</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-08-08T11:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058107#M4463</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1179670"&gt;@BradV&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this specific case, you need an extra pair of single quotes enclosing the "ADHQ".&amp;nbsp; It needs to be &amp;lt;single quote&amp;gt;"ADHQ"&amp;lt;single quote&amp;gt;. Substitute all the variables, form a command line that works, then go back and fix the script accordingly.&lt;/P&gt;&lt;P&gt;curl --insecure \&lt;BR /&gt;--header "X-API-Version: 800" \&lt;BR /&gt;--header "auth: XYZ" \&lt;BR /&gt;--data '"ADHQ"' \&lt;BR /&gt;--request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below reliably works.&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;curl -k -X POST --header "Content-Type:application/json" --header "X-API-Version:800" --header "Auth:XYZ" --data&lt;FONT size="6"&gt; '"ADHQ"'&lt;/FONT&gt; '&lt;A href="https://myappliance.hpe.com/rest/logindomains/global-settings/default-login-domain" target="_blank"&gt;https://myappliance.hpe.com/rest/logindomains/global-settings/default-login-domain&lt;/A&gt;'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;Try it out and let me know.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Bhaskar&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 00:23:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058107#M4463</guid>
      <dc:creator>BhaskarV</dc:creator>
      <dc:date>2019-08-09T00:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058153#M4464</link>
      <description>&lt;P&gt;Hi Bashkar,&lt;/P&gt;&lt;P&gt;I finally got it worked out.&amp;nbsp; The REST API documentation needs updated.&amp;nbsp; First, correct the information about authorization.&amp;nbsp; Next is the content type header.&amp;nbsp; When I included content type header of application/json, I always got back malformed json since a single word is not a valid json.&amp;nbsp; So, I just dropped that header, but kept getting back invalid global settings and the errorsource was ADHQ=.&amp;nbsp; This worked:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DATA="ADHQ"
curl --insecure \
     --header "content-type: text/plain" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "${DATA}" \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'&lt;/LI-CODE&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 09:06:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058153#M4464</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-08-09T09:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058320#M4467</link>
      <description>&lt;P&gt;Great! Thanks a lot&amp;nbsp;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1179670"&gt;@BradV&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Bhaskar&lt;/P&gt;</description>
      <pubDate>Sun, 11 Aug 2019 15:32:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058320#M4467</guid>
      <dc:creator>BhaskarV</dc:creator>
      <dc:date>2019-08-11T15:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058374#M4469</link>
      <description>&lt;P&gt;Hi Bashkar,&lt;/P&gt;&lt;P&gt;So, just to make sure, someone is entering a change request for the REST API documentation to fix the information on authorization, change the header information to show that header content-type: text/plain is required, and give a valid example?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 09:08:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058374#M4469</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-08-12T09:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058471#M4476</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1179670"&gt;@BradV&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Yes, the error with the REST API documentation about authorization is being corrected.&lt;BR /&gt;On the content type, checking on the version of curl we use.&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt;Bhaskar&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 00:11:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058471#M4476</guid>
      <dc:creator>BhaskarV</dc:creator>
      <dc:date>2019-08-13T00:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set default login directory</title>
      <link>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058496#M4477</link>
      <description>&lt;P&gt;Hi Bashkar,&lt;/P&gt;&lt;P&gt;If it helps, I am running on a RHEL 6.10 server with curl 7.19.7.&amp;nbsp; I wouldn't think that the version of curl would matter?&amp;nbsp; The content supplied was not a JSON.&amp;nbsp; It was just plain text.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 08:40:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/set-default-login-directory/m-p/7058496#M4477</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-08-13T08:40:50Z</dc:date>
    </item>
  </channel>
</rss>

