FutureNet

NXR,VXRシリーズ

REST-API編

8. 各種サービス設定

8-26. DIO設定(dio)

処理概要

DIO設定に関する処理を実行します。

 

URIおよびメソッド

機能 Version URI メソッド
POST PUT GET DELETE
DIO v2 /api/v2/dio

凡例:〇対応、-未対応

  • api/v1は対応していません。

 

実行例

DIO設定の作成

メソッド URI
POST /api/v2/dio
JSON
リクエスト

POST /api/v2/dio
Content-Type: application/json

 

{
"di-list": {
"di": {
"number": 0,
"detection": {
"on-event": {
"event-check": "enable"
}
}
}
}
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/dio
Content-Type: application/xml

 

<dio>
<di-list>
<di>
<number>0</number>
<detection>
<on-event>
<event-check>enable</event-check>
</on-event>
</detection>
</di>
</di-list>
</dio>

 

レスポンス

201 Created

 

DIO設定の更新

メソッド URI
PUT /api/v2/dio
JSON
リクエスト

PUT /api/v2/dio
Content-Type: application/json

 

{
"di-list": {
"di": {
"number": 0,
"detection": {
"off-event": {
"event-check": "enable"
}
}
}
}
}

 

レスポンス

204 No content

 

XML
リクエスト

PUT /api/v2/dio
Content-Type: application/xml

 

<dio>
<di-list>
<di>
<number>0</number>
<detection>
<off-event>
<event-check>enable</event-check>
</off-event>
</detection>
</di>
</di-list>
</dio>

 

レスポンス

204 No content

 

DIO設定の取得

メソッド URI
GET /api/v2/dio
JSON
リクエスト

GET /api/v2/dio
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"di-list": {
"di": {
"number": 0,
"detection": {
"on-event": {
"event-check": "enable"
},
"off-event": {
"event-check": "enable"
}
}
}
}
}

 

XML
リクエスト

GET /api/v2/dio
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<dio>
<di-list>
<di>
<number>0</number>
<detection>
<on-event>
<event-check>enable</event-check>
</on-event>
<off-event>
<event-check>enable</event-check>
</off-event>
</detection>
</di>
</di-list>
</dio>

 

TEXT/PLAIN
リクエスト

GET /api/v2/dio
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

dio
input 0 detection on
input 0 detection off

 

DIO設定の削除

メソッド URI
DELETE /api/v2/dio
リクエスト

DELETE /api/v2/dio

 

レスポンス

204 No content

 

パラメータ

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

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

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

 

パラメータおよびレベル 説明
Lv.1 Lv.2 Lv.3 Lv.4 Lv.5 Lv.6 Lv.7
dio di-list di number DI番号 … <0-3>
debounce debouce時間 … <0-5000>(msec)
detection on-event event-check ONイベント検知 … [enable | disable]
event-notify number ens番号 … <0-1>
body メール送信本文
off-event event-check OFFイベント検知 … [enable | disable]
event-notify number ens番号 … <0-1>
body メール送信本文
do-list do number DO番号 … <0-1>
netevent trackid トラックID
action ネットイベントアクション … [on | off]