netgate-route-table API (22.10)

This YANG module provides a Netgate-defined data-model for Route Tables.

Copyright 2017-2020 Rubicon Communications, LLC.

route-table-config

returns netgate.route.table.RouteTableConfig

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

Example URL

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

Route Table define a set of static IPv4 and IPv6 routes.

Responses

200

netgate.route.table.RouteTableConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.route.table.RouteTableConfig

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

Example URL

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

Route Table define a set of static IPv4 and IPv6 routes.

Request Body schema: application/yang-data+json

netgate.route.table.RouteTableConfig to be added to list

netgate-route-table:route-table-config
object (netgate.route.table.RouteTableConfig)

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

creates or updates netgate.route.table.RouteTableConfig

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

Example URL

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

Route Table define a set of static IPv4 and IPv6 routes.

Request Body schema: application/yang-data+json

netgate.route.table.RouteTableConfig to be added or updated

netgate-route-table:route-table-config-wrapper
object (netgate.route.table.RouteTableConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.route.table.RouteTableConfig

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

Example URL

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

Route Table define a set of static IPv4 and IPv6 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-route-table:route-table-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.route.table.routetableconfig.StaticRoutes

get /data/netgate-route-table:route-table-config/static-routes

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes

Static routes.

Responses

200

netgate.route.table.routetableconfig.StaticRoutes

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.route.table.routetableconfig.StaticRoutes

post /data/netgate-route-table:route-table-config/static-routes

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes

Static routes.

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.StaticRoutes to be added to list

static-routes
object (netgate.route.table.routetableconfig.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.route.table.routetableconfig.StaticRoutes

put /data/netgate-route-table:route-table-config/static-routes

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes

Static routes.

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.StaticRoutes to be added or updated

netgate-route-table:static-routes-wrapper
object (netgate.route.table.routetableconfig.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-route-table:static-routes-wrapper":
    {