netgate-interface API (19.05)

This YANG module provides a data model for network interfaces.

Copyright 2017-2019 Rubicon Communications, LLC.

interfaces-config

returns netgate.interface.InterfacesConfig

get /data/netgate-interface:interfaces-config

Example URL

https://hostname/restconf/data/netgate-interface:interfaces-config

Interface configuration parameters.

Responses

200

netgate.interface.InterfacesConfig

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-interface:interfaces-config"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-interface:interfaces-config":
    {
    }
}

creates netgate.interface.InterfacesConfig

post /data/netgate-interface:interfaces-config

Example URL

https://hostname/restconf/data/netgate-interface:interfaces-config

Interface configuration parameters.

Request Body schema: application/yang-data+json

netgate.interface.InterfacesConfig to be added to list

bond-table
object (netgate.interface.interfacesconfig.BondTable)
loopback-table
object (netgate.interface.interfacesconfig.LoopbackTable)
bridge-table
object (netgate.interface.interfacesconfig.BridgeTable)
subinterfaces
object (netgate.interface.interfacesconfig.Subinterfaces)
tap-table
object (netgate.interface.interfacesconfig.TapTable)
interface
Array of objects (netgate.interface.interfacesconfig.Interface)

The list of configured interfaces on the device.

memif-table
object (netgate.interface.interfacesconfig.MemifTable)
socket-table
object (netgate.interface.interfacesconfig.SocketTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "bond-table":
    {
    },
  • "loopback-table":
    {
    },
  • "bridge-table":
    {
    },
  • "subinterfaces":
    {
    },
  • "tap-table":
    {
    },
  • "interface":
    [
    ],
  • "memif-table":
    {
    },
  • "socket-table":
    {
    }
}

creates or updates netgate.interface.InterfacesConfig

put /data/netgate-interface:interfaces-config

Example URL

https://hostname/restconf/data/netgate-interface:interfaces-config

Interface configuration parameters.

Request Body schema: application/yang-data+json

netgate.interface.InterfacesConfig to be added or updated

netgate-interface:interfaces-config
object (netgate.interface.InterfacesConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-interface:interfaces-config":
    {