netgate-gre API (24.02)

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

Copyright 2018-2020 Rubicon Communications, LLC.

gre-config

returns netgate.gre.GreConfig

get /data/netgate-gre:gre-config

Example URL

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

Configuration for GRE tunnels.

Responses

200

netgate.gre.GreConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.gre.GreConfig

post /data/netgate-gre:gre-config

Example URL

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

Configuration for GRE tunnels.

Request Body schema: application/yang-data+json

netgate.gre.GreConfig to be added to list

netgate-gre:gre-config
object (netgate.gre.GreConfig)

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

creates or updates netgate.gre.GreConfig

put /data/netgate-gre:gre-config

Example URL

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

Configuration for GRE tunnels.

Request Body schema: application/yang-data+json

netgate.gre.GreConfig to be added or updated

netgate-gre:gre-config-wrapper
object (netgate.gre.GreConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.gre.GreConfig

delete /data/netgate-gre:gre-config

Example URL

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

Configuration for GRE tunnels.

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-gre:gre-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.gre.greconfig.GreTable

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

Example URL

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

GRE table.

Responses

200

netgate.gre.greconfig.GreTable

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.gre.greconfig.GreTable

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

Example URL

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

GRE table.

Request Body schema: application/yang-data+json

netgate.gre.greconfig.GreTable to be added to list

gre-table
object (netgate.gre.greconfig.GreTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.gre.greconfig.GreTable

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

Example URL

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

GRE table.

Request Body schema: application/yang-data+json

netgate.gre.greconfig.GreTable to be added or updated

netgate-gre:gre-table-wrapper
object (netgate.gre.greconfig.GreTableWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.gre.greconfig.GreTable

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

Example URL

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

GRE 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-gre:gre-config/gre-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.gre.greconfig.gretable.Tunnel

post /data/netgate-gre:gre-config/gre-table/tunnel

Example URL

https://hostname/restconf/data/netgate-gre:gre-config/gre-table/tunnel

GRE tunnel configuration.

Request Body schema: application/yang-data+json

netgate.gre.greconfig.gretable.Tunnel to be added to list

tunnel
object (netgate.gre.greconfig.gretable.Tunnel)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns netgate.gre.greconfig.gretable.Tunnel

get /data/netgate-gre:gre-config/gre-table/tunnel={name}

Example URL

https://hostname/restconf/data/netgate-gre:gre-config/gre-table/tunnel={name}

GRE tunnel configuration.

path Parameters
name
required
string

Id of tunnel

Responses

200

netgate.gre.greconfig.gretable.Tunnel

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates or updates netgate.gre.greconfig.gretable.Tunnel

put /data/netgate-gre:gre-config/gre-table/tunnel={name}

Example URL

https://hostname/restconf/data/netgate-gre:gre-config/gre-table/tunnel={name}

GRE tunnel configuration.

path Parameters
name
required
string

Id of tunnel

Request Body schema: application/yang-data+json

netgate.gre.greconfig.gretable.Tunnel to be added or updated

netgate-gre:tunnel-wrapper
object (netgate.gre.greconfig.gretable.TunnelWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.gre.greconfig.gretable.Tunnel

delete /data/netgate-gre:gre-config/gre-table/tunnel={name}

Example URL

https://hostname/restconf/data/netgate-gre:gre-config/gre-table/tunnel={name}

GRE tunnel configuration.

path Parameters
name
required
string

Id of tunnel

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-gre:gre-config/gre-table/tunnel=%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))

}

gre-state

returns netgate.gre.GreState

get /data/netgate-gre:gre-state

Example URL

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

State of the GRE tunnels.

Responses

200

netgate.gre.GreState

400

Internal error

Request samples

Copy
package main

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

func main() {

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

returns netgate.gre.grestate.GreTable

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

Example URL

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

GRE table.

Responses

200

netgate.gre.grestate.GreTable

400

Internal error

Request samples

Copy
package main

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

func main() {

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

returns netgate.gre.grestate.gretable.Tunnel

get /data/netgate-gre:gre-state/gre-table/tunnel={name}

Example URL

https://hostname/restconf/data/netgate-gre:gre-state/gre-table/tunnel={name}

GRE tunnel name.

path Parameters
name
required
string

Id of tunnel

Responses

200

netgate.gre.grestate.gretable.Tunnel

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-gre:gre-state/gre-table/tunnel=%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-gre:tunnel-wrapper":
    {
    }
}