netgate-neighbor API (22.10)

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

Copyright 2017-2020 Rubicon Communications, LLC.

neighbor-config

returns netgate.neighbor.NeighborConfig

get /data/netgate-neighbor:neighbor-config

Example URL

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

Neighbor configuration data.

Responses

200

netgate.neighbor.NeighborConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.neighbor.NeighborConfig

post /data/netgate-neighbor:neighbor-config

Example URL

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

Neighbor configuration data.

Request Body schema: application/yang-data+json

netgate.neighbor.NeighborConfig to be added to list

netgate-neighbor:neighbor-config
object (netgate.neighbor.NeighborConfig)

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

creates or updates netgate.neighbor.NeighborConfig

put /data/netgate-neighbor:neighbor-config

Example URL

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

Neighbor configuration data.

Request Body schema: application/yang-data+json

netgate.neighbor.NeighborConfig to be added or updated

netgate-neighbor:neighbor-config-wrapper
object (netgate.neighbor.NeighborConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.neighbor.NeighborConfig

delete /data/netgate-neighbor:neighbor-config

Example URL

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

Neighbor configuration data.

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-neighbor:neighbor-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.neighbor.neighborconfig.NeighborTable

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

Example URL

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

Neighbor mapping table.

Responses

200

netgate.neighbor.neighborconfig.NeighborTable

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table"

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

creates netgate.neighbor.neighborconfig.NeighborTable

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

Example URL

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

Neighbor mapping table.

Request Body schema: application/yang-data+json

netgate.neighbor.neighborconfig.NeighborTable to be added to list

neighbor-table
object (netgate.neighbor.neighborconfig.NeighborTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.neighbor.neighborconfig.NeighborTable

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

Example URL

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

Neighbor mapping table.

Request Body schema: application/yang-data+json

netgate.neighbor.neighborconfig.NeighborTable to be added or updated

netgate-neighbor:neighbor-table-wrapper
object (netgate.neighbor.neighborconfig.NeighborTableWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.neighbor.neighborconfig.NeighborTable

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

Example URL

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

Neighbor mapping 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-neighbor:neighbor-config/neighbor-table"

	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.neighbor.neighborconfig.neighbortable.Interface

post /data/netgate-neighbor:neighbor-config/neighbor-table/interface

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface

Neighbor table entry.

Request Body schema: application/yang-data+json

netgate.neighbor.neighborconfig.neighbortable.Interface to be added to list

interface
object (netgate.neighbor.neighborconfig.neighbortable.Interface)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns netgate.neighbor.neighborconfig.neighbortable.Interface

get /data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}

Neighbor table entry.

path Parameters
if-name
required
string

Id of interface

Responses

200

netgate.neighbor.neighborconfig.neighbortable.Interface

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface=%7Bif-name%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-neighbor:interface-wrapper":
    {
    }
}

creates or updates netgate.neighbor.neighborconfig.neighbortable.Interface

put /data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}

Neighbor table entry.

path Parameters
if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.neighbor.neighborconfig.neighbortable.Interface to be added or updated

netgate-neighbor:interface-wrapper
object (netgate.neighbor.neighborconfig.neighbortable.InterfaceWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.neighbor.neighborconfig.neighbortable.Interface

delete /data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}

Neighbor table entry.

path Parameters
if-name
required
string

Id of interface

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-neighbor:neighbor-config/neighbor-table/interface=%7Bif-name%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.neighbor.neighborconfig.neighbortable.interface.Neighbors

get /data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}/neighbors

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}/neighbors

Addresses for which there is a neighbor Entry.

path Parameters
if-name
required
string

Id of interface

Responses

200

netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface=%7Bif-name%7D/neighbors"

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

creates netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors

post /data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}/neighbors

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}/neighbors

Addresses for which there is a neighbor Entry.

path Parameters
if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors to be added to list

neighbors
object (netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors

put /data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}/neighbors

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface={if-name}/neighbors

Addresses for which there is a neighbor Entry.

path Parameters
if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors to be added or updated

netgate-neighbor:neighbors-wrapper
object (netgate.neighbor.neighborconfig.neighbortable.interface.NeighborsWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-neighbor:neighbors-wrapper":
    {