Skip to content

Instantly share code, notes, and snippets.

@yukpiz
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukpiz/0268406f2979d8b30d54 to your computer and use it in GitHub Desktop.
Save yukpiz/0268406f2979d8b30d54 to your computer and use it in GitHub Desktop.

Conoha APIを試してみるメモ

1. 必要な情報
  • テナントID
  • 各APIごとのエンドポイント
  • APIユーザー名(ConohaアカウントではないAPIアカウント作成時に自動発行されるもの)
  • パスワード
2. トークンの取得
$ curl -i -X POST \
> -H "Accept: application/json" \
> -d '{
        "auth":
          {
            "passwordCredentials":
              {
                "username":"USERNAME",
                "password":"PASSWORD"
              },
            "tenantId":"TENANTID"
          }
      }' \
https://identity.tyo1.conoha.io/v2.0/tokens

HTTP/1.1 200 OK
Server: openresty/1.7.10.1
Date: Mon, 22 Jun 2015 03:50:15 GMT
Content-Type: application/json
Content-Length: 2452
Connection: keep-alive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment