HPE OneView
cancel
Showing results for 
Search instead for 
Did you mean: 

Change default login domain back to local

 
SOLVED
Go to solution
BradV
Trusted Contributor

Change default login domain back to local

I goofed when connecting OneView to our active directory.  So, I need to disconnect and connect correctly.  However, before I disconnect, OneView is insisting that I change the default login domain.  So, I tried: 

# 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 '{ "name" : "local" }' \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'

{
  "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"
}

but my data is not correct.  The rest api reference for this is a little lacking.  Anyone know the correct JSON to use to set the default login domain back to local?

1 REPLY 1
BradV
Trusted Contributor
Solution

Re: Change default login domain back to local

Had a ticket opened for this, got the answer in case anyone else is looking: 

curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data '"LOCAL"' \
     --request POST ${OneView}/rest/logindomains/global-settings/default-login-domain | jq -r '.'

I think the documentation could be a little more clear.  He did say that "LOCAL" needs to be in call caps.