ルータ

このセクションでは、ルータでサポートされている以下の操作について説明します。
nfa1000
このセクションでは、ルータでサポートされている以下の操作について説明します。
ルータの編集 - 単一
リソース URI
http://<
nfa odata host
>:<
nfa odata port
>/odata/api/routers(
PropertyRef Name value
)
メソッド
PATCH
ペイロード
{
"snmpVersion": <
snmp version value
>,
"snmpPort": <
snmp port
value
>,
"routerName": "<
Router name>
",
"templateId": <
template ID value
>
"domainID": <domain
ID value
>
"profileId": <profile ID value>
}
  • 有効な snmpVersion 値は 1、2、または 3 です。
  • 1 以上のテンプレート ID を入力します。
サンプル リクエスト
http://127.0.0.1:8981/odata/api/routers(1500004)
サンプル ペイロード
{
"snmpVersion": 2,
"snmpPort": 123,
"routerName": "127.0.0.1",
"templateId": 5
"domainID": 1
"profileId": 5
}
サンプル レスポンス
この API に対するレスポンスはありません。
ルータの編集 - 一括
この API を使用すると、同じプロパティを持つ複数のエンティティの値を一度に更新できます。
リソース URI
http://<nfa odata host>:<nfa odata port>/odata/api/routers/com.ca.nfa.odata.editRouters
メソッド
POST
ペイロード
"RouterIds":[<Enter the list of Router_IDs separated by a comma>],
"snmpVersion": <snmp version value>,
"snmpPort" : <snmp port value>,
"templateId" : <template id value>,
"profileId" : <profile id value>
"domainID" : <domain id value>
}
有効な snmpVersion 値は 1、2、または 3 です。
サンプル リクエスト
http://127.0.0.1:8981/odata/api/routers/com.ca.nfa.odata.editRouters
サンプル ペイロード
{
"RouterIds": [1500012,1500013],
"snmpVersion": 3,
"snmpPort": 1654,
"templateId": 1,
"profileId": 4,
"domainID" :1
}
サンプル レスポンス
{
"@odata.context": "$metadata#Collection(com.ca.nfa.odata.router)",
"value": [
{
"ID": 1500012,
"routerAddress": "127.0.0.1",
"sysDescr": "127.0.0.1",
"sysName": "",
"deviceName": "127.0.0.1",
"deviceAlias": "127.0.0.1",
"sysUptime": 0,
"lastData": 0,
"lastReboot": 0,
"lastRefresh": 0,
"lastDiscovery": 0,
"lastHarvesterUpdate": 0,
"firstPollError": 0,
"nextPollRetry": 0,
"harvesterID": 1,
"profileId": 4,
"snmpVersion": 3,
"snmpPort": 1654,
"snmpTimeout": 3,
"snmpRetry": 3,
"snmpMaxRows": 10,
"ifNumber": 0,
"interfaceCount": 10,
"agentCount": 10,
"dnsLastLookupTime": 1556273867,
"dnsExpireTime": 1556878667,
"syncUpdateTime": 0,
"routerName": null,
"routerUpdatedOn": 1556273741,
"templateId": 1,
"snmpProxyAddress": "127.0.0.1",
"dnsProxyAddress": "127.0.0.1",
"tenantId": 8,
"domainID": 1
},
{
"ID": 1500013,
"routerAddress": "127.0.0.1",
"sysDescr": "127.0.0.1",
"sysName": "",
"deviceName": "127.0.0.1",
"deviceAlias": "127.0.0.1",
"sysUptime": 0,
"lastData": 0,
"lastReboot": 0,
"lastRefresh": 0,
"lastDiscovery": 0,
"lastHarvesterUpdate": 0,
"firstPollError": 0,
"nextPollRetry": 0,
"harvesterID": 1,
"profileId": 0,
"snmpVersion": 2,
"snmpPort": 161,
"snmpTimeout": 3,
"snmpRetry": 3,
"snmpMaxRows": 10,
"ifNumber": 0,
"interfaceCount": 10,
"agentCount": 13,
"dnsLastLookupTime": 1556273867,
"dnsExpireTime": 1556878667,
"syncUpdateTime": 0,
"routerName": null,
"routerUpdatedOn": 1556273741,
"templateId": 1,
"snmpProxyAddress": "127.0.0.1",
"dnsProxyAddress": "127.0.0.1",
"tenantId": 8,
"domainID": 1
}
]
}
ルータの有効化 - 単一
リソース URI
http://<
nfa odata host
>:<
nfa odata port
>/odata/api/routers(<
routerID Value
>)/com.ca.nfa.odata.enableRouter
メソッド
POST
サンプル リクエスト
http://127.0.0.1:8981/odata/api/routers(1500002)/com.ca.nfa.odata.enableRouter
サンプル レスポンス
{
"@odata.context": "$metadata#com.ca.nfa.odata.router",
"ID": 1500002,
"routerAddress": "127.0.0.1",
"sysDescr": "127.0.0.1",
"sysName": "",
"deviceName": "127.0.0.1",
"deviceAlias": "127.0.0.1",
"sysUptime": 0,
"lastData": 0,
"lastReboot": 0,
"lastRefresh": 0,
"lastDiscovery": 1552995238,
"lastHarvesterUpdate": 0,
"firstPollError": 0,
"nextPollRetry": 0,
"harvesterID": 2,
"profileId": 4,
"snmpVersion": 2,
"snmpPort": 161,
"snmpTimeout": 3,
"snmpRetry": 3,
"snmpMaxRows": 10,
"ifNumber": 0,
"interfaceCount": 10,
"agentCount": 10,
"dnsLastLookupTime": 1556194180,
"dnsExpireTime": 1556798980,
"syncUpdateTime": 0,
"routerName": null,
"routerUpdatedOn": 1552995238,
"templateId": 1,
"snmpProxyAddress": "127.0.0.1",
"dnsProxyAddress": "127.0.0.1",
"tenantId": 8,
"domainID": 1
}
ルータの有効化 - 一括
リソース URI
http://<
nfa odata host
>:<
nfa odata port
>/odata/api/routers/com.ca.nfa.odata.enableRouters
メソッド
POST
ペイロード
"RouterIds":[<
List of Router_ids separated by a comma
>
サンプル リクエスト
http://127.0.0.1:8981/odata/api/routers/com.ca.nfa.odata.enableRouters
サンプル ペイロード
"RouterIds":[1554235706, 1554840506, 1553025868]
サンプル レスポンス
{
"@odata.context": "$metadata#Collection(com.ca.nfa.odata.router)",
"value": [
{
"ID": 1500001,
"routerAddress": "127.0.0.1",
"sysDescr": "127.0.0.1",
"sysName": "",
"deviceName": "127.0.0.1",
"deviceAlias": "127.0.0.1",
"sysUptime": 0,
"lastData": 0,
"lastReboot": 0,
"lastRefresh": 0,
"lastDiscovery": 0,
"lastHarvesterUpdate": 0,
"firstPollError": 0,
"nextPollRetry": 0,
"harvesterID": 1,
"profileId": 0,
"snmpVersion": 2,
"snmpPort": 161,
"snmpTimeout": 3,
"snmpRetry": 3,
"snmpMaxRows": 10,
"ifNumber": 0,
"interfaceCount": 10,
"agentCount": 10,
"dnsLastLookupTime": 1554235706,
"dnsExpireTime": 1554840506,
"syncUpdateTime": 0,
"routerName": null,
"routerUpdatedOn": 1553025868,
"templateId": 1,
"snmpProxyAddress": "127.0.0.1",
"dnsProxyAddress": "127.0.0.1",
"tenantId": 8,
"domainID": 1
}
]
}
ルータの無効化 - 単一
リソース URI
http://<
nfa odata host
>:<
nfa odata port
>/odata/api/routers(<
routerID value
>)/com.ca.nfa.odata.disableRouter
メソッド
POST
サンプル リクエスト
http://127.0.0.1:8981/odata/api/routers(1500002)/com.ca.nfa.odata.disableRouter
サンプル レスポンス
{
"@odata.context": "$metadata#com.ca.nfa.odata.router",
"ID": 1500002,
"routerAddress": "127.0.0.1",
"sysDescr": "127.0.0.1",
"sysName": "",
"deviceName": "127.0.0.1",
"deviceAlias": "127.0.0.1",
"sysUptime": 0,
"lastData": 0,
"lastReboot": 0,
"lastRefresh": 0,
"lastDiscovery": 1552995238,
"lastHarvesterUpdate": 0,
"firstPollError": 0,
"nextPollRetry": 0,
"harvesterID": 2,
"profileId": 4,
"snmpVersion": 2,
"snmpPort": 161,
"snmpTimeout": 3,
"snmpRetry": 3,
"snmpMaxRows": 10,
"ifNumber": 0,
"interfaceCount": 10,
"agentCount": 10,
"dnsLastLookupTime": 1556194180,
"dnsExpireTime": 1556798980,
"syncUpdateTime": 0,
"routerName": null,
"routerUpdatedOn": 1552995238,
"templateId": 1,
"snmpProxyAddress": "127.0.0.1",
"dnsProxyAddress": "127.0.0.1",
"tenantId": 8,
"domainID": 1
}
ルータの無効化 - 一括
サンプル URI
http://<
nfa odata host
>:<
nfa odata port
>/odata/api/routers/com.ca.nfa.odata.disableRouters
メソッド
POST
ペイロード
"RouterIds":[<
List of router_ids separated by a comma
>]
サンプル リクエスト
http://127.0.0.1:8981/odata/api/routers/com.ca.nfa.odata.disableRouters
サンプル ペイロード
"RouterIds":[150032,123894,222891,100034]
サンプル レスポンス
{
"@odata.context": "$metadata#Collection(com.ca.nfa.odata.router)",
"value": [
{
"ID": 1500001,
"routerAddress": "127.0.0.1",
"sysDescr": "127.0.0.1",
"sysName": "",
"deviceName": "127.0.0.1",
"deviceAlias": "127.0.0.1",
"sysUptime": 0,
"lastData": 0,
"lastReboot": 0,
"lastRefresh": 0,
"lastDiscovery": 0,
"lastHarvesterUpdate": 0,
"firstPollError": 0,
"nextPollRetry": 0,
"harvesterID": 1,
"profileId": 0,
"snmpVersion": 2,
"snmpPort": 161,
"snmpTimeout": 3,
"snmpRetry": 3,
"snmpMaxRows": 10,
"ifNumber": 0,
"interfaceCount": 10,
"agentCount": 10,
"dnsLastLookupTime": 1554235706,
"dnsExpireTime": 1554840506,
"syncUpdateTime": 0,
"routerName": null,
"routerUpdatedOn": 1553025868,
"templateId": 1,
"snmpProxyAddress": "127.0.0.1",
"dnsProxyAddress": "127.0.0.1",
"tenantId": 8,
"domainID": 1
}
]
}
ルータの削除 - 単一
この API を使用すると、単一のルータを削除できます。
リソース URI
http://<
nfa odata host>:<nfa odata port>
/odata/api/routers(<
router_id
>)
メソッド
DELETE
HTTP ヘッダ
Content-Type:application/json; odata.metadata=minimal
パラメータ
以下の表には、必須パラメータが含まれています。
パラメータ
説明
router_id
ルータ エンティティ セットから削除するルータ ID を指定します。
サンプル リクエスト
以下のリクエストは、ルータ ID 1500002 の削除アクションを示しています。
http://127.0.0.1:8981/odata/api/routers(1500002)
サンプル レスポンス
この API に対するレスポンスはありません。
ルータの削除 - 一括
以下のコードは、ルータの一括削除アクションの参照メタデータ セクションです。
リソース URI
http://<
nfa odata host>:<nfa odata port>
/odata/api/routers/com.ca.nfa.odata.deleteRouters
メソッド
POST
ペイロード
"RouterIds":[1500008,1500009]
サンプル リクエスト
以下のリクエストは、ルータ エンティティを一括で削除するための削除アクションを示しています。
http://127.0.0.1:8080/odata/api/routers/com.ca.nfa.odata.deleteRouters
サンプル ペイロード
"RouterIds":[150032,123894,222891,100034]
サンプル レスポンス
{
"@odata.context": "$metadata#Collection(com.ca.nfa.odata.router)",
"value": [
{
"ID": 1500008,
"routerAddress": "127.0.0.1",
"sysDescr": "127.0.0.1",
"sysName": "",
"deviceName": "127.0.0.1",
"deviceAlias": "127.0.0.1",
"sysUptime": 0,
"lastData": 0,
"lastReboot": 0,
"lastRefresh": 0,
"lastDiscovery": 0,
"lastHarvesterUpdate": 0,
"firstPollError": 0,
"nextPollRetry": 0,
"harvesterID": 1,
"profileId": 4,
"snmpVersion": 1,
"snmpPort": 36863,
"snmpTimeout": 3,
"snmpRetry": 3,
"snmpMaxRows": 10,
"ifNumber": 0,
"interfaceCount": 2,
"agentCount": 0,
"dnsLastLookupTime": 1556273867,
"dnsExpireTime": 1556878667,
"syncUpdateTime": 0,
"routerName": null,
"routerUpdatedOn": 1556273741,
"templateId": 1,
"snmpProxyAddress": "127.0.0.1",
"dnsProxyAddress": "127.0.0.1",
"tenantId": 8,
"domainID": 1
},
{
"ID": 1500009,
"routerAddress": "127.0.0.1",
"sysDescr": "127.0.0.1",
"sysName": "",
"deviceName": "127.0.0.1",
"deviceAlias": "127.0.0.1",
"sysUptime": 0,
"lastData": 0,
"lastReboot": 0,
"lastRefresh": 0,
"lastDiscovery": 0,
"lastHarvesterUpdate": 0,
"firstPollError": 0,
"nextPollRetry": 0,
"harvesterID": 1,
"profileId": 4,
"snmpVersion": 1,
"snmpPort": 36863,
"snmpTimeout": 3,
"snmpRetry": 3,
"snmpMaxRows": 10,
"ifNumber": 0,
"interfaceCount": 10,
"agentCount": 8,
"dnsLastLookupTime": 1556273867,
"dnsExpireTime": 1556878667,
"syncUpdateTime": 0,
"routerName": null,
"routerUpdatedOn": 1556273741,
"templateId": 1,
"snmpProxyAddress": "127.0.0.1",
"dnsProxyAddress": "127.0.0.1",
"tenantId": 8,
"domainID": 1
}
]
}