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

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

put /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 or updated

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

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

removes netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors

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

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

	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.neighbors.NeighborEntry

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

Example URL

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

Neighbor entry table.

path Parameters
if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry to be added to list

mac-address
string

The MAC address of an neighbor entry.

ip-address
string

The IP address whose MAC address is stated.

is-no-route-table-entry
boolean

True if this neighbor entry is shoud have no entry made in the adjacency route 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
{
  • "mac-address": "string",
  • "ip-address": "string",
  • "is-no-route-table-entry": true
}

returns netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry

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

Example URL

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

Neighbor entry table.

path Parameters
if-name
required
string

Id of interface

ip-address
required
string

Id of neighbor-entry

Responses

200

netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry

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/netgate-neighbor:neighbor-entry=%7Bip-address%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:neighbor-entry":
    {
    }
}

creates netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry

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

Example URL

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

Neighbor entry table.

path Parameters
if-name
required
string

Id of interface

ip-address
required
string

Id of neighbor-entry

Request Body schema: application/yang-data+json

netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry to be added to list

mac-address
string

The MAC address of an neighbor entry.

ip-address
string

The IP address whose MAC address is stated.

is-no-route-table-entry
boolean

True if this neighbor entry is shoud have no entry made in the adjacency route 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
{
  • "mac-address": "string",
  • "ip-address": "string",
  • "is-no-route-table-entry": true
}

creates or updates netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry

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

Example URL

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

Neighbor entry table.

path Parameters
if-name
required
string

Id of interface

ip-address
required
string

Id of neighbor-entry

Request Body schema: application/yang-data+json

netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry to be added or updated

netgate-neighbor:neighbor-entry
object (netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry)

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

removes netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry

delete /data/netgate-neighbor:neighbor-config/netgate-neighbor:neighbor-table/netgate-neighbor:interface={if-name}/netgate-neighbor:neighbors/netgate-neighbor:neighbor-entry={ip-address}

Example URL

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

Neighbor entry table.

path Parameters
if-name
required
string

Id of interface

ip-address
required
string

Id of neighbor-entry

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/netgate-neighbor:neighbors/netgate-neighbor:neighbor-entry=%7Bip-address%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))

}

neighbor-state

returns netgate.neighbor.NeighborState

get /data/netgate-neighbor:neighbor-state

Example URL

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

Neighbor table state.

Responses

200

netgate.neighbor.NeighborState

400

Internal error

Request samples

Copy
package main

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

func main() {

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

returns netgate.neighbor.neighborstate.NeighborTable

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

Example URL

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

Neighbor mapping table.

Responses

200

netgate.neighbor.neighborstate.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-state/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":
    {
    }
}

returns netgate.neighbor.neighborstate.neighbortable.Interface

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

Example URL

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

returns netgate.neighbor.neighborstate.neighbortable.interface.Neighbors

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

Example URL

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

returns netgate.neighbor.neighborstate.neighbortable.interface.neighbors.NeighborEntry

get /data/netgate-neighbor:neighbor-state/netgate-neighbor:neighbor-table/netgate-neighbor:interface={if-name}/netgate-neighbor:neighbors/netgate-neighbor:neighbor-entry={ip-address}

Example URL

https://hostname/restconf/data/netgate-neighbor:neighbor-state/netgate-neighbor:neighbor-table/netgate-neighbor:interface={if-name}/netgate-neighbor:neighbors/netgate-neighbor:neighbor-entry={ip-address}

Neighbor entry table.

path Parameters
if-name
required
string

Id of interface

ip-address
required
string

Id of neighbor-entry

Responses

200

netgate.neighbor.neighborstate.neighbortable.interface.neighbors.NeighborEntry

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-neighbor:neighbor-state/netgate-neighbor:neighbor-table/netgate-neighbor:interface=%7Bif-name%7D/netgate-neighbor:neighbors/netgate-neighbor:neighbor-entry=%7Bip-address%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:neighbor-entry":
    {
    }
}