Wave for Reseller

リセラーのAPIリファレンスは以下の通りです。

Create reseller account

リセラーアカウントの発行

Role actions

  • ModifyReseller

Request

POST /reseller HTTP1.1
Authorization: Bearer {token}
Content-Type: application/json

{request body}

以下に{request body}のリクエストペイロードの例を示します。

{request body}

{
  "email":"alphaus-cloud@alphaus.cloud",
  "company_id":"company1",
  "input_type":"Auto",
  "notification":true,
  "password":null
}

request body description

Response

HTTP 200

{
  "status":"success"
}

Pythonでのサンプル

import requests
import json

def get_token():
    # Note: you can see details https://docs.alphaus.cloud/v/api-reference/authentication
    # Assign generated values for client_id and client_secret
    params={
        "grant_type": "client_credentials",
        "client_id": "{client_id}",
        "client_secret": "{client_secret}",
        "scope": "openid",
    }
    try:
        response = requests.post(
            url="https://login.alphaus.cloud/ripple/access_token",
            headers={
            },
            params=params,
            files=params,
        )
    except requests.exceptions.RequestException:
        print('HTTP Request failed')

    r = response.json()
    return r['access_token'], r["token_type"]

def send_request(type, token):
    # Authorization header
    auth = type + " " + token
    try:
        response = requests.post(
            url="https://api.alphaus.cloud/m/ripple/reseller",
            headers={
                "Content-Type": "application/json;",
                "Authorization": auth
            },
            data=json.dumps({
                "email": "reseller@waveresellersample.cloud",
                "notification": True,
                "meta": {
                    "usage_report_download": True,
                    "usage_account_menu_fees_fee": False,
                    "ri_utilization": False,
                    "usage_account_menu_account_edit": False,
                    "usage_account": True,
                    "usage_account_graph": True,
                    "usage_tag_graph": True,
                    "usage_account_menu_fees_refund": False,
                    "invoice_download_csv_merged": False,
                    "invoice_download_csv_discount": False,
                    "usage_account_menu_fees_other_fees": False,
                    "usage_account_menu_fees_credit": False,
                    "ri_purchased": False,
                    "open_api": False,
                    "dashboard_graph": True,
                    "usage_group": True,
                    "report_filters": False,
                    "usage_tag": True,
                    "ri_recommendation": False,
                    "invoice": False,
                    "usage_crosstag_graph": True,
                    "users_management": False,
                    "usage_account_menu_budget": False,
                    "usage_account_menu_budget_edit": False,
                    "usage_group_graph": True,
                    "usage_crosstag": True,
                    "aq_coverage_ratio": False,
                    "aq_sp_management": False,
                    "aq_right_sizing": False,
                    "aq_ri_sp_instances": False,
                    "aq_ri_management": False,
                    "sp_purchased": False,
                    "aq_scheduling": False,
                    "aqua_link": False
                },
                "company_id": "{company_id}",
                "input_type": "Auto"
            })
        )
        print('Response HTTP Status Code: {status_code}'.format(
            status_code=response.status_code))
        print('Response HTTP Response Body: {content}'.format(
            content=response.content))
    except requests.exceptions.RequestException:
        print('HTTP Request failed')

access_token, token_type = get_token()
send_request(token_type, access_token)

Get reseller account list

リセラーアカウントの取得

Role actions

  • ReadReseller

  • ModifyReseller

Request

POST /reseller HTTP1.1
Authorization: Bearer {token}

Response

HTTP 200

[
  {
    "user_id":"userid1",
    "billinggroup_id":"billing1",
    "billinggroup_name":"billingname1",
    "email":"alphaus-cloud@alphaus.cloud",
    "company_id":"company1",
    "update_time":null,
    "password_update_time":null,
    "wave_registered":"2020-01-01T10:00:00+09:00",
    "meta": {
      "aq_coverage_ratio":false
      "aq_ri_management":false
      "aq_ri_sp_instances":false
      "aq_right_sizing":false
      "aq_scheduling":false
      "aq_sp_management":false
      "dashboard_graph":true
      "usage_account":true
      "usage_account_graph":true
      "usage_account_menu_account_edit":false
      "usage_account_menu_budget":false
      "usage_account_menu_budget_edit":false
      "usage_account_menu_fees_fee":false
      "usage_account_menu_fees_credit":false
      "usage_account_menu_fees_refund":false
      "usage_account_menu_fees_other_fees":false
      "usage_report_download":true
      "usage_group":true
      "usage_group_graph":true
      "usage_tag":true
      "usage_tag_graph":true
      "usage_crosstag":true
      "usage_crosstag_graph":true
      "ri_purchased":true
      "ri_utilization":false
      "ri_recommendation":false
      "sp_purchased":false
      "invoice":false
      "invoice_download_csv_discount":false
      "invoice_download_csv_merged":false
      "open_api":false
      "users_management":false
      "report_filters":false
    }
  },
  ...
]

Delete reseller account

リセラーアカウントの削除

Role actions

  • ModifyReseller

Request

DELETE /reseller/{user_id} HTTP1.1
Authorization: Bearer {token}

{user_id}

リセラーアカウントのidを指定する

Response

HTTP 200

{
  "status":"success"
}

Update password for reseller account

リセラーアカウントパスワードの変更

Role actions

  • ModifyReseller

Request

PUT /reseller/{user_id}/password HTTP1.1
Authorization: Bearer {token}
Content-Type: application/json

{request body}

{user_id}

リセラーアカウントのidを指定する

以下に{request body}のリクエストペイロードの例を示します。

{request body}

{
  "input_type":"Auto",
  "notification":true,
  "password":null
}

request body description

Response

HTTP 200

{
  "status":"success"
}

Update meta for reseller account

リセラーアカウントメタ情報の変更

Role actions

  • ModifyReseller

Request

PUT /reseller/{user_id}/meta HTTP1.1
Authorization: Bearer {token}
Content-Type: application/json

{request body}

{user_id}

リセラーアカウントのidを指定する

以下に{request body}のリクエストペイロードの例を示します。

{request body}

{
  "meta": {
      "aq_coverage_ratio":false
      "aq_ri_management":false
      "aq_ri_sp_instances":false
      "aq_right_sizing":false
      "aq_scheduling":false
      "aq_sp_management":false
      "dashboard_graph":true
      "usage_account":true
      "usage_account_graph":true
      "usage_account_menu_account_edit":false
      "usage_account_menu_budget":false
      "usage_account_menu_budget_edit":false
      "usage_account_menu_fees_fee":false
      "usage_account_menu_fees_credit":false
      "usage_account_menu_fees_refund":false
      "usage_account_menu_fees_other_fees":false
      "usage_report_download":true
      "usage_group":true
      "usage_group_graph":true
      "usage_tag":true
      "usage_tag_graph":true
      "usage_crosstag":true
      "usage_crosstag_graph":true
      "ri_purchased":true
      "ri_utilization":false
      "ri_recommendation":false
      "sp_purchased":false
      "invoice":false
      "invoice_download_csv_discount":false
      "invoice_download_csv_merged":false
      "open_api":false
      "users_management":false
      "report_filters":false
    }
}

request body description

Response

HTTP 200

{
  "status":"success"
}

meta

metaのリストを示します。

Defaultはリセラーアカウントを発行する際に設定されるデフォルトの設定です。

Last updated