netgate-netfilter API (19.02)

This YANG module provides a data model for Host Netfilter Tables.

Copyright 2018 Rubicon Communications, LLC.

netfilter-config

returns netgate.netfilter.NetfilterConfig

get /data/netgate-netfilter:netfilter-config

Example URL

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

returns netgate.netfilter.NetfilterConfig

Responses

200

netgate.netfilter.NetfilterConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.netfilter.NetfilterConfig

post /data/netgate-netfilter:netfilter-config

Example URL

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

creates netgate.netfilter.NetfilterConfig

Request Body schema: application/yang-data+json

netgate.netfilter.NetfilterConfig to be added to list

tables
object (netgate.netfilter.netfilterconfig.Tables)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.netfilter.NetfilterConfig

put /data/netgate-netfilter:netfilter-config

Example URL

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

creates or updates netgate.netfilter.NetfilterConfig

Request Body schema: application/yang-data+json

netgate.netfilter.NetfilterConfig to be added or updated

netgate-netfilter:netfilter-config
object (netgate.netfilter.NetfilterConfig)

Responses

201

Object created

204