Download OpenAPI specification:Download
このAPIはBearer認証で保護されています。予めトークンを発行しAuthorizationヘッダーに付与してAPIを利用いたします。
Authorization: Bearer <token>
エンドポイント: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
GET /coreservers/{webid}
サーバーの取得
webid required | integer webidは「サーバー一覧の取得API」から取得します |
Success
Bad Request
Unauthorized
Forbidden
Not found
Internal Server Error
Service Unavailable
GatewayTimeout
API本番用
$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);
{- "results": {
- "webid": "123456",
- "webname": "example@b11.coreserver.jp",
- "paid": "1",
- "starttime": "2020-04-02",
- "expirationdate": "2020-04-02",
- "autorenew": 1,
- "autorenew_all": 10,
- "autorenew_server": 10,
- "plan": "CORE-B"
}, - "request_id": "201906131050131180020324028V"
}
GET /coreservers
サーバーの一覧取得
limit | integer 取得件数 |
page | integer ページ番号 |
Success
Bad Request
Unauthorized
Forbidden
Not found
Internal Server Error
Service Unavailable
GatewayTimeout
API本番用
{- "paging": {
- "max": 100,
- "page": 1,
- "limit": 10
}, - "results": [
- {
- "webid": "123456",
- "webname": "example@b11.coreserver.jp",
- "paid": "1",
- "starttime": "2020-04-02",
- "expirationdate": "2020-04-02",
- "autorenew": 1,
- "autorenew_all": 10,
- "autorenew_server": 10,
- "plan": "CORE-B"
}
], - "request_id": "201906131050131180020324028V"
}
POST /coreservers
サーバーの構築を行う
サーバー情報
webname required | string サーバーアカウント |
domainname | string 初期設定を行うドメイン名 |
www_flg | integer ドメイン名にwwwをつけるか |
wp_flg | integer WordPressの初期インストールを行うか |
Success
Bad Request
Unauthorized
Forbidden
Not found
Internal Server Error
Service Unavailable
GatewayTimeout
API本番用
{- "webname": "example@b11.coreserver.jp",
- "domainname": "example.com",
- "www_flg": "1",
- "wp_flg": "0"
}
{- "results": {
- "webid": "123456",
- "webname": "example@b11.coreserver.jp",
- "paid": "1",
- "starttime": "2020-04-02",
- "expirationdate": "2020-04-02",
- "autorenew": 1,
- "autorenew_all": 10,
- "autorenew_server": 10,
- "plan": "CORE-B"
}, - "request_id": "201906131050131180020324028V"
}
GET /coreservers/expiration
サーバーの有効期限一覧の取得
limit | integer 取得件数 |
page | integer ページ番号 |
Success
Bad Request
Unauthorized
Forbidden
Not found
Internal Server Error
Service Unavailable
GatewayTimeout
API本番用
{- "paging": {
- "max": 100,
- "page": 1,
- "limit": 10
}, - "results": [
- {
- "webid": "123456",
- "webname": "example@b11.coreserver.jp",
- "expirationdate": "2020-04-02"
}
], - "request_id": "201906131050131180020324028V"
}
GET /coreservers/{webid}/expiration
サーバー有効期限の取得
webid required | integer webidは「サーバー一覧の取得API」から取得します |
Success
Bad Request
Unauthorized
Forbidden
Not found
Internal Server Error
Service Unavailable
GatewayTimeout
API本番用
{- "results": {
- "webid": "123456",
- "webname": "example@b11.coreserver.jp",
- "expirationdate": "2020-04-02"
}, - "request_id": "201906131050131180020324028V"
}
PUT /coreservers/{webid}/expiration
サーバーの有効期限の変更を行う
webid required | integer webidは「サーバー一覧の取得API」から取得します |
有効期限
months | integer 有効期限 |
Success
Bad Request
Unauthorized
Forbidden
Not found
Internal Server Error
Service Unavailable
GatewayTimeout
API本番用
{- "months": 1
}
{- "results": {
- "webid": "123456",
- "webname": "example@b11.coreserver.jp",
- "expirationdate": "2020-04-02"
}, - "request_id": "201906131050131180020324028V"
}
GET /coreservers/autorenew
サーバー自動更新一覧の取得を行う
limit | integer 取得件数 |
page | integer ページ番号 |
Success
Bad Request
Unauthorized
Forbidden
Not found
Internal Server Error
Service Unavailable
GatewayTimeout
API本番用