netgate-host-interface API (19.02)

This YANG module provides a data model for host interfaces.

Copyright 2018-2019 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":
    {
    }
}

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

interface
Array of objects (netgate.host.interface.hostifconfig.Interface)

The list of configured host interfaces on the device.

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":
    [
    ]
}

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
object (netgate.host.interface.HostIfConfig)

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":
    {
    }
}

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/netgate-host-interface:interface

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface: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

ipv4
object (netgate.host.interface.hostifconfig.interface.Ipv4)
ipv6
object (netgate.host.interface.hostifconfig.interface.Ipv6)
name
string

The name of the host interface.

description
string

A textual description of the host interface.

enabled
boolean

This leaf contains the configured, desired state of the interface.

mtu
integer <int32>

The size, in octets, of the largest packet that the interface will send and receive.

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":
    {
    },
  • "ipv6":
    {
    },
  • "name": "string",
  • "description": "string",
  • "enabled": true,
  • "mtu": 0
}

returns netgate.host.interface.hostifconfig.Interface

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

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface: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/netgate-host-interface: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":
    {
    }
}

creates netgate.host.interface.hostifconfig.Interface

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

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface: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 to list

ipv4
object (netgate.host.interface.hostifconfig.interface.Ipv4)
ipv6
object (netgate.host.interface.hostifconfig.interface.Ipv6)
name
string

The name of the host interface.

description
string

A textual description of the host interface.

enabled
boolean

This leaf contains the configured, desired state of the interface.

mtu
integer <int32>

The size, in octets, of the largest packet that the interface will send and receive.

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":
    {
    },
  • "ipv6":
    {
    },
  • "name": "string",
  • "description": "string",
  • "enabled": true,
  • "mtu": 0
}

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

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

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface: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
object (netgate.host.interface.hostifconfig.Interface)

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":
    {
    }
}

removes netgate.host.interface.hostifconfig.Interface

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

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface: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/netgate-host-interface: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/netgate-host-interface:interface={name}/netgate-host-interface:ipv4

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface:interface={name}/netgate-host-interface: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/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface:interface={name}/netgate-host-interface: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

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

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

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface:interface={name}/netgate-host-interface: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
object (netgate.host.interface.hostifconfig.interface.Ipv4)

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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface:interface={name}/netgate-host-interface: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/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface: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/netgate-host-interface:interface={name}/netgate-host-interface:ipv4/netgate-host-interface:address

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface:interface={name}/netgate-host-interface:ipv4/netgate-host-interface: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/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface:ipv4/netgate-host-interface: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-host-interface:host-if-config/netgate-host-interface:interface={name}/netgate-host-interface:ipv4/netgate-host-interface: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

ip
Array of strings

An IPv4 prefix on the host 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
{
  • "ip":
    [
    ]
}

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

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

Example URL

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

creates or updates 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 or updated

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

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:address":
    {
    }
}

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

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

Example URL

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

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

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/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface:ipv4/netgate-host-interface:address"

	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.Ipv6

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

Example URL

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

Parameters for the IPv6 address family.

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifconfig.interface.Ipv6

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/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface:ipv6"

	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:ipv6":
    {
    }
}

creates netgate.host.interface.hostifconfig.interface.Ipv6

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

Example URL

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

Parameters for the IPv6 address family.

path Parameters
name
required
string

Id of interface

Request Body schema: application/yang-data+json

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

address
object (netgate.host.interface.hostifconfig.interface.ipv6.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.Ipv6

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

Example URL

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

Parameters for the IPv6 address family.

path Parameters
name
required
string

Id of interface

Request Body schema: application/yang-data+json

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

netgate-host-interface:ipv6
object (netgate.host.interface.hostifconfig.interface.Ipv6)

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:ipv6":
    {
    }
}

removes netgate.host.interface.hostifconfig.interface.Ipv6

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

Example URL

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

Parameters for the IPv6 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/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface:ipv6"

	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.ipv6.Address

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

Example URL

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

returns netgate.host.interface.hostifconfig.interface.ipv6.Address

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifconfig.interface.ipv6.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/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface:ipv6/netgate-host-interface: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":
    {
    }
}

creates netgate.host.interface.hostifconfig.interface.ipv6.Address

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

Example URL

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

creates netgate.host.interface.hostifconfig.interface.ipv6.Address

path Parameters
name
required
string

Id of interface

Request Body schema: application/yang-data+json

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

ip
Array of strings

An IPv6 prefix on the host 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
{
  • "ip":
    [
    ]
}

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

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

Example URL

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

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

path Parameters
name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.interface.hostifconfig.interface.ipv6.Address to be added or updated

netgate-host-interface:address
object (netgate.host.interface.hostifconfig.interface.ipv6.Address)

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:address":
    {
    }
}

removes netgate.host.interface.hostifconfig.interface.ipv6.Address

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

Example URL

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

removes netgate.host.interface.hostifconfig.interface.ipv6.Address

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/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface:ipv6/netgate-host-interface:address"

	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))

}

host-if-state

returns netgate.host.interface.HostIfState

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

Example URL

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

Interface configuration parameters.

Responses

200

netgate.host.interface.HostIfState

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-state"

	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-state":
    {
    }
}

returns netgate.host.interface.hostifstate.Interface

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

Example URL

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

The list of configured host interfaces on the device.

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifstate.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-state/netgate-host-interface: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":
    {
    }
}

returns netgate.host.interface.hostifstate.interface.Ipv4

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

Example URL

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

Parameters for the IPv4 address family.

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifstate.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-state/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface: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":
    {
    }
}

returns netgate.host.interface.hostifstate.interface.ipv4.Address

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

Example URL

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

returns netgate.host.interface.hostifstate.interface.ipv4.Address

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifstate.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-state/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface:ipv4/netgate-host-interface: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":
    {
    }
}

returns netgate.host.interface.hostifstate.interface.Ipv6

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

Example URL

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

Parameters for the IPv6 address family.

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifstate.interface.Ipv6

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-state/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface:ipv6"

	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:ipv6":
    {
    }
}

returns netgate.host.interface.hostifstate.interface.ipv6.Address

get /data/netgate-host-interface:host-if-state/netgate-host-interface:interface={name}/netgate-host-interface:ipv6/netgate-host-interface:address

Example URL

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

returns netgate.host.interface.hostifstate.interface.ipv6.Address

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.interface.hostifstate.interface.ipv6.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-state/netgate-host-interface:interface=%7Bname%7D/netgate-host-interface:ipv6/netgate-host-interface: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":
    {
    }
}