インターフェース
このセクションでは、インターフェースでサポートされている以下の操作について説明します。
nfa1000
このセクションでは、インターフェースでサポートされている以下の操作について説明します。
インターフェースの編集 - 単一
単一のエンティティを編集するには、HTTP PATCH メソッドを使用してリクエストを送信します。
リソース
URI http://<nfa odata host>:<nfa odata port>/odata/api/interfaces(PropertyRef Name value)
メソッド
PATCH
ペイロード
{ "Description": <Value>, "InSpeed" : <Value>, "OutSpeed" : <Value>, "IfType" : <Value>, "Name" : <Value>, "DomainId" : <Value> }
サンプル リクエスト
http://127.0.0.1:8981/odata/api/interfaces(10)
サンプル ペイロード
{ "Description":"interfaceupdate", "Name":"Interface1111", "InSpeed":100, "OutSpeed":101, "IfType":"WAN", "DomainId":1 }
サンプル レスポンス
この API に対するレスポンスはありません。
インターフェースの編集 - 一括
この CA NFA OData API を使用すると、同じプロパティを持つ複数のエンティティの値を一度に更新できます。
この一括編集 API は、インターフェースの少数のプロパティにのみ適用できます。
リソース
URI http://<nfa odata host>:<nfa odata port>/odata/api/interfaces/com.ca.nfa.odata.editInterfaces
メソッド
POST
ペイロード
{ "InterfaceIds":[<List of Interface_ID s separated by a comma>], "InSpeed" : <value>, "OutSpeed": <value>, "IfType" : <value>, "DomainId": <value> }
サンプル リクエスト
http://127.0.0.1:8981/odata/interfaces/com.ca.nfa.odata.editInterfaces
サンプル ペイロード
{ "InterfaceIds":[943,944], "InSpeed":100, "OutSpeed":100, "IfType":"WAN", "DomainId":3 }
サンプル レスポンス
{ "@odata.context": "$metadata#Collection(com.ca.nfa.odata.interfaces)", "value": [ { "ID": 943, "AgentType": "Physical", "RouterAddress": "127.0.0.1", "RouterId": 1500016, "Description": "interface Description", "InSpeed": 10000000, "OutSpeed": 1000000, "IfIndex": 4, "PersistentIfIndex": 5, "IfType": "WAN", "UpdatedOn": 1602590969, "Enabled": "N", "LastData": 1602673218, "HarvesterAddress": "10.80.89.28", "Name": "Interface 1", "TrafficStatus": null, "DomainId": 1, "DomainName": null, "Subnet": [], "ComponentAgentIds": [] }, { "ID": 944, "AgentType": "Physical", "RouterAddress": "127.0.0.1", "RouterId": 1500016, "Description": "", "InSpeed": 127, "OutSpeed": 149, "IfIndex": 6, "PersistentIfIndex": 8, "IfType": "WAN ATM AAL5", "UpdatedOn": 1602590969, "Enabled": "N", "LastData": 1602673218, "HarvesterAddress": "127.0.0.1", "Name": "Interface 6", "TrafficStatus": null, "DomainId": 10, "DomainName": null, "Subnet": [], "ComponentAgentIds": [] } ] }
インターフェースの結合
CA NFA OData API を使用すると、
Network Flow Analysis
コンソールでインターフェースをマージする場合と同様に、2 つのインターフェースをマージできます。リソース
URI http://<nfa odata host>:<nfa odata port>/odata/api/interfaces/com.ca.nfa.odata.mergeInterfaces
メソッド
POST
ペイロード
{ "interface1" : <Interface_ID>, "interface2" : <Interface_ID>, "deleteSource" : <true/false>, "isOverLap" : <true/false> }
パラメータ
ペイロードのパラメータを以下に示します。
パラメータ | Description |
interface1 | インターフェース テーブルに設定された最初のインターフェースのインターフェース ID を示します。 |
interface2 | インターフェース テーブルに設定された 2 番目のインターフェースのインターフェース ID を示します。 |
deleteSource | マージ後にソースを削除する必要があるかどうかを示します。有効な値は以下のとおりです。
|
isOverLap | このパラメータは、重複したデータをマージする必要があるかどうかを示します。有効な値は以下のとおりです。
|
Interface1 または Interface2 のいずれかをソースとして指定でき、もう一方は宛先になります。
サンプル リクエスト
http://10.13.91.413:8981/odata/api/interfaces/com.ca.nfa.odata.mergeInterfaces
サンプル ペイロード
{ "interface1" : 46, "interface2" : 31, "isOverLap" : true, "deleteSource":false }
サンプル レスポンス
{ "@odata.context": "$metadata#Collection(com.ca.nfa.odata.interfaces)", "value": [ { "ID": 31, "AgentType": "Physical", "RouterAddress": "10.0.42.2", "Description": "edge network", "InSpeed": 1000000000, "OutSpeed": 1000000000, "IfIndex": 4, "PersistentIfIndex": 7, "IfType": "LAN-ET", "UpdatedOn": 1551158203, "Enabled": "Y", "LastData": 1551344433, "HarvesterAddress": "10.238.80.99", "Name": "Fa1/1" }, { "ID": 46, "AgentType": "Physical", "RouterAddress": "10.0.42.3", "Description": "", "InSpeed": 1000000000, "OutSpeed": 1000000000, "IfIndex": 4, "PersistentIfIndex": 6, "IfType": "LAN-ET", "UpdatedOn": 1551158203, "Enabled": "Y", "LastData": 1551189619, "HarvesterAddress": "10.238.80.99", "Name": "Fa1/1" } ] }
インターフェースの削除 - 単一
この API を使用すると、単一のインターフェースを削除できます。
単一のインターフェースとインターフェース集約を削除する API は同じです。
リソース
URI http://<nfa odata host>:<nfa odata port>/odata/api/interfaces(<interface_id>)
メソッド
DELETE
Parameters
以下の表には、必須パラメータが含まれています。
パラメータ | Description |
|---|---|
interface_id | インターフェース エンティティ セットから削除するインターフェース ID を指定します。 |
サンプル リクエスト
以下のリクエストは、インターフェース ID 3051 の削除アクションを示しています。
http://127.00.1:8981/odata/api/interfaces(3051)
サンプル レスポンス
この API に対するレスポンスはありません。
インターフェースの削除 - 一括
この API を使用すると、複数のインターフェース集約を一括して削除できます。
リソース
URI http://<nfa odata host>:<nfa odata port>/odata/api/interfaces/com.ca.nfa.odata.deleteInterfaces
メソッド
POST
ペイロード
{ "InterfaceIds":[<Enter the list of Interface_ids separated by a comma>] }
Sample Request
以下のリクエストは、インターフェース エンティティの一括削除アクションを示しています。
http://127.00.1:8981/odata/api/interfaces/com.ca.nfa.odata.deleteInterfaces
サンプル ペイロード
{ "InterfaceIds" : [123,402] }
サンプル レスポンス
{ "@odata.context": "$metadata#Collection(com.ca.nfa.odata.interfaces)", "value": [ { "ID": 123, "AgentType": "Physical", "RouterAddress": "127.0.0.1", "Description": "Device209", "InSpeed": 1000000000, "OutSpeed": 1000000000, "IfIndex": 1, "PersistentIfIndex": 1, "IfType": "LAN-ET", "UpdatedOn": 1544529750, "Enabled": "Y", "LastData": 1546937182, "HarvesterAddress": "127.0.0.1", "Name": "Device209" }, { "ID": 402, "AgentType": "Physical", "RouterAddress": "127.0.0.1", "Description": "127.0.0.1", "InSpeed": 0, "OutSpeed": 0, "IfIndex": 7, "PersistentIfIndex": 4, "IfType": "WAN", "UpdatedOn": 1544598925, "Enabled": "Y", "LastData": 1545139819, "HarvesterAddress": "127.0.0.1", "Name": "127.0.0.1" } ] }