FutureNet

NXR,VXRシリーズ

REST-API編

12. システム設定

12-6. Event Notification設定(ens)

 処理概要

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

 

URIおよびメソッド

機能 Version URI メソッド
POST PUT GET DELETE
Event
Notification
Service
v2 /api/v2/ens
/api/v2/ens/notify-list
/api/v2/ens/notify-list/{NUM}

凡例:〇対応、-未対応

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

 

実行例

Event Notification設定の作成

メソッド URI
POST /api/v2/ens/notify-list
JSON
リクエスト

POST /api/v2/ens/notify-list
Content-Type: application/json

 

{
"notify-list": {
"number": 1,
"notify": {
"method": "line",
"option": {
"index": "test"
},
"auth": {
"method": "bearer",
"account": {
"password": {
"passphrase": "1234567890abc"
}
}
}
}
}
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/ens/notify-list
Content-Type: application/xml

 

<ens>
<notify-list>
<number>1</number>
<notify>
<method>line</method>
<option>
<index>test</index>
</option>
<auth>
<method>bearer</method>
<account>
<password>
<passphrase>1234567890abc</passphrase>
</password>
</account>
</auth>
</notify>
</notify-list>
</ens>

 

レスポンス

201 Created

 

全Event Notification設定の取得

メソッド URI
GET /api/v2/ens/notify-list
JSON
リクエスト

GET /api/v2/ens/notify-list
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"notify-list": [
{
"number": 1,
"notify": {
"method": "line",
"option": {
"index": "test"
},
"auth": {
"method": "bearer",
"account": {
"password": {
"passphrase": "1234567890abc"
}
}
}
}
},
{
"number": 2,
・・・・・

 

XML
リクエスト

GET /api/v2/ens/notify-list
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<ens>
<notify-list>
<number>1</number>
<notify>
<method>line</method>
<option>
<index>test</index>
</option>
<auth>
<method>bearer</method>
<account>
<password>
<passphrase>1234567890abc</passphrase>
</password>
</account>
</auth>
</notify>
</notify-list>
<notify-list>
<number>2</number>
・・・・・

 

TEXT/PLAIN
リクエスト

GET /api/v2/ens/notify-list
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

ens 1
line test authorization bearer token 1234567890abc
ens 2
・・・・・

 

Event Notification設定の更新

メソッド URI
PUT /api/v2/ens/notify-list/{NUM}
JSON
リクエスト

PUT /api/v2/ens/notify-list/1
Content-Type: application/json

 

{
"number": 1,
"notify": {
"method": "line",
"option": {
"index": "testens"
},
"auth": {
"method": "bearer",
"account": {
"password": {
"passphrase": "abc1234567890"
}
}
}
}
}

 

レスポンス

204 No content

 

XML
リクエスト

PUT /api/v2/ens/notify-list/1
Content-Type: application/xml

 

<notify-list>
<number>1</number>
<notify>
<method>line</method>
<option>
<index>testens</index>
</option>
<auth>
<method>bearer</method>
<account>
<password>
<passphrase>abc1234567890</passphrase>
</password>
</account>
</auth>
</notify>
</notify-list>

 

レスポンス

204 No content

 

Event Notification設定の取得

メソッド URI
GET /api/v2/ens/notify-list/{NUM}
JSON
リクエスト

GET /api/v2/ens/notify-list/1
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"number": 1,
"notify": {
"method": "line",
"option": {
"index": "testens"
},
"auth": {
"method": "bearer",
"account": {
"password": {
"passphrase": "abc1234567890"
}
}
}
}
}

 

XML
リクエスト

GET /api/v2/ens/notify-list/1
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<notify-list>
<number>1</number>
<notify>
<method>line</method>
<option>
<index>testens</index>
</option>
<auth>
<method>bearer</method>
<account>
<password>
<passphrase>abc1234567890</passphrase>
</password>
</account>
</auth>
</notify>
</notify-list>

 

TEXT/PLAIN
リクエスト

GET /api/v2/ens/notify-list/1
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

ens 1
line testens authorization bearer token abc1234567890

 

Event Notification設定の削除

メソッド URI
DELETE /api/v2/ens/notify-list/{NUM}
リクエスト

DELETE /api/v2/ens/notify-list/1

 

レスポンス

204 No content

 

パラメータ

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

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

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

 

パラメータおよびレベル 説明
Lv.1 Lv.2 Lv.3 Lv.4 Lv.5 Lv.6 Lv.7
ens notify-list number ens番号 … <0-3>
notify method notify通知方法 … [line | mail]
option server メールサーバ指定 … <0-2>
to 宛先メールアドレス
from 送信元メールアドレス
subject 件名
index 定義名
auth method 認証方式 … bearer
account password hidden 暗号化 … [enable | disable]
pass-phrase パスワード
apply 暗号化適用 … [enable | disable]
※hidden化する場合は必要