netgate-route API (19.02)

Container for routing related YANG models.

Consider carefully when modifying this file. It serves primarily as a point for the actual models for the routing to attach to via an augment statement.

Copyright 2017-2019 Rubicon Communications, LLC. All rights reserved.

route-config

returns netgate.route.RouteConfig

get /data/netgate-route:route-config

Example URL

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

Root container for routing models

Responses

200

netgate.route.RouteConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.route.RouteConfig

post /data/netgate-route:route-config

Example URL

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

Root container for routing models

Request Body schema: application/yang-data+json

netgate.route.RouteConfig to be added to list

dynamic
object (netgate.route.routeconfig.Dynamic)
static
object (netgate.route.routeconfig.Static)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.route.RouteConfig

put /data/netgate-route:route-config

Example URL

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

Root container for routing models

Request Body schema: application/yang-data+json

netgate.route.RouteConfig to be added or updated

netgate-route:route-config
object (netgate.route.RouteConfig)

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

removes netgate.route.RouteConfig

delete /data/netgate-route:route-config

Example URL

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

Root container for routing models

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: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.route.routeconfig.Dynamic

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

Example URL

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

returns netgate.route.routeconfig.Dynamic

Responses

200

netgate.route.routeconfig.Dynamic

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

creates netgate.route.routeconfig.Dynamic

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

Example URL

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

creates netgate.route.routeconfig.Dynamic

Request Body schema: application/yang-data+json

netgate.route.routeconfig.Dynamic to be added to list

route-maps
object (netgate.frr.routestate.dynamic.RouteMaps)
prefix-lists
object (netgate.frr.routestate.dynamic.PrefixLists)
bgp
object (netgate.frr.routestate.dynamic.Bgp)
manager
object (netgate.frr.routestate.dynamic.Manager)
access-lists
object (netgate.frr.routestate.dynamic.AccessLists)

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-maps":
    {
    },
  • "prefix-lists":
    {
    },
  • "bgp":
    {
    },
  • "manager":
    {
    },
  • "access-lists":
    {
    }
}

creates or updates netgate.route.routeconfig.Dynamic

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

Example URL

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

creates or updates netgate.route.routeconfig.Dynamic

Request Body schema: application/yang-data+json

netgate.route.routeconfig.Dynamic to be added or updated

netgate-route:dynamic
object (netgate.route.routeconfig.Dynamic)

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

removes netgate.route.routeconfig.Dynamic

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

Example URL

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

removes netgate.route.routeconfig.Dynamic

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:route-config/netgate-route:dynamic"

	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.routeconfig.Static

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

Example URL

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

returns netgate.route.routeconfig.Static

Responses

200

netgate.route.routeconfig.Static

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

creates netgate.route.routeconfig.Static

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

Example URL

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

creates netgate.route.routeconfig.Static

Request Body schema: application/yang-data+json

netgate.route.routeconfig.Static to be added to list

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{ }

creates or updates netgate.route.routeconfig.Static

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

Example URL

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

creates or updates netgate.route.routeconfig.Static

Request Body schema: application/yang-data+json

netgate.route.routeconfig.Static to be added or updated

netgate-route:static
object (netgate.route.routeconfig.Static)

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

removes netgate.route.routeconfig.Static

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

Example URL

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

removes netgate.route.routeconfig.Static

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:route-config/netgate-route:static"

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

}

route-state

returns netgate.route.RouteState

get /data/netgate-route:route-state

Example URL

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

Root container for routing models

Responses

200

netgate.route.RouteState

400

Internal error

Request samples

Copy
package main

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

func main() {

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

returns netgate.route.routestate.Dynamic

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

Example URL

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

returns netgate.route.routestate.Dynamic

Responses

200

netgate.route.routestate.Dynamic

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

returns netgate.route.routestate.Static

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

Example URL

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

returns netgate.route.routestate.Static

Responses

200

netgate.route.routestate.Static

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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