検討中のお客様はこちら

0120-50-6065

10:00〜19:00
土日祝、年末年始除く

お申し込み

トークン発行

Description

有効なトークン情報を取得します。

Request URL

identity API v2.0

POST /v2.0/tokens

Request Json

# テナント ID 指定
{
     "auth": {
          "passwordCredentials": {
               "username": "ユーザー名",
               "password": "パスワード"
          },
          "tenantId": "テナントID"
     }
}
# テナント名指定
{
     "auth": {
          "passwordCredentials": {
               "username": "ユーザー名",
               "password": "パスワード"
          },
          "tenantName": "テナント名"
     }
}

Request Parameters

Parameter Value Style Description
username ユーザー名 plain ユーザー名
password パスワード plain パスワード
tenantId (Optional) テナントID plain テナントID
tenantName(Optional) テナント名 plain テナント名

Response

  • Normal response codes
200

Example

  • Request
curl -i -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"auth":{"passwordCredentials":{"username": "ユーザー名", "password": "パスワード"},"tenantName":"テナント名"}}' \
https://identity.gpu-sys.cloud/v2.0/tokens
  • Response
HTTP/1.1 200 OK
Date: Tue, 28 Jul 2020 08:01:44 GMT
Server: Apache
Content-Length: 1994
Content-Type: application/json

{
  "access": {
    "token": {
      "issued_at": "2020-07-28T08:04:06.953886",
      "expires": "2020-07-29T08:04:06Z",
      "id": "トークンID",
      "tenant": {
        "id": "テナントID",
        "enabled": true,
        "domain_id": "gpu",
        "name": "テナント名",
        "description": ""
      },
      "audit_ids": [
        "zSWar37zSzSjiSRMp8UEZQ"
      ]
    },
    "serviceCatalog": [
      {
        "endpoints": [
          {
            "region": "jpt1",
            "publicURL": "https://account.gpu-sys.cloud/v1/テナントID"
          }
        ],
        "endpoints_links": [],
        "type": "account",
        "name": "Account Service"
      },
      {
        "endpoints": [
          {
            "region": "jpt1",
            "publicURL": "https://compute.gpu-sys.cloud/v2/テナントID"
          }
        ],
        "endpoints_links": [],
        "type": "compute",
        "name": "Compute Service"
      },
      {
        "endpoints": [
          {
            "region": "jpt1",
            "publicURL": "https://networking.gpu-sys.cloud"
          }
        ],
        "endpoints_links": [],
        "type": "network",
        "name": "Network Service"
      },
      {
        "endpoints": [
          {
            "region": "jpt1",
            "publicURL": "https://block-storage.gpu-sys.cloud/v2/テナントID"
          }
        ],
        "endpoints_links": [],
        "type": "volumev2",
        "name": "Volume Service"
      },
      {
        "endpoints": [
          {
            "region": "jpt1",
            "publicURL": "https://image-service.gpu-sys.cloud"
          }
        ],
        "endpoints_links": [],
        "type": "image",
        "name": "Image Service"
      },
      {
        "endpoints": [
          {
            "region": "jpt1",
            "publicURL": "https://dns-service.gpu-sys.cloud"
          }
        ],
        "endpoints_links": [],
        "type": "dns",
        "name": "DNS Service"
      },
      {
        "endpoints": [
          {
            "region": "jpt1"
          }
        ],
        "endpoints_links": [],
        "type": "gpu",
        "name": "GPU Service"
      },
      {
        "endpoints": [
          {
            "region": "jpt1",
            "publicURL": "https://object-storage.gpu-sys.cloud/v1/gpu_46d857a5b9234ef5ac72a682ea170267"
          }
        ],
        "endpoints_links": [],
        "type": "object-store",
        "name": "Object Storage Service"
      },
      {
        "endpoints": [
          {
            "region": "jpt1",
            "publicURL": "https://identity.gpu-sys.cloud/v2.0"
          }
        ],
        "endpoints_links": [],
        "type": "identity",
        "name": "Identity Service"
      }
    ],
    "user": {
      "username": "ユーザー名",
      "roles_links": [],
      "id": "example6963c074d7csample12a886ee",
      "roles": [
        {
          "name": "SwiftOperator"
        },
        {
          "name": "_member_"
        }
      ],
      "name": "ユーザー名"
    },
    "metadata": {
      "is_admin": 0,
      "roles": [
        "ea04ba71916e434c8fdc1b9c327f8dae",
        "e79e6014598348f192a03f8456a084a3"
      ]
    }
  }
}