ietf-netconf-acm API (24.02)

Network Configuration Access Control Model.

Copyright (c) 2012 - 2018 IETF Trust and the persons identified as authors of the code. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info).

This version of this YANG module is part of RFC 8341; see the RFC itself for full legal notices.

nacm

returns ietf.netconf.acm.Nacm

get /data/ietf-netconf-acm:nacm

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm

Parameters for NETCONF access control model.

Responses

200

ietf.netconf.acm.Nacm

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/ietf-netconf-acm:nacm"

	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
{
  • "ietf-netconf-acm:nacm-wrapper":
    {
    }
}

creates ietf.netconf.acm.Nacm

post /data/ietf-netconf-acm:nacm

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm

Parameters for NETCONF access control model.

Request Body schema: application/yang-data+json

ietf.netconf.acm.Nacm to be added to list

ietf-netconf-acm:nacm
object (ietf.netconf.acm.Nacm)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ietf-netconf-acm:nacm":
    {
    }
}

creates or updates ietf.netconf.acm.Nacm

put /data/ietf-netconf-acm:nacm

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm

Parameters for NETCONF access control model.

Request Body schema: application/yang-data+json

ietf.netconf.acm.Nacm to be added or updated

ietf-netconf-acm:nacm-wrapper
object (ietf.netconf.acm.NacmWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ietf-netconf-acm:nacm-wrapper":
    {
    }
}

removes ietf.netconf.acm.Nacm

delete /data/ietf-netconf-acm:nacm

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm

Parameters for NETCONF access control model.

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/ietf-netconf-acm:nacm"

	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 ietf.netconf.acm.nacm.Groups

get /data/ietf-netconf-acm:nacm/groups

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/groups

NETCONF access control groups.

Responses

200

ietf.netconf.acm.nacm.Groups

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/ietf-netconf-acm:nacm/groups"

	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
{
  • "ietf-netconf-acm:groups-wrapper":
    {
    }
}

creates ietf.netconf.acm.nacm.Groups

post /data/ietf-netconf-acm:nacm/groups

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/groups

NETCONF access control groups.

Request Body schema: application/yang-data+json

ietf.netconf.acm.nacm.Groups to be added to list

groups
object (ietf.netconf.acm.nacm.Groups)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates ietf.netconf.acm.nacm.Groups

put /data/ietf-netconf-acm:nacm/groups

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/groups

NETCONF access control groups.

Request Body schema: application/yang-data+json

ietf.netconf.acm.nacm.Groups to be added or updated

ietf-netconf-acm:groups-wrapper
object (ietf.netconf.acm.nacm.GroupsWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ietf-netconf-acm:groups-wrapper":
    {
    }
}

removes ietf.netconf.acm.nacm.Groups

delete /data/ietf-netconf-acm:nacm/groups

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/groups

NETCONF access control groups.

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/ietf-netconf-acm:nacm/groups"

	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 ietf.netconf.acm.nacm.groups.Group

post /data/ietf-netconf-acm:nacm/groups/group

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/groups/group

One NACM group entry. This list will only contain configured entries, not any entries learned from any transport protocols.

Request Body schema: application/yang-data+json

ietf.netconf.acm.nacm.groups.Group to be added to list

group
object (ietf.netconf.acm.nacm.groups.Group)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns ietf.netconf.acm.nacm.groups.Group

get /data/ietf-netconf-acm:nacm/groups/group={name}

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/groups/group={name}

One NACM group entry. This list will only contain configured entries, not any entries learned from any transport protocols.

path Parameters
name
required
string

Id of group

Responses

200

ietf.netconf.acm.nacm.groups.Group

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/ietf-netconf-acm:nacm/groups/group=%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
{
  • "ietf-netconf-acm:group-wrapper":
    {
    }
}

creates or updates ietf.netconf.acm.nacm.groups.Group

put /data/ietf-netconf-acm:nacm/groups/group={name}

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/groups/group={name}

One NACM group entry. This list will only contain configured entries, not any entries learned from any transport protocols.

path Parameters
name
required
string

Id of group

Request Body schema: application/yang-data+json

ietf.netconf.acm.nacm.groups.Group to be added or updated

ietf-netconf-acm:group-wrapper
object (ietf.netconf.acm.nacm.groups.GroupWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ietf-netconf-acm:group-wrapper":
    {
    }
}

removes ietf.netconf.acm.nacm.groups.Group

delete /data/ietf-netconf-acm:nacm/groups/group={name}

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/groups/group={name}

One NACM group entry. This list will only contain configured entries, not any entries learned from any transport protocols.

path Parameters
name
required
string

Id of group

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/ietf-netconf-acm:nacm/groups/group=%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))

}

creates ietf.netconf.acm.nacm.RuleList

post /data/ietf-netconf-acm:nacm/rule-list

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list

An ordered collection of access control rules.

Request Body schema: application/yang-data+json

ietf.netconf.acm.nacm.RuleList to be added to list

rule-list
object (ietf.netconf.acm.nacm.RuleList)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns ietf.netconf.acm.nacm.RuleList

get /data/ietf-netconf-acm:nacm/rule-list={name}

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list={name}

An ordered collection of access control rules.

path Parameters
name
required
string

Id of rule-list

Responses

200

ietf.netconf.acm.nacm.RuleList

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list=%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
{
  • "ietf-netconf-acm:rule-list-wrapper":
    {
    }
}

creates or updates ietf.netconf.acm.nacm.RuleList

put /data/ietf-netconf-acm:nacm/rule-list={name}

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list={name}

An ordered collection of access control rules.

path Parameters
name
required
string

Id of rule-list

Request Body schema: application/yang-data+json

ietf.netconf.acm.nacm.RuleList to be added or updated

ietf-netconf-acm:rule-list-wrapper
object (ietf.netconf.acm.nacm.RuleListWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ietf-netconf-acm:rule-list-wrapper":
    {
    }
}

removes ietf.netconf.acm.nacm.RuleList

delete /data/ietf-netconf-acm:nacm/rule-list={name}

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list={name}

An ordered collection of access control rules.

path Parameters
name
required
string

Id of rule-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/ietf-netconf-acm:nacm/rule-list=%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))

}

creates ietf.netconf.acm.nacm.rulelist.Rule

post /data/ietf-netconf-acm:nacm/rule-list={name}/rule

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list={name}/rule

One access control rule.

          Rules are processed in user-defined order until a match is
          found.  A rule matches if 'module-name', 'rule-type', and
          'access-operations' match the request.  If a rule
          matches, the 'action' leaf determines whether or not
          access is granted.
path Parameters
name
required
string

Id of rule-list

Request Body schema: application/yang-data+json

ietf.netconf.acm.nacm.rulelist.Rule to be added to list

rule
object (ietf.netconf.acm.nacm.rulelist.Rule)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

returns ietf.netconf.acm.nacm.rulelist.Rule

get /data/ietf-netconf-acm:nacm/rule-list={name}/rule={rule-name}

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list={name}/rule={rule-name}

One access control rule.

          Rules are processed in user-defined order until a match is
          found.  A rule matches if 'module-name', 'rule-type', and
          'access-operations' match the request.  If a rule
          matches, the 'action' leaf determines whether or not
          access is granted.
path Parameters
name
required
string

Id of rule-list

rule-name
required
string

Id of rule

Responses

200

ietf.netconf.acm.nacm.rulelist.Rule

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list=%7Bname%7D/rule=%7Brule-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

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ietf-netconf-acm:rule-wrapper":
    {
    }
}

creates or updates ietf.netconf.acm.nacm.rulelist.Rule

put /data/ietf-netconf-acm:nacm/rule-list={name}/rule={rule-name}

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list={name}/rule={rule-name}

One access control rule.

          Rules are processed in user-defined order until a match is
          found.  A rule matches if 'module-name', 'rule-type', and
          'access-operations' match the request.  If a rule
          matches, the 'action' leaf determines whether or not
          access is granted.
path Parameters
name
required
string

Id of rule-list

rule-name
required
string

Id of rule

Request Body schema: application/yang-data+json

ietf.netconf.acm.nacm.rulelist.Rule to be added or updated

ietf-netconf-acm:rule-wrapper
object (ietf.netconf.acm.nacm.rulelist.RuleWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ietf-netconf-acm:rule-wrapper":
    {
    }
}

removes ietf.netconf.acm.nacm.rulelist.Rule

delete /data/ietf-netconf-acm:nacm/rule-list={name}/rule={rule-name}

Example URL

https://hostname/restconf/data/ietf-netconf-acm:nacm/rule-list={name}/rule={rule-name}

One access control rule.

          Rules are processed in user-defined order until a match is
          found.  A rule matches if 'module-name', 'rule-type', and
          'access-operations' match the request.  If a rule
          matches, the 'action' leaf determines whether or not
          access is granted.
path Parameters
name
required
string

Id of rule-list

rule-name
required
string

Id of rule

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/ietf-netconf-acm:nacm/rule-list=%7Bname%7D/rule=%7Brule-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))

}