netgate-system API (19.08)

This YANG module provides a Netgate-defined data-model for SYSTEM data.

Copyright 2018-2019 Rubicon Communications, LLC.

system-state

returns netgate.system.SystemState

get /data/netgate-system:system-state

Example URL

https://hostname/restconf/data/netgate-system:system-state

System group operational state.

Responses

200

netgate.system.SystemState

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-system:system-state"

	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-system:system-state":
    {
    }
}

returns netgate.system.systemstate.Platform

get /data/netgate-system:system-state/netgate-system:platform

Example URL

https://hostname/restconf/data/netgate-system:system-state/netgate-system:platform

Contains vendor-specific information for identifying the system platform and operating system.

Responses

200

netgate.system.systemstate.Platform

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-system:system-state/netgate-system:platform"

	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-system:platform":
    {
    }
}

returns netgate.system.systemstate.Product

get /data/netgate-system:system-state/netgate-system:product

Example URL

https://hostname/restconf/data/netgate-system:system-state/netgate-system:product

Product specific information.

Responses

200

netgate.system.systemstate.Product

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-system:system-state/netgate-system:product"

	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-system:product":
    {
    }
}

system

returns netgate.system.System

get /data/netgate-system:system

Example URL

https://hostname/restconf/data/netgate-system:system

System group configuration.

Responses

200

netgate.system.System

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-system:system"

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

creates netgate.system.System

post /data/netgate-system:system

Example URL

https://hostname/restconf/data/netgate-system:system

System group configuration.

Request Body schema: application/yang-data+json

netgate.system.System to be added to list

name
string

The name of the host. This name can be a single domain label or the fully qualified domain name of the host.

description
string

A textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software. It is mandatory that this only contain printable ASCII characters.

location
string

The system location.

     A server implementation MAY map this leaf to the sysLocation
     MIB object.  Such an implementation needs to use some
     mechanism to handle the differences in size and characters
     allowed between this leaf and sysLocation.  The definition
     of such a mechanism is outside the scope of this document. REF:RFC 3418: Management Information Base (MIB) for the
     Simple Network Management Protocol (SNMP)
     SNMPv2-MIB.sysLocation
auth
object (netgate.system.system.Auth)
contact
string

The administrator contact information for the system. A server implementation MAY map this leaf to the sysContact MIB object. Such an implementation needs to use some mechanism to handle the differences in size and characters allowed between this leaf and sysContact. The definition of such a mechanism is outside the scope of this document. REF:RFC 3418: Management Information Base (MIB) for the Simple Network Management Protocol (SNMP) SNMPv2-MIB.sysContact

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "description": "string",
  • "location": "string",
  • "auth":
    {
    },
  • "contact": "string"
}

creates or updates netgate.system.System

put /data/netgate-system:system

Example URL

https://hostname/restconf/data/netgate-system:system

System group configuration.

Request Body schema: application/yang-data+json

netgate.system.System to be added or updated

netgate-system:system
object (netgate.system.System)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.system.System

delete /data/netgate-system:system

Example URL

https://hostname/restconf/data/netgate-system:system

System group configuration.

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-system:system"

	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.system.system.Auth

get /data/netgate-system:system/netgate-system:auth

Example URL

https://hostname/restconf/data/netgate-system:system/netgate-system:auth

returns netgate.system.system.Auth

Responses

200

netgate.system.system.Auth

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-system:system/netgate-system:auth"

	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-system:auth":
    {
    }
}

creates netgate.system.system.Auth

post /data/netgate-system:system/netgate-system:auth

Example URL

https://hostname/restconf/data/netgate-system:system/netgate-system:auth

creates netgate.system.system.Auth

Request Body schema: application/yang-data+json

netgate.system.system.Auth to be added to list

user
Array of objects (netgate.system.system.auth.User)

allowed users of the system

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.system.system.Auth

put /data/netgate-system:system/netgate-system:auth

Example URL

https://hostname/restconf/data/netgate-system:system/netgate-system:auth

creates or updates netgate.system.system.Auth

Request Body schema: application/yang-data+json

netgate.system.system.Auth to be added or updated

netgate-system:auth
object (netgate.system.system.Auth)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.system.system.Auth

delete /data/netgate-system:system/netgate-system:auth

Example URL

https://hostname/restconf/data/netgate-system:system/netgate-system:auth

removes netgate.system.system.Auth

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-system:system/netgate-system:auth"

	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.system.system.auth.User

post /data/netgate-system:system/netgate-system:auth/netgate-system:user

Example URL

https://hostname/restconf/data/netgate-system:system/netgate-system:auth/netgate-system:user

allowed users of the system

Request Body schema: application/yang-data+json

netgate.system.system.auth.User to be added to list

user-password
string

the hash of the users password

user-name
string

user name identifying user

user-keys
Array of objects (netgate.system.system.auth.user.UserKeys)

list of users pubic keys

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "user-password": "string",
  • "user-name": "string",
  • "user-keys":
    [
    ]
}

returns netgate.system.system.auth.User

get /data/netgate-system:system/netgate-system:auth/netgate-system:user={user-name}

Example URL

https://hostname/restconf/data/netgate-system:system/netgate-system:auth/netgate-system:user={user-name}

allowed users of the system

path Parameters
user-name
required
string

Id of user

Responses

200

netgate.system.system.auth.User

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-system:system/netgate-system:auth/netgate-system:user=%7Buser-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
{
  • "netgate-system:user":
    {
    }
}

creates netgate.system.system.auth.User

post /data/netgate-system:system/netgate-system:auth/netgate-system:user={user-name}

Example URL

https://hostname/restconf/data/netgate-system:system/netgate-system:auth/netgate-system:user={user-name}

allowed users of the system

path Parameters
user-name
required
string

Id of user

Request Body schema: application/yang-data+json

netgate.system.system.auth.User to be added to list

user-password
string

the hash of the users password

user-name
string

user name identifying user

user-keys
Array of objects (netgate.system.system.auth.user.UserKeys)

list of users pubic keys

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "user-password": "string",
  • "user-name": "string",
  • "user-keys":
    [
    ]
}