Fortinet white logo
Fortinet white logo

SysInterface

SysInterface

Network interfaces such as port1. For descriptions, see the FortiRecorder Administration Guide.

Permissions required include System access.

HTTP Methods
  • GET

  • POST

  • PUT

  • DELETE

Physical network interfaces cannot be created nor deleted.

URL

For HTTP GET, use either:

  • https://HOST_OR_IP/api/v1/SysInterface/
  • https://HOST_OR_IP/api/v1/SysInterface/INTERFACE_NAME

For HTTPPOST, PUT, and DELETE, use:

  • https://HOST_OR_IP/api/v1/SysInterface/INTERFACE_NAME

where variables are:

  • INTERFACE_NAME — Optional. Unique identifier of a specific resource, such as the network interface port1

Request JSON

For HTTP GET or DELETE, leave the request body empty.

For HTTP POST, configure all required settings. For a list of available settings, use HTTP GET.

For HTTP PUT, configure only settings that you want to change. Omit others. For example:

{
    "link_status": true
}

Response JSON

For HTTP PUT, responses vary by which settings you changed.

For HTTP GET, responses vary by HTTP method and URL (collection vs. individual resource). For example, if you get port2:

{
    "objectID": "SysInterface:port2",
    "reqAction": 1,
    "nodePermission": 3,
    "mkey": "port2",
    "type": 0,
    "aggregate_master": 0,
    "bridge_member": true,
    "ip": "172.168.1.103/24",
    "ip6": "::/0",
    "status": true,
    "interface": "",
    "aggregate_member": "",
    "incoming_mode": 2,
    "outgoing_mode": 0,
    "local": true,
    "allowaccess": 23,
    "discover": true,
    "webaccess": 1,
    "mode": 0,
    "connection": false,
    "defaultgw": false,
    "mtu": 1500,
    "speed": 0,
    "mac_addr": "00:10:f3:37:6c:e2",
    "vlanid": 1,
    "aggregate_monitor": 0,
    "aggregate_arp_ip": "",
    "aggregate_algorithm": 0,
    "aggregate_mode": 4,
    "rx_queue": 0,
    "tx_queue": 0,
    "link_status": true
}

where attributes often self-explanatory, except:

  • type — Type of network interface:

    • 0 — Physical.

    • 1 — VLAN.

    • 2 — Aggregate.

    • 3 — Redundant.

  • allowaccess — Protocols that are allowed to access FortiRecorder on this network interface. Total of the following numbers (depending on which protocols you allow):

    • 1 — HTTPS.

    • 2 — PING.

    • 4 — SSH.

    • 8 — SNMP.

    • 16 — HTTP.

    • 32 — Telnet.

    • 128 — FortiCentral.

    • 256 — RTSP.

  • discover — Whether or not to automatically discover cameras connected to this port:

    • true — Enabled.

    • false — Disabled.

  • link_status — Administrative status:

    • true — Interface is up.

    • false — Interface is down.

Example: Get a list of network interfaces

curl -X GET -b cookie.txt https://HOST_OR_IP/api/v1/SysInterface/

Example: Allow only RTSP, FortiCentral, and HTTPS connections to port2

curl -X PUT -H "Content-Type:application/json" -d "{\"allowaccess\":385}" -b cookie.txt https://HOST_OR_IP/api/v1/SysInterface/port2

SysInterface

SysInterface

Network interfaces such as port1. For descriptions, see the FortiRecorder Administration Guide.

Permissions required include System access.

HTTP Methods
  • GET

  • POST

  • PUT

  • DELETE

Physical network interfaces cannot be created nor deleted.

URL

For HTTP GET, use either:

  • https://HOST_OR_IP/api/v1/SysInterface/
  • https://HOST_OR_IP/api/v1/SysInterface/INTERFACE_NAME

For HTTPPOST, PUT, and DELETE, use:

  • https://HOST_OR_IP/api/v1/SysInterface/INTERFACE_NAME

where variables are:

  • INTERFACE_NAME — Optional. Unique identifier of a specific resource, such as the network interface port1

Request JSON

For HTTP GET or DELETE, leave the request body empty.

For HTTP POST, configure all required settings. For a list of available settings, use HTTP GET.

For HTTP PUT, configure only settings that you want to change. Omit others. For example:

{
    "link_status": true
}

Response JSON

For HTTP PUT, responses vary by which settings you changed.

For HTTP GET, responses vary by HTTP method and URL (collection vs. individual resource). For example, if you get port2:

{
    "objectID": "SysInterface:port2",
    "reqAction": 1,
    "nodePermission": 3,
    "mkey": "port2",
    "type": 0,
    "aggregate_master": 0,
    "bridge_member": true,
    "ip": "172.168.1.103/24",
    "ip6": "::/0",
    "status": true,
    "interface": "",
    "aggregate_member": "",
    "incoming_mode": 2,
    "outgoing_mode": 0,
    "local": true,
    "allowaccess": 23,
    "discover": true,
    "webaccess": 1,
    "mode": 0,
    "connection": false,
    "defaultgw": false,
    "mtu": 1500,
    "speed": 0,
    "mac_addr": "00:10:f3:37:6c:e2",
    "vlanid": 1,
    "aggregate_monitor": 0,
    "aggregate_arp_ip": "",
    "aggregate_algorithm": 0,
    "aggregate_mode": 4,
    "rx_queue": 0,
    "tx_queue": 0,
    "link_status": true
}

where attributes often self-explanatory, except:

  • type — Type of network interface:

    • 0 — Physical.

    • 1 — VLAN.

    • 2 — Aggregate.

    • 3 — Redundant.

  • allowaccess — Protocols that are allowed to access FortiRecorder on this network interface. Total of the following numbers (depending on which protocols you allow):

    • 1 — HTTPS.

    • 2 — PING.

    • 4 — SSH.

    • 8 — SNMP.

    • 16 — HTTP.

    • 32 — Telnet.

    • 128 — FortiCentral.

    • 256 — RTSP.

  • discover — Whether or not to automatically discover cameras connected to this port:

    • true — Enabled.

    • false — Disabled.

  • link_status — Administrative status:

    • true — Interface is up.

    • false — Interface is down.

Example: Get a list of network interfaces

curl -X GET -b cookie.txt https://HOST_OR_IP/api/v1/SysInterface/

Example: Allow only RTSP, FortiCentral, and HTTPS connections to port2

curl -X PUT -H "Content-Type:application/json" -d "{\"allowaccess\":385}" -b cookie.txt https://HOST_OR_IP/api/v1/SysInterface/port2