netgate-host-interface API (22.10)

This YANG module provides a data model for host interfaces.

Copyright 2018-2020 Rubicon Communications, LLC.

host-if-config

returns netgate.host.interface.HostIfConfig

get /data/netgate-host-interface:host-if-config

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config

Interface configuration parameters.

Responses

200

netgate.host.interface.HostIfConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-interface:host-if-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

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host-interface:host-if-config-wrapper":
    {
    }
}

creates netgate.host.interface.HostIfConfig

post /data/netgate-host-interface:host-if-config

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config

Interface configuration parameters.

Request Body schema: application/yang-data+json

netgate.host.interface.HostIfConfig to be added to list

netgate-host-interface:host-if-config
object (netgate.host.interface.HostIfConfig)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host-interface:host-if-config":
    {
    }
}

creates or updates netgate.host.interface.HostIfConfig

put /data/netgate-host-interface:host-if-config

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config

Interface configuration parameters.

Request Body schema: application/yang-data+json

netgate.host.interface.HostIfConfig to be added or updated

netgate-host-interface:host-if-config-wrapper
object (netgate.host.interface.HostIfConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host-interface:host-if-config-wrapper":
    {
    }
}

removes netgate.host.interface.HostIfConfig

delete /data/netgate-host-interface:host-if-config

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config

Interface configuration parameters.

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

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

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

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

}

creates netgate.host.interface.hostifconfig.Interface

post /data/netgate-host-interface:host-if-config/interface

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface

The list of configured host interfaces on the device.

Request Body schema: application/yang-data+json

netgate.host.interface.hostifconfig.Interface to be added to list

interface
object (netgate.host.interface.hostifconfig.Interface)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "interface":
    {
    }
}

returns netgate.host.interface.hostifconfig.Interface

get /data/netgate-host-interface:host-if-config/interface={name}

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}

The list of configured host interfaces on the device.

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifconfig.Interface

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-interface:host-if-config/interface=%7Bname%7D"

	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

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host-interface:interface-wrapper":
    {
    }
}

creates or updates netgate.host.interface.hostifconfig.Interface

put /data/netgate-host-interface:host-if-config/interface={name}

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}

The list of configured host interfaces on the device.

path Parameters
name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.interface.hostifconfig.Interface to be added or updated

netgate-host-interface:interface-wrapper
object (netgate.host.interface.hostifconfig.InterfaceWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host-interface:interface-wrapper":
    {
    }
}

removes netgate.host.interface.hostifconfig.Interface

delete /data/netgate-host-interface:host-if-config/interface={name}

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}

The list of configured host interfaces on the device.

path Parameters
name
required
string

Id of interface

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-interface:host-if-config/interface=%7Bname%7D"

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

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

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

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

}

returns netgate.host.interface.hostifconfig.interface.Ipv4

get /data/netgate-host-interface:host-if-config/interface={name}/ipv4

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}/ipv4

Parameters for the IPv4 address family.

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifconfig.interface.Ipv4

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-interface:host-if-config/interface=%7Bname%7D/ipv4"

	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

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host-interface:ipv4-wrapper":
    {
    }
}

creates netgate.host.interface.hostifconfig.interface.Ipv4

post /data/netgate-host-interface:host-if-config/interface={name}/ipv4

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}/ipv4

Parameters for the IPv4 address family.

path Parameters
name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.interface.hostifconfig.interface.Ipv4 to be added to list

ipv4
object (netgate.host.interface.hostifconfig.interface.Ipv4)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ipv4":
    {
    }
}

creates or updates netgate.host.interface.hostifconfig.interface.Ipv4

put /data/netgate-host-interface:host-if-config/interface={name}/ipv4

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}/ipv4

Parameters for the IPv4 address family.

path Parameters
name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.interface.hostifconfig.interface.Ipv4 to be added or updated

netgate-host-interface:ipv4-wrapper
object (netgate.host.interface.hostifconfig.interface.Ipv4Wrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host-interface:ipv4-wrapper":
    {
    }
}

removes netgate.host.interface.hostifconfig.interface.Ipv4

delete /data/netgate-host-interface:host-if-config/interface={name}/ipv4

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}/ipv4

Parameters for the IPv4 address family.

path Parameters
name
required
string

Id of interface

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-interface:host-if-config/interface=%7Bname%7D/ipv4"

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

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

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

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

}

returns netgate.host.interface.hostifconfig.interface.ipv4.Address

get /data/netgate-host-interface:host-if-config/interface={name}/ipv4/address

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}/ipv4/address

returns netgate.host.interface.hostifconfig.interface.ipv4.Address

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifconfig.interface.ipv4.Address

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-interface:host-if-config/interface=%7Bname%7D/ipv4/address"

	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

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host-interface:address-wrapper":
    {
    }
}

creates netgate.host.interface.hostifconfig.interface.ipv4.Address

post /data/netgate-host-interface:host-if-config/interface={name}/ipv4/address

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}/ipv4/address

creates netgate.host.interface.hostifconfig.interface.ipv4.Address

path Parameters
name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.interface.hostifconfig.interface.ipv4.Address to be added to list

address
object (netgate.host.interface.hostifconfig.interface.ipv4.Address)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "address":
    {
    }
}

creates or updates netgate.host.interface.hostifconfig.interface.ipv4.Address

put /data/netgate-host-interface:host-if-config/interface={name}/ipv4/address

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/interface={name}/ipv4/address

creates or updates netgate.host.interface.hostifconfig.interface.ipv4.Address

path Parameters
name