netgate-host-acl API (23.06)

This YANG module provides a data model for host ACL data.

Copyright 2019-2020 Rubicon Communications, LLC.

host-config

returns netgate.host.acl.HostConfig

get /data/netgate-host-acl:host-config

Example URL

https://hostname/restconf/data/netgate-host-acl:host-config

Host configuration parameters.

Responses

200

netgate.host.acl.HostConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.host.acl.HostConfig

post /data/netgate-host-acl:host-config

Example URL

https://hostname/restconf/data/netgate-host-acl:host-config

Host configuration parameters.

Request Body schema: application/yang-data+json

netgate.host.acl.HostConfig to be added to list

netgate-host-acl:host-config
object (netgate.host.acl.HostConfig)

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

creates or updates netgate.host.acl.HostConfig

put /data/netgate-host-acl:host-config

Example URL

https://hostname/restconf/data/netgate-host-acl:host-config

Host configuration parameters.

Request Body schema: application/yang-data+json

netgate.host.acl.HostConfig to be added or updated

netgate-host-acl:host-config-wrapper
object (netgate.host.acl.HostConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.host.acl.HostConfig

delete /data/netgate-host-acl:host-config

Example URL

https://hostname/restconf/data/netgate-host-acl:host-config

Host configuration parameters.

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-host-acl:host-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.host.acl.hostconfig.Security

get /data/netgate-host-acl:host-config/security

Example URL

https://hostname/restconf/data/netgate-host-acl:host-config/security

Host security configuration parameters.

Responses

200

netgate.host.acl.hostconfig.Security

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host-acl:host-config/security"

	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-host-acl:security-wrapper":
    {
    }
}

creates netgate.host.acl.hostconfig.Security

post /data/netgate-host-acl:host-config/security

Example URL

https://hostname/restconf/data/netgate-host-acl:host-config/security

Host security configuration parameters.

Request Body schema: application/yang-data+json

netgate.host.acl.hostconfig.Security to be added to list

security
object (netgate.host.acl.hostconfig.Security)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.host.acl.hostconfig.Security

put /data/netgate-host-acl:host-config/security

Example URL

https://hostname/restconf/data/netgate-host-acl:host-config/security

Host security configuration parameters.

Request Body schema: application/yang-data+json

netgate.host.acl.hostconfig.Security to be added or updated

netgate-host-acl:security-wrapper
object (netgate.host.acl.hostconfig.SecurityWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host-acl:security-wrapper":
    {