バリュードメインAPIドキュメント:サーバー編 (1.0.0)

Download OpenAPI specification:Download

概要

このAPIを使用することで、お客様のシステムからバリュードメインの機能を利用することができます。

API認証

このAPIはBearer認証で保護されています。予めトークンを発行しAuthorizationヘッダーに付与してAPIを利用いたします。

Authorization: Bearer <token>

APIの利用

エンドポイント:https://api.value-domain.com/v1/

HTTPプロトコルのGET,POST,PUT,DELETEメソッドでレスポンスを送信します。

サーバーの説明について

ドキュメントに「サーバー」と記載があるものは、「Xrea」「コアサーバー」「バリューサーバー」
全てに共通いたします。
リクエストURLは全て「coreservers」と記載がありますが、
xreaの場合は「xreas」
バリューサーバーの場合は「valueservers」
に変更し、ご利用ください。

Ex)
サーバー一覧の取得

コアサーバー
GET /coreservers
xrea
GET /xreas
バリューサーバー
GET /valueservers

Authentication

bearerAuth

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

サーバー

サーバーの構築・契約内容の変更

サーバーの取得

リクエスト

GET /coreservers/{webid}

概要

サーバーの取得

  • webidは「サーバー一覧の取得API」から取得します
    webidとwebnameのどちらでも指定可能
Authorizations:
path Parameters
webid
required
integer

webidは「サーバー一覧の取得API」から取得します
webidとwebnameのどちらでも指定可能

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal Server Error

503

Service Unavailable

504

GatewayTimeout

get /coreservers/{webid}

API本番用

https://api.value-domain.com/v1/coreservers/{webid}

Request samples

Copy
$apikey = 'Your APIKEY';

$url = "https://api.value-domain.com/v1";
$path = "/servers";
$method = "GET";
$postfields = array();
$post_query = json_encode($postfields);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . $path);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
if ($method!=='GET') {
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_query);
  curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);//FIXME use http version 1.1
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);

$headers = array();
$headers[] = "Content-Type: application/json";
if ($method!=='GET') {
  $headers[] = 'Content-Length: ' . strlen($post_query);
}
$headers[] = 'Authorization: Bearer ' . $apikey;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
if (curl_errno($ch)) {
  echo 'Connection Error: ' . curl_errno($ch) . ' - ' . curl_error($ch);exit;
}
$info = curl_getinfo($ch);

curl_close($ch);

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "results":
    {
    },
  • "request_id": "201906131050131180020324028V"
}

サーバー一覧の取得

リクエスト

GET /coreservers

概要

サーバーの一覧取得

Authorizations:
query Parameters
limit
integer

取得件数

page
integer

ページ番号

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal Server Error

503

Service Unavailable

504

GatewayTimeout

get /coreservers

API本番用

https://api.value-domain.com/v1/coreservers

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "paging":
    {
    },
  • "results":
    [
    ],
  • "request_id": "201906131050131180020324028V"
}

サーバーの構築

リクエスト

POST /coreservers

概要

サーバーの構築を行う

Authorizations:
Request Body schema: application/json

サーバー情報

webname
required
string

サーバーアカウント
(e.g. example@b11.coreserver.jp)

domainname
string

初期設定を行うドメイン名
(e.g. example.com)

www_flg
integer

ドメイン名にwwwをつけるか
(e.g. 1)

wp_flg
integer

WordPressの初期インストールを行うか
(e.g. 0)

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal Server Error

503

Service Unavailable

504

GatewayTimeout

post /coreservers

API本番用

https://api.value-domain.com/v1/coreservers

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "webname": "example@b11.coreserver.jp",
  • "domainname": "example.com",
  • "www_flg": "1",
  • "wp_flg": "0"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "results":
    {
    },
  • "request_id": "201906131050131180020324028V"
}

サーバー/有効期限

サーバー有効期限の確認と変更(延長)

サーバーの有効期限一覧の取得

リクエスト

GET /coreservers/expiration

概要

サーバーの有効期限一覧の取得

Authorizations:
query Parameters
limit
integer

取得件数

page
integer

ページ番号

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal Server Error

503

Service Unavailable

504

GatewayTimeout

get /coreservers/expiration

API本番用

https://api.value-domain.com/v1/coreservers/expiration

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "paging":
    {
    },
  • "results":
    [
    ],
  • "request_id": "201906131050131180020324028V"
}

サーバー有効期限の取得

リクエスト

GET /coreservers/{webid}/expiration

概要

サーバー有効期限の取得

  • webidは「サーバー一覧の取得API」から取得します
    webidとwebnameのどちらでも指定可能
Authorizations:
path Parameters
webid
required
integer

webidは「サーバー一覧の取得API」から取得します
webidとwebnameのどちらでも指定可能

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal Server Error

503

Service Unavailable

504

GatewayTimeout

get /coreservers/{webid}/expiration

API本番用

https://api.value-domain.com/v1/coreservers/{webid}/expiration

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "results":
    {
    },
  • "request_id": "201906131050131180020324028V"
}

サーバーの有効期限の変更(延長)

リクエスト

PUT /coreservers/{webid}/expiration

概要

サーバーの有効期限の変更を行う

  • webidは「サーバー一覧の取得API」から取得します
    webidとwebnameのどちらでも指定可能
Authorizations:
path Parameters
webid
required
integer

webidは「サーバー一覧の取得API」から取得します
webidとwebnameのどちらでも指定可能

Request Body schema: application/json

有効期限

months
integer

有効期限
(e.g. 1)

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal Server Error

503

Service Unavailable

504

GatewayTimeout

put /coreservers/{webid}/expiration

API本番用

https://api.value-domain.com/v1/coreservers/{webid}/expiration

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "months": 1
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "results":
    {
    },
  • "request_id": "201906131050131180020324028V"
}

サーバー/自動更新

サーバー自動更新の確認と変更

サーバー自動更新一覧の取得

リクエスト

GET /coreservers/autorenew

概要

サーバー自動更新一覧の取得を行う

Authorizations:
query Parameters
limit
integer

取得件数

page
integer

ページ番号

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal Server Error

503

Service Unavailable

504

GatewayTimeout

get /coreservers/autorenew

API本番用

https://api.value-domain.com/v1/coreservers/autorenew

Response samples