netgate-host-route API (23.06)

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

Copyright 2023 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