netgate-neighbor API (19.02)

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

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

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

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

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
object (netgate.neighbor.NeighborConfig)

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

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/netgate-neighbor:neighbor-table

Example URL

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

creates netgate.neighbor.neighborconfig.NeighborTable

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

Example URL

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

Neighbor mapping table.

Request Body schema: application/yang-data+json

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

interface
Array of objects (netgate.neighbor.neighborconfig.neighbortable.Interface)

Neighbor table entry.

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

creates or updates netgate.neighbor.neighborconfig.NeighborTable

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

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/netgate-neighbor: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
object (netgate.neighbor.neighborconfig.NeighborTable)

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

removes netgate.neighbor.neighborconfig.NeighborTable

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

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/netgate-neighbor: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/netgate-neighbor: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/netgate-neighbor:neighbor-table/netgate-neighbor:interface

Example URL

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

Neighbor table entry.

Request Body schema: application/yang-data+json

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

if-name
string

The interface on which the neighbor entry is found.

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
{
  • "if-name": "string",
  • "neighbors":
    {
    }
}

returns netgate.neighbor.neighborconfig.neighbortable.Interface

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

Example URL

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

creates netgate.neighbor.neighborconfig.neighbortable.Interface

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

Example URL

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

if-name
string

The interface on which the neighbor entry is found.

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
{
  • "if-name": "string",
  • "neighbors":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/netgate-neighbor:neighbor-table/netgate-neighbor: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
object (netgate.neighbor.neighborconfig.neighbortable.Interface)

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

removes netgate.neighbor.neighborconfig.neighbortable.Interface

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

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/netgate-neighbor:neighbor-table/netgate-neighbor: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/netgate-neighbor:neighbor-table/netgate-neighbor: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/netgate-neighbor:neighbor-table/netgate-neighbor:interface={if-name}/netgate-neighbor:neighbors

Example URL

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

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

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

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-config/netgate-neighbor:neighbor-table/netgate-neighbor:interface={if-name}/netgate-neighbor: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

neighbor-entry
Array of objects (netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry)

Neighbor entry table.

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-entry":
    [