FutureNet

NXR,VXRシリーズ

REST-API編

11. IPv4/IPv6設定

11-3. IPset設定(ipset)

 処理概要

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

 

URIおよびメソッド

機能 Version URI メソッド
POST PUT GET DELETE
ipset v2 /api/v2/ipset
/api/v2/ipset/entry
/api/v2/ipset/entry/{SETNAME}

凡例:〇対応、-未対応

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

 

実行例

IPset名の作成

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

POST /api/v2/ipset/entry
Content-Type: application/json

 

{
"entry": {
"setname": "ipsetlist"
}
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/ipset/entry
Content-Type: application/xml

 

<ipset>
<entry>
<setname>ipsetlist</setname>
</entry>
</ipset>

 

レスポンス

201 Created

 

全IPset名の取得

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

GET /api/v2/ipset/entry
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"entry": [
{
"setname": "ipsetlist"
},
{
"setname": "ipsetlist2"
}
]
}

 

XML
リクエスト

GET /api/v2/ipset/entry
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<ipset>
<entry>
<setname>ipsetlist</setname>
</entry>
<entry>
<setname>ipsetlist2</setname>
</entry>
</ipset>

 

TEXT/PLAIN
リクエスト

GET /api/v2/ipset/entry
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

ipset setname ipsetlist file
ipset setname ipsetlist2 file

 

IPset名の取得

メソッド URI
GET /api/v2/ipset/entry/{SETNAME}
JSON
リクエスト

GET /api/v2/ipset/entry/ipsetlist
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"setname": "ipsetlist"
}

 

XML
リクエスト

GET /api/v2/ipset/entry/ipsetlist
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<entry>
<setname>ipsetlist</setname>
</entry>

 

TEXT/PLAIN
リクエスト

GET /api/v2/ipset/entry/ipsetlist
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

ipset setname ipsetlist file

 

IPset設定の削除

メソッド URI
DELETE /api/v2/ipset/entry/{SETNAME}

 

リクエスト

DELETE /api/v2/ipset/entry/ipsetlist

 

レスポンス

204 No content

 

パラメータ

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

 

パラメータおよびレベル 説明
Lv.1 Lv.2 Lv.3
ipset entry setname ipset名