netgate-snmp API (22.10)

This YANG module provides a data model for SNMP Services.

Copyright 2019-2020 Rubicon Communications, LLC.

snmp-config

returns netgate.snmp.SnmpConfig

get /data/netgate-snmp:snmp-config

Example URL

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

returns netgate.snmp.SnmpConfig

Responses

200

netgate.snmp.SnmpConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.snmp.SnmpConfig

post /data/netgate-snmp:snmp-config

Example URL

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

creates netgate.snmp.SnmpConfig

Request Body schema: application/yang-data+json

netgate.snmp.SnmpConfig to be added to list

netgate-snmp:snmp-config
object (netgate.snmp.SnmpConfig)

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

creates or updates netgate.snmp.SnmpConfig

put /data/netgate-snmp:snmp-config

Example URL

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

creates or updates netgate.snmp.SnmpConfig

Request Body schema: application/yang-data+json

netgate.snmp.SnmpConfig to be added or updated

netgate-snmp:snmp-config-wrapper
object (netgate.snmp.SnmpConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.snmp.SnmpConfig

delete /data/netgate-snmp:snmp-config

Example URL

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

removes netgate.snmp.SnmpConfig

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-snmp:snmp-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.snmp.snmpconfig.Dataplane

get /data/netgate-snmp:snmp-config/dataplane

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/dataplane

Dataplane-specific parameters of SNMP server.

Responses

200

netgate.snmp.snmpconfig.Dataplane

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-snmp:snmp-config/dataplane"

	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-snmp:dataplane-wrapper":
    {
    }
}

creates netgate.snmp.snmpconfig.Dataplane

post /data/netgate-snmp:snmp-config/dataplane

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/dataplane

Dataplane-specific parameters of SNMP server.

Request Body schema: application/yang-data+json

netgate.snmp.snmpconfig.Dataplane to be added to list

dataplane
object (netgate.snmp.snmpconfig.Dataplane)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.snmp.snmpconfig.Dataplane

put /data/netgate-snmp:snmp-config/dataplane

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/dataplane

Dataplane-specific parameters of SNMP server.

Request Body schema: application/yang-data+json

netgate.snmp.snmpconfig.Dataplane to be added or updated

netgate-snmp:dataplane-wrapper
object (netgate.snmp.snmpconfig.DataplaneWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.snmp.snmpconfig.Dataplane

delete /data/netgate-snmp:snmp-config/dataplane

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/dataplane

Dataplane-specific parameters of SNMP server.

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-snmp:snmp-config/dataplane"

	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.snmp.snmpconfig.SnmpAccessControl

get /data/netgate-snmp:snmp-config/snmp-access-control

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/snmp-access-control

returns netgate.snmp.snmpconfig.SnmpAccessControl

Responses

200

netgate.snmp.snmpconfig.SnmpAccessControl

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-snmp:snmp-config/snmp-access-control"

	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-snmp:snmp-access-control-wrapper":
    {
    }
}

creates netgate.snmp.snmpconfig.SnmpAccessControl

post /data/netgate-snmp:snmp-config/snmp-access-control

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/snmp-access-control

creates netgate.snmp.snmpconfig.SnmpAccessControl

Request Body schema: application/yang-data+json

netgate.snmp.snmpconfig.SnmpAccessControl to be added to list

snmp-access-control
object (netgate.snmp.snmpconfig.SnmpAccessControl)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.snmp.snmpconfig.SnmpAccessControl

put /data/netgate-snmp:snmp-config/snmp-access-control

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/snmp-access-control

creates or updates netgate.snmp.snmpconfig.SnmpAccessControl

Request Body schema: application/yang-data+json

netgate.snmp.snmpconfig.SnmpAccessControl to be added or updated

netgate-snmp:snmp-access-control-wrapper
object (netgate.snmp.snmpconfig.SnmpAccessControlWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-snmp:snmp-access-control-wrapper":
    {