netgate-route-table API (19.02)

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

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

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

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

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
object (netgate.route.table.RouteTableConfig)

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

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/netgate-route-table:static-routes

Example URL

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

creates netgate.route.table.routetableconfig.StaticRoutes

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

Example URL

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

Static routes.

Request Body schema: application/yang-data+json

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

route-table
Array of objects (netgate.route.table.routetableconfig.staticroutes.RouteTable)

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

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":
    [
    ]
}

creates or updates netgate.route.table.routetableconfig.StaticRoutes

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table: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
object (netgate.route.table.routetableconfig.StaticRoutes)

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

removes netgate.route.table.routetableconfig.StaticRoutes

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table: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/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table: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

name
string

The name of a Route Table.

ipv4-routes
object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes)
description
string

A description of the route table.

ipv6-routes
object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes)
address-family
string (netgate.common.IpAddressFamily)
Enum: "ipv4" "ipv6"

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "ipv4-routes":
    {
    },
  • "description": "string",
  • "ipv6-routes":
    {
    },
  • "address-family": "ipv4"
}

returns netgate.route.table.routetableconfig.staticroutes.RouteTable

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

Example URL

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table: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 to list

name
string

The name of a Route Table.

ipv4-routes
object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes)
description
string

A description of the route table.

ipv6-routes
object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes)
address-family
string (netgate.common.IpAddressFamily)
Enum: "ipv4" "ipv6"

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "ipv4-routes":
    {
    },
  • "description": "string",
  • "ipv6-routes":
    {
    },
  • "address-family": "ipv4"
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table: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
object (netgate.route.table.routetableconfig.staticroutes.RouteTable)

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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

route
Array of objects (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route)

Routes are index by their destination.

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":
    [
    ]
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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
object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes)

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table: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

description
string

A description of the route.

destination-prefix
string

IPv4 destination prefix

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
{
  • "description": "string",
  • "destination-prefix": "string",
  • "next-hop":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv4-routes/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table: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 to list

description
string

A description of the route.

destination-prefix
string

IPv4 destination prefix

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
{
  • "description": "string",
  • "destination-prefix": "string",
  • "next-hop":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table: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
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route)

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv4-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv4-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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

hop
Array of objects (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop)

A list of next-hops.

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":
    [
    ]
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop)

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv4-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table:hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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

drop
boolean

Drop the packet.

null-send-unreach
boolean

Drop packet with an 'unreachable' reply.

preference
integer <int32>

Administrative distance preference.

weight
integer <int32>

Multipath route weight.

resolve-host
boolean

Resolve host

null-send-prohibit
boolean

Drop packet with n 'prohibited' reply.

local
boolean

Receive the packet locally.

if-name
string

The next hop interface name.

ipv4-address
string

The next hop IPv4 address.

resolve-attached
boolean

Resolve attached

classify-table-name
string

Use the given Classify Table name as the next hop.

hop-id
integer <int64>

A unique identifier for each next-hop.

next-hop-table-name
string

The next hop route table name.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "drop": true,
  • "null-send-unreach": true,
  • "preference": 0,
  • "weight": 0,
  • "resolve-host": true,
  • "null-send-prohibit": true,
  • "local": true,
  • "if-name": "string",
  • "ipv4-address": "string",
  • "resolve-attached": true,
  • "classify-table-name": "string",
  • "hop-id": 0,
  • "next-hop-table-name": "string"
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv4-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table:next-hop/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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 to list

drop
boolean

Drop the packet.

null-send-unreach
boolean

Drop packet with an 'unreachable' reply.

preference
integer <int32>

Administrative distance preference.

weight
integer <int32>

Multipath route weight.

resolve-host
boolean

Resolve host

null-send-prohibit
boolean

Drop packet with n 'prohibited' reply.

local
boolean

Receive the packet locally.

if-name
string

The next hop interface name.

ipv4-address
string

The next hop IPv4 address.

resolve-attached
boolean

Resolve attached

classify-table-name
string

Use the given Classify Table name as the next hop.

hop-id
integer <int64>

A unique identifier for each next-hop.

next-hop-table-name
string

The next hop route table name.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "drop": true,
  • "null-send-unreach": true,
  • "preference": 0,
  • "weight": 0,
  • "resolve-host": true,
  • "null-send-prohibit": true,
  • "local": true,
  • "if-name": "string",
  • "ipv4-address": "string",
  • "resolve-attached": true,
  • "classify-table-name": "string",
  • "hop-id": 0,
  • "next-hop-table-name": "string"
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop)

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv4-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table:next-hop/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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

route
Array of objects (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route)

Routes are index by their destination.

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":
    [
    ]
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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
object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes)

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table: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

description
string

A description of the route.

destination-prefix
string

IPv6 destination prefix

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
{
  • "description": "string",
  • "destination-prefix": "string",
  • "next-hop":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv6-routes/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table: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 to list

description
string

A description of the route.

destination-prefix
string

IPv6 destination prefix

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
{
  • "description": "string",
  • "destination-prefix": "string",
  • "next-hop":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table: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
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route)

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv6-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv6-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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

hop
Array of objects (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop)

A list of next-hops.

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":
    [
    ]
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop)

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv6-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table:hop

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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

drop
boolean

Drop the packet.

null-send-unreach
boolean

Drop packet with an 'unreachable' reply.

preference
integer <int32>

Administrative distance preference.

weight
integer <int32>

Multipath route weight.

resolve-host
boolean

Resolve host

null-send-prohibit
boolean

Drop packet with a 'prohibited' reply.

local
boolean

Receive the packet locally.

ipv6-address
string

The next hop IPv6 address.

if-name
string

The next hop interface name.

resolve-attached
boolean

Resolve attached

classify-table-name
string

Use the given Classify Table name as the next hop.

hop-id
integer <int64>

A unique identifier for each next-hop.

next-hop-table-name
string

The next hop route table name.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "drop": true,
  • "null-send-unreach": true,
  • "preference": 0,
  • "weight": 0,
  • "resolve-host": true,
  • "null-send-prohibit": true,
  • "local": true,
  • "ipv6-address": "string",
  • "if-name": "string",
  • "resolve-attached": true,
  • "classify-table-name": "string",
  • "hop-id": 0,
  • "next-hop-table-name": "string"
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv6-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table:next-hop/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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 to list

drop
boolean

Drop the packet.

null-send-unreach
boolean

Drop packet with an 'unreachable' reply.

preference
integer <int32>

Administrative distance preference.

weight
integer <int32>

Multipath route weight.

resolve-host
boolean

Resolve host

null-send-prohibit
boolean

Drop packet with a 'prohibited' reply.

local
boolean

Receive the packet locally.

ipv6-address
string

The next hop IPv6 address.

if-name
string

The next hop interface name.

resolve-attached
boolean

Resolve attached

classify-table-name
string

Use the given Classify Table name as the next hop.

hop-id
integer <int64>

A unique identifier for each next-hop.

next-hop-table-name
string

The next hop route table name.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "drop": true,
  • "null-send-unreach": true,
  • "preference": 0,
  • "weight": 0,
  • "resolve-host": true,
  • "null-send-prohibit": true,
  • "local": true,
  • "ipv6-address": "string",
  • "if-name": "string",
  • "resolve-attached": true,
  • "classify-table-name": "string",
  • "hop-id": 0,
  • "next-hop-table-name": "string"
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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
object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop)

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

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-config/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv6-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table:next-hop/netgate-route-table: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":
    {
    }
}

returns netgate.route.table.routetablestate.StaticRoutes

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table: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/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table:static-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv4-routes/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv4-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv4-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv4-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table:next-hop/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv6-routes/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv6-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-route-table:route-table-state/netgate-route-table:static-routes/netgate-route-table:route-table={name}/netgate-route-table:ipv6-routes/netgate-route-table:route={destination-prefix}/netgate-route-table:next-hop/netgate-route-table: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/netgate-route-table:static-routes/netgate-route-table:route-table=%7Bname%7D/netgate-route-table:ipv6-routes/netgate-route-table:route=%7Bdestination-prefix%7D/netgate-route-table:next-hop/netgate-route-table: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":
    {
    }
}