netgate-acl API (19.02)

This YANG module provides a Netgate-defined data-model for Access Control Lists.

Copyright 2017-2019 Rubicon Communications, LLC.

acl-config

returns netgate.acl.AclConfig

get /data/netgate-acl:acl-config

Example URL

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

Access Control Lists (ACL) data needed to support VPP.

Responses

200

netgate.acl.AclConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.acl.AclConfig

post /data/netgate-acl:acl-config

Example URL

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

Access Control Lists (ACL) data needed to support VPP.

Request Body schema: application/yang-data+json

netgate.acl.AclConfig to be added to list

macip-table
object (netgate.acl.aclconfig.MacipTable)
acl-table
object (netgate.acl.aclconfig.AclTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "macip-table":
    {
    },
  • "acl-table":
    {
    }
}

creates or updates netgate.acl.AclConfig

put /data/netgate-acl:acl-config

Example URL

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

Access Control Lists (ACL) data needed to support VPP.

Request Body schema: application/yang-data+json

netgate.acl.AclConfig to be added or updated

netgate-acl:acl-config
object (netgate.acl.AclConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.acl.AclConfig

delete /data/netgate-acl:acl-config

Example URL

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

Access Control Lists (ACL) data needed to support VPP.

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-acl:acl-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.acl.aclconfig.AclTable

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

Example URL

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

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Responses

200

netgate.acl.aclconfig.AclTable

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

creates netgate.acl.aclconfig.AclTable

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

Example URL

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

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.AclTable to be added to list

acl-list
Array of objects (netgate.acl.aclconfig.acltable.AclList)

ACL list name.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.acl.aclconfig.AclTable

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

Example URL

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

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.AclTable to be added or updated

netgate-acl:acl-table
object (netgate.acl.aclconfig.AclTable)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.acl.aclconfig.AclTable

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

Example URL

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

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

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-acl:acl-config/netgate-acl:acl-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.acl.aclconfig.acltable.AclList

post /data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list

Example URL

https://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list

ACL list name.

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.AclList to be added to list

acl-name
string

The ACL name as supplied by the developer. It is a unique name used to identify this set of ACL Rules.

acl-rules
object (netgate.acl.aclconfig.acltable.acllist.AclRules)
acl-description
string

A text description for the ACL.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "acl-name": "string",
  • "acl-rules":
    {
    },
  • "acl-description": "string"
}

returns netgate.acl.aclconfig.acltable.AclList

get /data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}

Example URL

https://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}

ACL list name.

path Parameters
acl-name
required
string

Id of acl-list

Responses

200

netgate.acl.aclconfig.acltable.AclList

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list=%7Bacl-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

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

creates netgate.acl.aclconfig.acltable.AclList

post /data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}

Example URL

https://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}

ACL list name.

path Parameters
acl-name
required
string

Id of acl-list

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.AclList to be added to list

acl-name
string

The ACL name as supplied by the developer. It is a unique name used to identify this set of ACL Rules.

acl-rules
object (netgate.acl.aclconfig.acltable.acllist.AclRules)
acl-description
string

A text description for the ACL.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "acl-name": "string",
  • "acl-rules":
    {
    },
  • "acl-description": "string"
}

creates or updates netgate.acl.aclconfig.acltable.AclList

put /data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}

Example URL

https://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}

ACL list name.

path Parameters
acl-name
required
string

Id of acl-list

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.AclList to be added or updated

netgate-acl:acl-list
object (netgate.acl.aclconfig.acltable.AclList)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.acl.aclconfig.acltable.AclList

delete /data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}

Example URL

https://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}

ACL list name.

path Parameters
acl-name
required
string

Id of acl-list

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-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list=%7Bacl-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.acl.aclconfig.acltable.acllist.AclRules

get /data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}/netgate-acl:acl-rules

Example URL

https://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}/netgate-acl:acl-rules

ACL Rule Table ordered by sequence number.

path Parameters
acl-name
required
string

Id of acl-list

Responses

200

netgate.acl.aclconfig.acltable.acllist.AclRules

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list=%7Bacl-name%7D/netgate-acl:acl-rules"

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

creates netgate.acl.aclconfig.acltable.acllist.AclRules

post /data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}/netgate-acl:acl-rules

Example URL

https://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}/netgate-acl:acl-rules

ACL Rule Table ordered by sequence number.

path Parameters
acl-name
required
string

Id of acl-list

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.acllist.AclRules to be added to list

acl-rule
Array of objects (netgate.acl.aclconfig.acltable.acllist.aclrules.AclRule)

A List of ACL Rules.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.acl.aclconfig.acltable.acllist.AclRules

put /data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}/netgate-acl:acl-rules

Example URL

https://hostname/restconf/data/netgate-acl:acl-config/netgate-acl:acl-table/netgate-acl:acl-list={acl-name}/netgate-acl:acl-rules

ACL Rule Table ordered by sequence number.

path Parameters
acl-name
required
string

Id of acl-list

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.acllist.AclRules to be added or updated

netgate-acl:acl-rules
object (netgate.acl.aclconfig.acltable.acllist.AclRules)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-acl:acl-rules":
    {