This section explains how to retrieve the token necessary for authentication, in order to use API.
Note: It is assumed that the working directory and the setup scripts have been created.
-
Change to the working directory.
-
Retrieve the token.
The script assigns the token to the OS_AUTH_TOKEN environment variable.
$ . ./get_token.sh
A response such as the following is output to the console window.
EP initial setup.
****************************************
** Retrieve token **
**(Display key after retrieving token)**
****************************************
- Setting content
endpoint:https://identity.<Region Identifier>.cloud.global.fujitsu.com
domain_name:<contractNum(Domain)>
domain_id:<domainId>
user_name:<userName>
user_pw:<userPassword>
project_id:<projectId>
- CURL
curl -X POST https://identity.<Region Identifier>.cloud.global.fujitsu.com/v3/auth/tokens -H "Content-Type:application/json" -H "Accept:application/json" -d
{
"auth": {
"identity": {
"methods": [
"password"
],
"password": {
"user": {
"domain": {
"name": "<contractNumber(Domain)>"
},
"name": "<userName>",
"password": "<userPassword>"
}
}
},
"scope": {
"project": {
"id": "<projectId>"
}
}
}
}
=== Retrieved authentication token starts here ===
<anyString> (up to 32 halfwidth alphanumeric characters)
=== Retrieved authentication token ends here ===
Provided the authentication token can be confirmed, API operations can be performed in this environment.