netgate-system API (19.05)

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

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

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

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

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

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

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

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

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

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

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

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

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

creates or updates netgate.system.system.auth.User

put /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 or updated

netgate-system:user
object (netgate.system.system.auth.User)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.system.system.auth.User

delete /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

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/netgate-system:user=%7Buser-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))

}

creates netgate.system.system.auth.user.UserKeys

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

Example URL

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

list of users pubic keys

path Parameters
user-name
required
string

Id of user

Request Body schema: application/yang-data+json

netgate.system.system.auth.user.UserKeys to be added to list

key-name
string

A unique arbitrary name for this key

key-protocol
string

The key protocol, one of ssh-dsa, ssh-edcsa, ssh-ed25519, ssh-rsa.

key-data
string

ASCII encoded data for user key.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "key-name": "string",
  • "key-protocol": "string",
  • "key-data": "string"
}

returns netgate.system.system.auth.user.UserKeys

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

Example URL

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

list of users pubic keys

path Parameters
user-name
required
string

Id of user

key-name
required
string

Id of user-keys

Responses

200

netgate.system.system.auth.user.UserKeys

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/netgate-system:user-keys=%7Bkey-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-system:user-keys":
    {
    }
}

creates netgate.system.system.auth.user.UserKeys

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

Example URL

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

list of users pubic keys

path Parameters
user-name
required
string

Id of user

key-name
required
string

Id of user-keys

Request Body schema: application/yang-data+json

netgate.system.system.auth.user.UserKeys to be added to list

key-name
string

A unique arbitrary name for this key

key-protocol
string

The key protocol, one of ssh-dsa, ssh-edcsa, ssh-ed25519, ssh-rsa.

key-data
string

ASCII encoded data for user key.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "key-name": "string",
  • "key-protocol": "string",
  • "key-data": "string"
}

creates or updates netgate.system.system.auth.user.UserKeys

put /data/netgate-system:system/netgate-system:auth/netgate-system:user={user-name}/netgate-system:user-keys={key-name}

Example URL

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

list of users pubic keys

path Parameters
user-name
required
string

Id of user

key-name
required
string

Id of user-keys

Request Body schema: application/yang-data+json

netgate.system.system.auth.user.UserKeys to be added or updated

netgate-system:user-keys
object (netgate.system.system.auth.user.UserKeys)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.system.system.auth.user.UserKeys

delete /data/netgate-system:system/netgate-system:auth/netgate-system:user={user-name}/netgate-system:user-keys={key-name}

Example URL

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

list of users pubic keys

path Parameters
user-name
required
string

Id of user

key-name
required
string

Id of user-keys

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/netgate-system:user=%7Buser-name%7D/netgate-system:user-keys=%7Bkey-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))

}

system-nft

creates netgate.system.SystemNft

post /operations/netgate-system:system-nft

Example URL

https://hostname/restconf/operations/netgate-system:system-nft

creates netgate.system.SystemNft

Request Body schema: application/yang-data+json
input
object (netgate.system.systemnft.Input)

Responses

200

Correct response

201

No response

400

Internal error

Request samples

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

Response samples

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

system-ping

creates netgate.system.SystemPing

post /operations/netgate-system:system-ping

Example URL

https://hostname/restconf/operations/netgate-system:system-ping

creates netgate.system.SystemPing

Request Body schema: application/yang-data+json
input
object (netgate.system.systemping.Input)

Responses

200

Correct response

201

No response

400

Internal error

Request samples

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