netgate-route-table API (24.02)

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

removes netgate.route.table.routetableconfig.StaticRoutes

delete /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

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

}

creates netgate.route.table.routetableconfig.staticroutes.RouteTable

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

Example URL

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

Route table entries are indexed by their name. Table names are unique across all address families.

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.RouteTable to be added to list

route-table
object (netgate.route.table.routetableconfig.staticroutes.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.route.table.routetableconfig.staticroutes.RouteTable

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

Example URL

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

Route table entries are indexed by their name. Table names are unique across all address families.

path Parameters
name
required
string

Id of route-table

Responses

200

netgate.route.table.routetableconfig.staticroutes.RouteTable

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

creates or updates netgate.route.table.routetableconfig.staticroutes.RouteTable

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

Example URL

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

Route table entries are indexed by their name. Table names are unique across all address families.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.RouteTable to be added or updated

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

removes netgate.route.table.routetableconfig.staticroutes.RouteTable

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

Example URL

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

Route table entries are indexed by their name. Table names are unique across all address families.

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-route-table:route-table-config/static-routes/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.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes

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

Example URL

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

List of IPv4 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Responses

200

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes

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

creates netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes

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

Example URL

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

List of IPv4 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes to be added to list

ipv4-routes
object (netgate.route.table.routetableconfig.staticroutes.routetable.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.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes

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

Example URL

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

List of IPv4 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes to be added or updated

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes

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

Example URL

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

List of IPv4 routes by destination prefix.

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-route-table:route-table-config/static-routes/route-table=%7Bname%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.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route

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

Example URL

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

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route to be added to list

route
object (netgate.route.table.routetableconfig.staticroutes.routetable.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.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route

get /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

200

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route

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/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%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-route-table:route-wrapper":
    {
    }
}

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route

put /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route to be added or updated

netgate-route-table:route-wrapper
object (netgate.route.table.routetableconfig.staticroutes.routetable.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-route-table:route-wrapper":
    {
    }
}

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route

delete /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
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-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%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.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop

get /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

200

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop

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/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop"

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

creates netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop

post /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop to be added to list

next-hop
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop

put /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop to be added or updated

netgate-route-table:next-hop-wrapper
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHopWrapper)

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop

delete /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
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-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop"

	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.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop

post /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop to be added to list

hop
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop

get /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop={hop-id}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop={hop-id}

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

200

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop

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/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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-route-table:hop-wrapper":
    {
    }
}

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop

put /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop={hop-id}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop={hop-id}

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop to be added or updated

netgate-route-table:hop-wrapper
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.HopWrapper)

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop

delete /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop={hop-id}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop={hop-id}

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

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/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes

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

Example URL

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

List of IPv6 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Responses

200

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes

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

creates netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes

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

Example URL

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

List of IPv6 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes to be added to list

ipv6-routes
object (netgate.route.table.routetableconfig.staticroutes.routetable.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.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes

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

Example URL

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

List of IPv6 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes to be added or updated

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes

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

Example URL

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

List of IPv6 routes by destination prefix.

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-route-table:route-table-config/static-routes/route-table=%7Bname%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.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route

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

Example URL

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

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route to be added to list

route
object (netgate.route.table.routetableconfig.staticroutes.routetable.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.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route

get /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

200

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route

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/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%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-route-table:route-wrapper":
    {
    }
}

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route

put /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route to be added or updated

netgate-route-table:route-wrapper
object (netgate.route.table.routetableconfig.staticroutes.routetable.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-route-table:route-wrapper":
    {
    }
}

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route

delete /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
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-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%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.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop

get /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

200

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop

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/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop"

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

creates netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop

post /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop to be added to list

next-hop
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop

put /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop to be added or updated

netgate-route-table:next-hop-wrapper
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHopWrapper)

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop

delete /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
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-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop"

	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.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop

post /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop to be added to list

hop
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop

get /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop={hop-id}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop={hop-id}

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

200

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop

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/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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-route-table:hop-wrapper":
    {
    }
}

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop

put /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop={hop-id}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop={hop-id}

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop to be added or updated

netgate-route-table:hop-wrapper
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.HopWrapper)

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop

delete /data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop={hop-id}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop={hop-id}

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

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/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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))

}

route-table-state

returns netgate.route.table.RouteTableState

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

Example URL

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

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

Responses

200

netgate.route.table.RouteTableState

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

returns netgate.route.table.routetablestate.StaticRoutes

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

Example URL

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

Static routes.

Responses

200

netgate.route.table.routetablestate.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-state/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":
    {
    }
}

returns netgate.route.table.routetablestate.staticroutes.RouteTable

get /data/netgate-route-table:route-table-state/static-routes/route-table={name}

Example URL

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

Route table entries are indexed by their name. Table names are unique across all address families.

path Parameters
name
required
string

Id of route-table

Responses

200

netgate.route.table.routetablestate.staticroutes.RouteTable

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

returns netgate.route.table.routetablestate.staticroutes.routetable.Ipv4Routes

get /data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv4-routes

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv4-routes

List of IPv4 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Responses

200

netgate.route.table.routetablestate.staticroutes.routetable.Ipv4Routes

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-state/static-routes/route-table=%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-route-table:ipv4-routes-wrapper":
    {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv4routes.Route

get /data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

200

netgate.route.table.routetablestate.staticroutes.routetable.ipv4routes.Route

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-state/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%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-route-table:route-wrapper":
    {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv4routes.route.NextHop

get /data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

200

netgate.route.table.routetablestate.staticroutes.routetable.ipv4routes.route.NextHop

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-state/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop"

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

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv4routes.route.nexthop.Hop

get /data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop={hop-id}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv4-routes/route={destination-prefix}/next-hop/hop={hop-id}

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

200

netgate.route.table.routetablestate.staticroutes.routetable.ipv4routes.route.nexthop.Hop

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-state/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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-route-table:hop-wrapper":
    {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.Ipv6Routes

get /data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv6-routes

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv6-routes

List of IPv6 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Responses

200

netgate.route.table.routetablestate.staticroutes.routetable.Ipv6Routes

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-state/static-routes/route-table=%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-route-table:ipv6-routes-wrapper":
    {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv6routes.Route

get /data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

200

netgate.route.table.routetablestate.staticroutes.routetable.ipv6routes.Route

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-state/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%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-route-table:route-wrapper":
    {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv6routes.route.NextHop

get /data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

200

netgate.route.table.routetablestate.staticroutes.routetable.ipv6routes.route.NextHop

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-state/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop"

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

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv6routes.route.nexthop.Hop

get /data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop={hop-id}

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table={name}/ipv6-routes/route={destination-prefix}/next-hop/hop={hop-id}

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

200

netgate.route.table.routetablestate.staticroutes.routetable.ipv6routes.route.nexthop.Hop

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-state/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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-route-table:hop-wrapper":
    {
    }
}

route-lookup

operates on netgate.route.table.RouteLookup

post /operations/netgate-route-table:route-lookup

Example URL

https://hostname/restconf/operations/netgate-route-table:route-lookup

operates on netgate.route.table.RouteLookup

Request Body schema: application/yang-data+json
input
object (netgate.route.table.routelookup.Input)

Responses

200

Correct response

201

No response

400

Internal error

Request samples

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

Response samples

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