Authenticating with IBM Power Virtualization Center

After PowerVC services are installed and running on a managing system, the first step an application must do is to authenticate with the Keystone service.

Initial authentication returns an access token and a service catalog. The service catalog defines the URLs that can be used to access the various services. Use the public URL for the desired service when constructing further API requests. The access token should be specified in the X-Auth-Token header for each of those requests.
Note: Access tokens are valid for 6 hours by default. You can use the powervc-config CLI command to change that setting. Request a new token at least 1 hour before it expires to ensure that the token does not expire in the middle of an operation.
You need the following minimal information to successfully run this API:
  • IP address or host name of managing system (where PowerVC services are running) or virtual IP address in case of PowerVC multinode cluster.
  • API URI, https://<IP address or host name of managing system or Virtual IP of PowerVC multinode cluster>:5000 .
  • User name.
  • User password.
  • Tenant/Project name
  • Domain name (Default is the only supported value.)
Here is a sample request:
POST https://<IP/Virtual IP/hostname>:5000/v3/auth/tokens
headers=
       {'Content-Type': 'application/json',
	'Vary': 'X-Auth-Token, X-Subject-Token',
	'Accept': 'application/json'
}
body=
{
	"auth": {
		"scope": {
			"project": {
				"domain": {
					"name": "Default"
				},
				"name": "ibm-default"
			}
		},
		"identity": {
			"password": {
				"user": {
					"domain": {
						"name": "Default"
					},
					"password": "mypassword",
					"name": "myuserid"
				}
			},
			"methods": [
				"password"
			]
		}
	}
}