サーバ関連API

GET/server

サーバを検索・一覧を取得

POST/server

サーバを作成

パラメータ

名前 省略 説明
Server.Name string 不可 サーバ名
[Server.Description] string 説明
Server.ServerPlan.ID int 不可 サーバプランID
[Server.Icon.ID] int アイコンID
[Server.Tags] array タグ(文字列の配列)
[Server.ConnectedSwitches] array 接続するスイッチ。NICと同数の要素数を持つ配列で指定します。各要素は {"Scope":"shared"}(共有セグメント)、{"ID":"スイッチID"}(既存スイッチ)、null(未接続状態)のいずれかを指定しますが、共有セグメントへの接続は0番目の要素(eth0)のみ可能です。
[Server.InterfaceNum] int NIC数。すべて未接続のNICを作成する際、ConnectedSwitchesの代わりに指定します。

オブジェクト構造

アクセス キー バリデーション
読取 検索 書込 更新 必須 デフォルト 範囲
ID : int
Name : string 1~64文字
HostName : string 1~32文字
Description : string 空文字 512文字
ServiceClass : string
Icon.ID : int
ServerPlan.ID : int
ServerPlan.ServiceClass : string
ServerPlan.Availability : EAvailability
Zone.ID : int
Zone.Description : string
Zone.Region.Description : string
Zone.Region.NameServers : string
Instance.BeforeStatus : EServerInstanceStatus
Instance.StatusChangedAt : date
Instance.Host.Zone.Description : string
Instance.Host.Zone.Region.Description : string
Instance.Host.Zone.Region.NameServers : string
Instance.CDROM.Description : string
Instance.CDROM.Availability : EAvailability
Instance.CDROM.ServiceClass : string
Instance.CDROMStorage.Description : string
Instance.CDROMStorage.Zone.Description : string
Instance.CDROMStorage.Zone.Region.Description : string
Instance.CDROMStorage.Zone.Region.NameServers : string
Disks.Storage.MountIndex : int
Interfaces.IPAddress : ipaddress
Interfaces.UserIPAddress : ipaddress
Interfaces.HostName : string
Interfaces.Switch.ID : int
Interfaces.Switch.Name : string
Interfaces.Switch.Scope : EScope
Interfaces.Switch.Subnet.ID : int
Interfaces.Switch.Subnet.NetworkAddress : string
Interfaces.Switch.Subnet.NetworkMaskLen : int
Interfaces.Switch.Subnet.DefaultRoute : string
Interfaces.Switch.Subnet.Internet.BandWidthMbps : int
Interfaces.Switch.UserSubnet.DefaultRoute : string
Interfaces.Switch.UserSubnet.NetworkMaskLen : int
Interfaces.PacketFilter.ID : int
Interfaces.PacketFilter.Name : string
Interfaces.PacketFilter.Expression : json
Appliance.ID : int
Password : string 8~64文字

GET/server/:serverid

該当IDのサーバ情報を取得

PUT/server/:serverid

サーバ情報を更新

パラメータにあるもののみを上書き保存します。省略したパラメータは上書きされません。 プラン変更、ディスク接続関連、シャットダウンなどはそれぞれ専用のAPIをご使用ください。

パラメータ

名前 省略 説明
[Server.Name] string サーバ名
[Server.Description] string 説明
[Server.Tags] array タグ
[Server.Icon.ID] int アイコンID

DELETE/server/:serverid

該当IDのサーバを削除

{Force:true} を指定しない限りは、サーバが起動している間は削除できません。

パラメータ

名前 省略 説明
Force boolean 不可 強制停止してから削除するときtrue
WithDisk int|array 不可 ディスクも一緒に削除するとき、ディスクIDまたはその配列

GET/server/:serverid/cdrom

該当IDのサーバに挿入されたISOイメージの状態を取得

URLパラメータ

Name Comment
serverid サーバID

PUT/server/:serverid/cdrom

該当IDのサーバにISOイメージを挿入

URLパラメータ

Name Comment
serverid サーバID

DELETE/server/:serverid/cdrom

該当IDのサーバからISOイメージを排出

URLパラメータ

Name Comment
serverid サーバID

GET/server/:serverid/interface

該当IDのサーバが備えるインタフェースを取得

PUT/server/:serverid/keyboard

該当IDのサーバのキーボードを押下

複数キーを押す場合はKeysに配列を、単一キーを押す場合はKeyにスカラを指定してください。

URLパラメータ

Name Comment
serverid サーバID

パラメータ

名前 省略 説明
[Keys] array 押すキー(複数)
[Key] string 押すキー

GET/server/:serverid/monitor

該当IDのサーバのリソースモニタ情報を取得

拡張子に .png を付加して直接imgタグで表示できます。

URLパラメータ

Name Comment
serverid サーバID

パラメータ

名前 省略 説明
[Start] time 取得範囲の開始時刻(省略時は終了時刻の24時間前 または 現在時刻)
[End] time 取得範囲の終了時刻(省略時は開始時刻の24時間後)
[NoLegend] bool 凡例を非表示にするときtrue

PUT/server/:serverid/mouse/:mouseindex

該当IDのサーバのマウスを操作

URLパラメータ

Name Comment
serverid サーバID
mouseindex マウスの番号

パラメータ

名前 省略 説明
[X] int X座標
[Y] int Y座標
[Z] int ホイール
[Buttons.L] boolean 左ボタンの押下状態。Buttonsが指定されないときはボタンの状態は変化しない。
[Buttons.R] boolean 右ボタンの押下状態。Buttonsが指定されないときはボタンの状態は変化しない。
[Buttons.M] boolean 中ボタンの押下状態。Buttonsが指定されないときはボタンの状態は変化しない。

GET/server/:serverid/power

該当IDのサーバの起動状態を取得

URLパラメータ

Name Comment
serverid サーバID

PUT/server/:serverid/power

該当IDのサーバを起動

URLパラメータ

Name Comment
serverid サーバID

DELETE/server/:serverid/power

該当IDのサーバを停止、または強制停止

URLパラメータ

Name Comment
serverid サーバID

パラメータ

名前 省略 説明
[Force] boolean 強制停止するときtrue

PUT/server/:serverid/reset

該当IDのサーバのリセットボタンを押下

URLパラメータ

Name Comment
serverid サーバID

パラメータ

名前 省略 説明
RecycleProcess boolean 不可 プロセスを最利用するときtrue

GET/server/:serverid/tag

該当IDのサーバに付けられたタグを取得

PUT/server/:serverid/tag

該当IDのサーバに付けられるタグを変更

PUT/server/:serverid/to/plan/:planid

該当IDのサーバのプランを変更

起動中のサーバのプランを変更することはできません。 ※プラン変更を行うとServer.IDが変わります。

URLパラメータ

Name Comment
serverid サーバID
planid サーバプランID

GET/server/:serverid/vnc/proxy

該当IDのサーバのVNCプロクシ情報を取得

拡張子に .vnc を付加してVNCファイルをダウンロードできます。(VNCビューワと関連付けておくと便利です)。

URLパラメータ

Name Comment
serverid サーバID

GET/server/:serverid/vnc/size

該当IDのサーバの現在の画面サイズを取得

URLパラメータ

Name Comment
serverid サーバID

GET/server/:serverid/vnc/snapshot

該当IDのサーバのVNCスナップショットを取得

拡張子に .gif を付加して画像ファイルをダウンロードできます。

URLパラメータ

Name Comment
serverid サーバID

パラメータ

名前 省略 説明
[ScreenSaverExitTimeMS] int CapsLockキーを2回押すことによりスクリーンセーバを中断する場合の待ち時間[ミリ秒](ゲストOSの状態により復帰に時間がかかる場合は復帰後の画面を取得できないことに注意)

GET/server/tag

サーバタグ一覧を取得