netgate-host API (19.02)

This YANG module provides a data model for host data.

Copyright 2019 Rubicon Communications, LLC.

host-config

returns netgate.host.HostConfig

get /data/netgate-host:host-config

Example URL

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

Host configuration parameters.

Responses

200

netgate.host.HostConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-host: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

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

creates netgate.host.HostConfig

post /data/netgate-host:host-config

Example URL

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

Host configuration parameters.

Request Body schema: application/yang-data+json

netgate.host.HostConfig to be added to list

security
object (netgate.host.hostconfig.Security)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.host.HostConfig

put /data/netgate-host:host-config

Example URL

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

Host configuration parameters.

Request Body schema: application/yang-data+json

netgate.host.HostConfig to be added or updated

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

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.host.HostConfig

delete /data/netgate-host:host-config

Example URL

https://hostname/restconf/data/netgate-host: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: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.hostconfig.Security

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

Example URL

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

Host security configuration parameters.

Responses

200

netgate.host.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:host-config/netgate-host: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

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

creates netgate.host.hostconfig.Security

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

Example URL

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

Host security configuration parameters.

Request Body schema: application/yang-data+json

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

host-acls
object (netgate.host.hostconfig.security.HostAcls)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "host-acls":
    {
    }
}

creates or updates netgate.host.hostconfig.Security

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

Example URL

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

Host security configuration parameters.

Request Body schema: application/yang-data+json

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

netgate-host:security
object (netgate.host.hostconfig.Security)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.host.hostconfig.Security

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

Example URL

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

Host security 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:host-config/netgate-host:security"

	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.hostconfig.security.HostAcls

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

Example URL

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

Host access lists (ACLs).

Responses

200

netgate.host.hostconfig.security.HostAcls

400

Internal error

Request samples

Copy
package main

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

func main() {

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

	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

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host:host-acls":
    {
    }
}

creates netgate.host.hostconfig.security.HostAcls

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

Example URL

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

Host access lists (ACLs).

Request Body schema: application/yang-data+json

netgate.host.hostconfig.security.HostAcls to be added to list

host-acl
Array of objects (netgate.host.hostconfig.security.hostacls.HostAcl)

The list of configured host ACLs.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "host-acl":
    [
    ]
}

creates or updates netgate.host.hostconfig.security.HostAcls

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

Example URL

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

Host access lists (ACLs).

Request Body schema: application/yang-data+json

netgate.host.hostconfig.security.HostAcls to be added or updated

netgate-host:host-acls
object (netgate.host.hostconfig.security.HostAcls)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-host:host-acls":
    {
    }
}

removes netgate.host.hostconfig.security.HostAcls

delete /data/netgate-host:host-config/netgate-host:security/netgate-host:host-acls

Example URL

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

Host access lists (ACLs).

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:host-config/netgate-host:security/netgate-host:host-acls"

	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.host.hostconfig.security.hostacls.HostAcl

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

Example URL

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

The list of configured host ACLs.

Request Body schema: application/yang-data+json

netgate.host.hostconfig.security.hostacls.HostAcl to be added to list

acl-seq
integer <int64