netgate-system API (22.10)

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

Copyright 2018-2020 Rubicon Communications, LLC.

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

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

netgate-system:system
object (netgate.system.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
{
  • "netgate-system:system":
    {
    }
}

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-wrapper
object (netgate.system.SystemWrapper)

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

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

Example URL

https://hostname/restconf/data/netgate-system: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/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-wrapper":
    {
    }
}

creates netgate.system.system.Auth

post /data/netgate-system:system/auth

Example URL

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

creates netgate.system.system.Auth

Request Body schema: application/yang-data+json

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

auth
object (netgate.system.system.Auth)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.system.system.Auth

put /data/netgate-system:system/auth

Example URL

https://hostname/restconf/data/netgate-system: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-wrapper
object (netgate.system.system.AuthWrapper)

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

removes netgate.system.system.Auth

delete /data/netgate-system:system/auth

Example URL

https://hostname/restconf/data/netgate-system: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/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/auth/user

Example URL

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

allowed users of the system

Request Body schema: application/yang-data+json

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

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

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

returns netgate.system.system.auth.User

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

Example URL

https://hostname/restconf/data/netgate-system:system/auth/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/auth/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-wrapper":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-system:system/auth/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-wrapper
object (netgate.system.system.auth.UserWrapper)

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

removes netgate.system.system.auth.User

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

Example URL

https://hostname/restconf/data/netgate-system:system/auth/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/auth/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/auth/user={user-name}/user-keys

Example URL

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

A list of user's public 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

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

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

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

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

Example URL

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

A list of user's public 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/auth/user=%7Buser-name%7D/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