netgate-ssh-server API (20.08)

This YANG module provides a data model for the SSH server.

Copyright 2020 Rubicon Communications, LLC.

ssh-server-config

returns netgate.ssh.server.SshServerConfig

get /data/netgate-ssh-server:ssh-server-config

Example URL

https://hostname/restconf/data/netgate-ssh-server:ssh-server-config

Configuration for the SSH server.

Responses

200

netgate.ssh.server.SshServerConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.ssh.server.SshServerConfig

post /data/netgate-ssh-server:ssh-server-config

Example URL

https://hostname/restconf/data/netgate-ssh-server:ssh-server-config

Configuration for the SSH server.

Request Body schema: application/yang-data+json

netgate.ssh.server.SshServerConfig to be added to list

dataplane
object (netgate.ssh.server.sshserverconfig.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.ssh.server.SshServerConfig

put /data/netgate-ssh-server:ssh-server-config

Example URL

https://hostname/restconf/data/netgate-ssh-server:ssh-server-config

Configuration for the SSH server.

Request Body schema: application/yang-data+json

netgate.ssh.server.SshServerConfig to be added or updated

netgate-ssh-server:ssh-server-config
object (netgate.ssh.server.SshServerConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ssh.server.SshServerConfig

delete /data/netgate-ssh-server:ssh-server-config

Example URL

https://hostname/restconf/data/netgate-ssh-server:ssh-server-config

Configuration for the SSH 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-ssh-server:ssh-server-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.ssh.server.sshserverconfig.Dataplane

get /data/netgate-ssh-server:ssh-server-config/netgate-ssh-server:dataplane

Example URL

https://hostname/restconf/data/netgate-ssh-server:ssh-server-config/netgate-ssh-server:dataplane

Dataplane-specific parameters of SSH server.

Responses

200

netgate.ssh.server.sshserverconfig.Dataplane

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.ssh.server.sshserverconfig.Dataplane

post /data/netgate-ssh-server:ssh-server-config/netgate-ssh-server:dataplane

Example URL

https://hostname/restconf/data/netgate-ssh-server:ssh-server-config/netgate-ssh-server:dataplane

Dataplane-specific parameters of SSH server.

Request Body schema: application/yang-data+json

netgate.ssh.server.sshserverconfig.Dataplane to be added to list

enable
boolean

If true, SSH server is enabled for dataplane interfaces.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.ssh.server.sshserverconfig.Dataplane

put /data/netgate-ssh-server:ssh-server-config/netgate-ssh-server:dataplane

Example URL

https://hostname/restconf/data/netgate-ssh-server:ssh-server-config/netgate-ssh-server:dataplane

Dataplane-specific parameters of SSH server.

Request Body schema: application/yang-data+json

netgate.ssh.server.sshserverconfig.Dataplane to be added or updated

netgate-ssh-server:dataplane
object (netgate.ssh.server.sshserverconfig.Dataplane)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ssh.server.sshserverconfig.Dataplane

delete /data/netgate-ssh-server:ssh-server-config/netgate-ssh-server:dataplane

Example URL

https://hostname/restconf/data/netgate-ssh-server:ssh-server-config/netgate-ssh-server:dataplane

Dataplane-specific parameters of SSH 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-ssh-server:ssh-server-config/netgate-ssh-server: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))

}

ssh-server-control

creates netgate.ssh.server.SshServerControl

post /operations/netgate-ssh-server:ssh-server-control

Example URL

https://hostname/restconf/operations/netgate-ssh-server:ssh-server-control

creates netgate.ssh.server.SshServerControl

Request Body schema: application/yang-data+json
input
object (netgate.ssh.server.sshservercontrol.Input)

Responses

200

Correct response

201

No response

400

Internal error

Request samples

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

Response samples

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