netgate-host-route API (24.02)

This YANG module provides a data model for host IP routes.

Copyright 2024 Rubicon Communications, LLC.

host-route-config

returns netgate.host.route.HostRouteConfig

get /data/netgate-host-route:host-route-config

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config

Host system IP route configuration.

Responses

200

netgate.host.route.HostRouteConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-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-route:host-route-config-wrapper":
    {
    }
}

creates netgate.host.route.HostRouteConfig

post /data/netgate-host-route:host-route-config

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config

Host system IP route configuration.

Request Body schema: application/yang-data+json

netgate.host.route.HostRouteConfig to be added to list

netgate-host-route:host-route-config
object (netgate.host.route.HostRouteConfig)

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

creates or updates netgate.host.route.HostRouteConfig

put /data/netgate-host-route:host-route-config

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config

Host system IP route configuration.

Request Body schema: application/yang-data+json

netgate.host.route.HostRouteConfig to be added or updated

netgate-host-route:host-route-config-wrapper
object (netgate.host.route.HostRouteConfigWrapper)

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-route:host-route-config-wrapper":
    {
    }
}

removes netgate.host.route.HostRouteConfig

delete /data/netgate-host-route:host-route-config

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config

Host system IP route configuration.

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-route:host-route-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))

}

returns netgate.host.route.hostrouteconfig.RouteTables

get /data/netgate-host-route:host-route-config/route-tables

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables

Host system static routes.

Responses

200

netgate.host.route.hostrouteconfig.RouteTables

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables"

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

creates netgate.host.route.hostrouteconfig.RouteTables

post /data/netgate-host-route:host-route-config/route-tables

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables

Host system static routes.

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.RouteTables to be added to list

route-tables
object (netgate.host.route.hostrouteconfig.RouteTables)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.host.route.hostrouteconfig.RouteTables

put /data/netgate-host-route:host-route-config/route-tables

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables

Host system static routes.

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.RouteTables to be added or updated

netgate-host-route:route-tables-wrapper
object (netgate.host.route.hostrouteconfig.RouteTablesWrapper)

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

removes netgate.host.route.hostrouteconfig.RouteTables

delete /data/netgate-host-route:host-route-config/route-tables

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables

Host system static routes.

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-route:host-route-config/route-tables"

	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.route.hostrouteconfig.routetables.RouteTable

post /data/netgate-host-route:host-route-config/route-tables/route-table

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table

Currently, one host route table named 'default' is supported.

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.RouteTable to be added to list

route-table
object (netgate.host.route.hostrouteconfig.routetables.RouteTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns netgate.host.route.hostrouteconfig.routetables.RouteTable

get /data/netgate-host-route:host-route-config/route-tables/route-table={name}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}

Currently, one host route table named 'default' is supported.

path Parameters
name
required
string

Id of route-table

Responses

200

netgate.host.route.hostrouteconfig.routetables.RouteTable

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%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-route:route-table-wrapper":
    {
    }
}

creates or updates netgate.host.route.hostrouteconfig.routetables.RouteTable

put /data/netgate-host-route:host-route-config/route-tables/route-table={name}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}

Currently, one host route table named 'default' is supported.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.RouteTable to be added or updated

netgate-host-route:route-table-wrapper
object (netgate.host.route.hostrouteconfig.routetables.RouteTableWrapper)

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

removes netgate.host.route.hostrouteconfig.routetables.RouteTable

delete /data/netgate-host-route:host-route-config/route-tables/route-table={name}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}

Currently, one host route table named 'default' is supported.

path Parameters
name
required
string

Id of route-table

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-route:host-route-config/route-tables/route-table=%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.route.hostrouteconfig.routetables.routetable.StaticRoutes

get /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes

Host system IPv4 and IPv6 static routes.

path Parameters
name
required
string

Id of route-table

Responses

200

netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes"

	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-route:static-routes-wrapper":
    {
    }
}

creates netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes

post /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes

Host system IPv4 and IPv6 static routes.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes to be added to list

static-routes
object (netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes

put /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes

Host system IPv4 and IPv6 static routes.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes to be added or updated

netgate-host-route:static-routes-wrapper
object (netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutesWrapper)

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-route:static-routes-wrapper":
    {
    }
}

removes netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes

delete /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes

Host system IPv4 and IPv6 static routes.

path Parameters
name
required
string

Id of route-table

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-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes"

	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.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces

get /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces

Static routes are associated with a specific, required interface.

path Parameters
name
required
string

Id of route-table

Responses

200

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces"

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

creates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces

post /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces

Static routes are associated with a specific, required interface.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces to be added to list

interfaces
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces

put /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces

Static routes are associated with a specific, required interface.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces to be added or updated

netgate-host-route:interfaces-wrapper
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.InterfacesWrapper)

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

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces

delete /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces

Static routes are associated with a specific, required interface.

path Parameters
name
required
string

Id of route-table

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-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces"

	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.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface

post /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface

An interface with static routes.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface to be added to list

interface
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.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.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface

get /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}

An interface with static routes.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Responses

200

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%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-route:interface-wrapper":
    {
    }
}

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface

put /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}

An interface with static routes.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface to be added or updated

netgate-host-route:interface-wrapper
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.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-route:interface-wrapper":
    {
    }
}

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface

delete /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}

An interface with static routes.

path Parameters
name
required
string

Id of route-table

if-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-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%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.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes

get /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes

List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Responses

200

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv4-routes"

	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-route:ipv4-routes-wrapper":
    {
    }
}

creates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes

post /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes

List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes to be added to list

ipv4-routes
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes)

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

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes

put /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes

List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes to be added or updated

netgate-host-route:ipv4-routes-wrapper
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4RoutesWrapper)

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-route:ipv4-routes-wrapper":
    {
    }
}

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes

delete /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes

List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.

path Parameters
name
required
string

Id of route-table

if-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-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv4-routes"

	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.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route

post /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes/route

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes/route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route to be added to list

route
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route

get /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes/route={to}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes/route={to}

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Responses

200

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv4-routes/route=%7Bto%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-route:route-wrapper":
    {
    }
}

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route

put /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes/route={to}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes/route={to}

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route to be added or updated

netgate-host-route:route-wrapper
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.RouteWrapper)

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

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route

delete /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes/route={to}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv4-routes/route={to}

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

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-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv4-routes/route=%7Bto%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.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes

get /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes

List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Responses

200

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv6-routes"

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

creates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes

post /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes

List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes to be added to list

ipv6-routes
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes

put /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes

List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes to be added or updated

netgate-host-route:ipv6-routes-wrapper
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6RoutesWrapper)

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

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes

delete /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes

List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.

path Parameters
name
required
string

Id of route-table

if-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-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv6-routes"

	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.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route

post /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes/route

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes/route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route to be added to list

route
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route

get /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes/route={to}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes/route={to}

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Responses

200

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv6-routes/route=%7Bto%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-route:route-wrapper":
    {
    }
}

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route

put /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes/route={to}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes/route={to}

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route to be added or updated

netgate-host-route:route-wrapper
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.RouteWrapper)

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

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route

delete /data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes/route={to}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table={name}/static-routes/interfaces/interface={if-name}/ipv6-routes/route={to}

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

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-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv6-routes/route=%7Bto%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))

}

host-route-state

returns netgate.host.route.HostRouteState

get /data/netgate-host-route:host-route-state

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-state

Host system IP route state information.

Responses

200

netgate.host.route.HostRouteState

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-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-route:host-route-state-wrapper":
    {
    }
}

returns netgate.host.route.hostroutestate.Interfaces

get /data/netgate-host-route:host-route-state/interfaces

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-state/interfaces

The list of host interfaces with static routes.

Responses

200

netgate.host.route.hostroutestate.Interfaces

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces"

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

returns netgate.host.route.hostroutestate.interfaces.Interface

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

Example URL

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

A host interface with static routes.

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.route.hostroutestate.interfaces.Interface

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/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-route:interface-wrapper":
    {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.Ipv4Routes

get /data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv4-routes

Example URL

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

List of IPv4 routes by destination prefix for a given interface.

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.route.hostroutestate.interfaces.interface.Ipv4Routes

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv4-routes"

	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-route:ipv4-routes-wrapper":
    {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.Route

get /data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv4-routes/route={to}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv4-routes/route={to}

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

Responses

200

netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.Route

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv4-routes/route=%7Bto%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-route:route-wrapper":
    {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.NextHops

get /data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv4-routes/route={to}/next-hops

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv4-routes/route={to}/next-hops

returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.NextHops

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

Responses

200

netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.NextHops

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv4-routes/route=%7Bto%7D/next-hops"

	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-route:next-hops-wrapper":
    {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.nexthops.Hop

get /data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv4-routes/route={to}/next-hops/hop={address}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv4-routes/route={to}/next-hops/hop={address}

A list of hops in a multi-hop route.

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

address
required
string

Id of hop

Responses

200

netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.nexthops.Hop

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv4-routes/route=%7Bto%7D/next-hops/hop=%7Baddress%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-route:hop-wrapper":
    {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.Ipv6Routes

get /data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv6-routes

Example URL

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

List of IPv6 routes by destination prefix for a given interface.

path Parameters
name
required
string

Id of interface

Responses

200

netgate.host.route.hostroutestate.interfaces.interface.Ipv6Routes

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv6-routes"

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

returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.Route

get /data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv6-routes/route={to}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv6-routes/route={to}

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

Responses

200

netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.Route

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv6-routes/route=%7Bto%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-route:route-wrapper":
    {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.NextHops

get /data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv6-routes/route={to}/next-hops

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv6-routes/route={to}/next-hops

returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.NextHops

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

Responses

200

netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.NextHops

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv6-routes/route=%7Bto%7D/next-hops"

	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-route:next-hops-wrapper":
    {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.nexthops.Hop

get /data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv6-routes/route={to}/next-hops/hop={address}

Example URL

https://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface={name}/ipv6-routes/route={to}/next-hops/hop={address}

A list of hops in a multi-hop route.

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

address
required
string

Id of hop

Responses

200

netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.nexthops.Hop

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv6-routes/route=%7Bto%7D/next-hops/hop=%7Baddress%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-route:hop-wrapper":
    {
    }
}