Description

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

Request URL

Identity API

POST /v2.0/tokens

Request Json

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

Request Parameters

Parameter Value Style Description
username APIユーザー名 body 作成したAPIユーザーのユーザー名を指定します。
password パスワード body APIユーザーのパスワードを指定します。
tenantId テナントID body テナントIDを指定します。

Response Code

Success

200

Example

Request

curl -i -X POST \
-H "Accept: application/json" \
-d '{"auth":{"passwordCredentials":{"username":"APIユーザー名","password":"パスワード"},"tenantId":"テナントID"}}' \
https://identity.tyo1.conoha.io/v2.0/tokens

Response

HTTP/1.1 200 OK
Date: Mon, 08 Dec 2014 02:40:56 GMT
Server: Apache
Content-Length: 4572
Content-Type: application/json

{
  "access": {
    "token": {
      "issued_at": "2015-05-19T07:08:21.927295",
      "expires": "2015-05-20T07:08:21Z",
      "id": "sample00d88246078f2bexample788f7",
      "tenant": {
        "name": "example00000000",
        "enabled": true,
        "tyo1_image_size": "550GB",
          }
        ],
        "endpoints_links": [],
        "type": "mailhosting",
        "name": "Mail Hosting Service"
      },
      {
        "endpoints": [
          {
            "region": "tyo1",
            "publicURL": "https://dns-service.tyo1.conoha.io"
          }
        ],
        "endpoints_links": [],
        "type": "dns",
        "name": "DNS Service"
      },
      {
        "endpoints": [
          {
            "region": "tyo1",
            "publicURL": "https://object-storage.tyo1.conoha.io/v1/nc_a4392c0ccba74485abd58ec123eca824"
          }
        ],
        "endpoints_links": [],
        "type": "object-store",
        "name": "Object Storage Service"
      },
      {
        "endpoints": [
          {
            "region": "sjc1",
            "publicURL": "https://identity.sjc1.conoha.io/v2.0"
          },
          {
            "region": "tyo1",
            "publicURL": "https://identity.tyo1.conoha.io/v2.0"
          },
          {
            "region": "sin1",
            "publicURL": "https://identity.sin1.conoha.io/v2.0"
          }
        ],
        "endpoints_links": [],
        "type": "identity",
        "name": "Identity Service"
      }
    ],
    "user": {
      "username": "example00000000",
      "roles_links": [],
      "id": "examplea6963c074d7csample12a886ee",
      "roles": [
        {
          "name": "SwiftOperator"
        },
        {
          "name": "_member_"
        }
      ],
      "name": "example00000000"
    },
    "metadata": {
      "is_admin": 0,
      "roles": [
        "0000000000000000000000000000000e",
        "11111111111111111111111111111113"
      ]
    }
  }
}

ConoHaにて提供しておりますAPIにつきましては、クラウド基盤として採用しておりますOpenStackの機能にて実装しておりますので、詳細な情報や使い方はOpenStackのドキュメントにてご確認ください。