FutureNet

NXR,VXRシリーズ

REST-API編

2. メンテナンス

2-17. デバッグタイマの実行(maint/debug)

 処理概要

デバッグタイマに関する処理を実行します。

 

URIおよびメソッド

機能 Version URI メソッド
POST PUT GET DELETE
debug v2 /api/v2/maint/debug
/api/v2/maint/debug/{TYPE}

凡例:

● : 読み取り専用ユーザも含めアクセス可

〇 : 読み取り専用ユーザはアクセス不可

- : 未対応

 

実行例

デバッグタイマの実行

メソッド URI
POST /api/v2/maint/debug

 

JSON
リクエスト

POST /api/v2/maint/debug
Accept: application/json
Content-Type: application/json

 

{
"type": "timer",
"id": 1,
"timeout": 30,
"interface": "ethernet1",
"action": "shutdown"
}

 

レスポンス

200 OK

 

XML
リクエスト

POST /api/v2/maint/debug
Accept: application/xml
Content-Type: application/xml

 

<config>
<type>timer</type>
<id>1</id>
<timeout>30</timeout>
<interface>ethernet1</interface>
<action>shutdown</action>
</config>

 

レスポンス

200 OK

 

デバッグタイマーの状況取得

メソッド URI
GET /api/v2/maint/debug/{TYPE}

 

TEXT/PLAIN
リクエスト

GET /api/v2/maint/debug/timer
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

NumCmdTimer 1
1 : interface ethernet 1 no shutdown (exec after 15secs)

 

デバッグタイマの実行停止

メソッド URI
DELETE /api/v2/maint/debug/{TYPE}
JSON
リクエスト

DELETE /api/v2/maint/debug/timer
Content-Type: application/json

 

{
"id": 1
}

 

レスポンス

204 No content

 

XML
リクエスト

DELETE /api/v2/maint/debug/timer
Content-Type: application/xml

 

<config>
<id>1</id>
</config>

 

レスポンス

204 No content

 

パラメータ

指定可能なパラメータは下記の通りです。

なお、指定可能なパラメータは製品およびファームウェアのバージョンにより異なりますので、各パラメータの詳細については各製品のユーザーズガイド(CLI版)も合わせてご参照ください。

  • パラメータ表の説明文中の記号について
    < > … 括弧内の値の範囲から選択することを示しています。
    [ ] … 括弧内の値のどれかを選択することを示しています。

 

パラメータおよびレベル 説明
Lv.1 Lv.2
config type タイプ … timer
id ID … <1-5>
timeout タイムアウト … <5-86400>(sec)
interface interface … [ ethernetX | pppX ]
※Xはインタフェース番号(ex. ppp0)
action アクション … 

  • ethernetX … [ no shutdown | shutdown ]
  • pppX … [ clear | connect | reconnect ]

※Xはインタフェース番号(ex. ppp0)