netgate-ntp API (19.02)

This YANG module provides a data-model for the NTP service.

Copyright 2018-2019 Rubicon Communications, LLC.

ntp-config

returns netgate.ntp.NtpConfig

get /data/netgate-ntp:ntp-config

Example URL

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

Network Time Protocol daemon configuration for time keeping and services.

Responses

200

netgate.ntp.NtpConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.ntp.NtpConfig

post /data/netgate-ntp:ntp-config

Example URL

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

Network Time Protocol daemon configuration for time keeping and services.

Request Body schema: application/yang-data+json

netgate.ntp.NtpConfig to be added to list

tinker
object (netgate.ntp.ntpconfig.Tinker)
interfaces
object (netgate.ntp.ntpconfig.Interfaces)
servers
object (netgate.ntp.ntpconfig.Servers)
tos
object (netgate.ntp.ntpconfig.Tos)
restrictions
object (netgate.ntp.ntpconfig.Restrictions)
logconfigs
object (netgate.ntp.ntpconfig.Logconfigs)
parameters
object (netgate.ntp.ntpconfig.Parameters)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "tinker":
    {
    },
  • "interfaces":
    {
    },
  • "servers":
    {
    },
  • "tos":
    {
    },
  • "restrictions":
    {
    },
  • "logconfigs":
    {
    },
  • "parameters":
    {
    }
}

creates or updates netgate.ntp.NtpConfig

put /data/netgate-ntp:ntp-config

Example URL

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

Network Time Protocol daemon configuration for time keeping and services.

Request Body schema: application/yang-data+json

netgate.ntp.NtpConfig to be added or updated

netgate-ntp:ntp-config
object (netgate.ntp.NtpConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.NtpConfig

delete /data/netgate-ntp:ntp-config

Example URL

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

Network Time Protocol daemon configuration for time keeping and services.

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-ntp:ntp-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.ntp.ntpconfig.Interfaces

get /data/netgate-ntp:ntp-config/netgate-ntp:interfaces

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces

Interface binding specifications.

Responses

200

netgate.ntp.ntpconfig.Interfaces

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces"

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

creates netgate.ntp.ntpconfig.Interfaces

post /data/netgate-ntp:ntp-config/netgate-ntp:interfaces

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces

Interface binding specifications.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Interfaces to be added to list

interface
Array of objects (netgate.ntp.ntpconfig.interfaces.Interface)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.ntp.ntpconfig.Interfaces

put /data/netgate-ntp:ntp-config/netgate-ntp:interfaces

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces

Interface binding specifications.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Interfaces to be added or updated

netgate-ntp:interfaces
object (netgate.ntp.ntpconfig.Interfaces)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.Interfaces

delete /data/netgate-ntp:ntp-config/netgate-ntp:interfaces

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces

Interface binding specifications.

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-ntp:ntp-config/netgate-ntp:interfaces"

	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.ntp.ntpconfig.interfaces.Interface

post /data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface

creates netgate.ntp.ntpconfig.interfaces.Interface

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.interfaces.Interface to be added to list

sequence
integer <int64>

The sequence numbers provide an ordering for the list of interface commands.

action
string (netgate.ntp.NtpInterfaceAction)
Enum: "listen" "ignore" "drop"
match-ip-prefix
string

Match an IP prefix.

match-all
boolean

Match all interfaces.

match-interface
string

Match an interface name.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "sequence": 0,
  • "action": "listen",
  • "match-ip-prefix": "string",
  • "match-all": true,
  • "match-interface": "string"
}

returns netgate.ntp.ntpconfig.interfaces.Interface

get /data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

returns netgate.ntp.ntpconfig.interfaces.Interface

path Parameters
sequence
required
integer <int64>

Id of interface

Responses

200

netgate.ntp.ntpconfig.interfaces.Interface

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface=%7Bsequence%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-ntp:interface":
    {
    }
}

creates netgate.ntp.ntpconfig.interfaces.Interface

post /data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

creates netgate.ntp.ntpconfig.interfaces.Interface

path Parameters
sequence
required
integer <int64>

Id of interface

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.interfaces.Interface to be added to list

sequence
integer <int64>

The sequence numbers provide an ordering for the list of interface commands.

action
string (netgate.ntp.NtpInterfaceAction)
Enum: "listen" "ignore" "drop"
match-ip-prefix
string

Match an IP prefix.

match-all
boolean

Match all interfaces.

match-interface
string

Match an interface name.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "sequence": 0,
  • "action": "listen",
  • "match-ip-prefix": "string",
  • "match-all": true,
  • "match-interface": "string"
}

creates or updates netgate.ntp.ntpconfig.interfaces.Interface

put /data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

creates or updates netgate.ntp.ntpconfig.interfaces.Interface

path Parameters
sequence
required
integer <int64>

Id of interface

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.interfaces.Interface to be added or updated

netgate-ntp:interface
object (netgate.ntp.ntpconfig.interfaces.Interface)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.interfaces.Interface

delete /data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

removes netgate.ntp.ntpconfig.interfaces.Interface

path Parameters
sequence
required
integer <int64>

Id of interface

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-ntp:ntp-config/netgate-ntp:interfaces/netgate-ntp:interface=%7Bsequence%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))

}

returns netgate.ntp.ntpconfig.Logconfigs

get /data/netgate-ntp:ntp-config/netgate-ntp:logconfigs

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs

An ordered sequence of NTPD logconfig settings.

Responses

200

netgate.ntp.ntpconfig.Logconfigs

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs"

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

creates netgate.ntp.ntpconfig.Logconfigs

post /data/netgate-ntp:ntp-config/netgate-ntp:logconfigs

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs

An ordered sequence of NTPD logconfig settings.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Logconfigs to be added to list

logconfig
Array of objects (netgate.ntp.ntpconfig.logconfigs.Logconfig)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.ntp.ntpconfig.Logconfigs

put /data/netgate-ntp:ntp-config/netgate-ntp:logconfigs

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs

An ordered sequence of NTPD logconfig settings.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Logconfigs to be added or updated

netgate-ntp:logconfigs
object (netgate.ntp.ntpconfig.Logconfigs)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.Logconfigs

delete /data/netgate-ntp:ntp-config/netgate-ntp:logconfigs

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs

An ordered sequence of NTPD logconfig settings.

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-ntp:ntp-config/netgate-ntp:logconfigs"

	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.ntp.ntpconfig.logconfigs.Logconfig

post /data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig

creates netgate.ntp.ntpconfig.logconfigs.Logconfig

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.logconfigs.Logconfig to be added to list

sequence
integer <int64>

Logconfig options must be ordered.

action
string (netgate.ntp.NtpLogAction)
Enum: "set" "add" "delete"
type
string (netgate.ntp.NtpLogType)
Enum: "all" "info" "events" "statistics" "status"
class
string (netgate.ntp.NtpLogClass)
Enum: "all" "clock" "peer" "sys" "sync"

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "sequence": 0,
  • "action": "set",
  • "type": "all",
  • "class": "all"
}

returns netgate.ntp.ntpconfig.logconfigs.Logconfig

get /data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

returns netgate.ntp.ntpconfig.logconfigs.Logconfig

path Parameters
sequence
required
integer <int64>

Id of logconfig

Responses

200

netgate.ntp.ntpconfig.logconfigs.Logconfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig=%7Bsequence%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-ntp:logconfig":
    {
    }
}

creates netgate.ntp.ntpconfig.logconfigs.Logconfig

post /data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

creates netgate.ntp.ntpconfig.logconfigs.Logconfig

path Parameters
sequence
required
integer <int64>

Id of logconfig

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.logconfigs.Logconfig to be added to list

sequence
integer <int64>

Logconfig options must be ordered.

action
string (netgate.ntp.NtpLogAction)
Enum: "set" "add" "delete"
type
string (netgate.ntp.NtpLogType)
Enum: "all" "info" "events" "statistics" "status"
class
string (netgate.ntp.NtpLogClass)
Enum: "all" "clock" "peer" "sys" "sync"

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "sequence": 0,
  • "action": "set",
  • "type": "all",
  • "class": "all"
}

creates or updates netgate.ntp.ntpconfig.logconfigs.Logconfig

put /data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

creates or updates netgate.ntp.ntpconfig.logconfigs.Logconfig

path Parameters
sequence
required
integer <int64>

Id of logconfig

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.logconfigs.Logconfig to be added or updated

netgate-ntp:logconfig
object (netgate.ntp.ntpconfig.logconfigs.Logconfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.logconfigs.Logconfig

delete /data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

removes netgate.ntp.ntpconfig.logconfigs.Logconfig

path Parameters
sequence
required
integer <int64>

Id of logconfig

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-ntp:ntp-config/netgate-ntp:logconfigs/netgate-ntp:logconfig=%7Bsequence%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))

}

returns netgate.ntp.ntpconfig.Parameters

get /data/netgate-ntp:ntp-config/netgate-ntp:parameters

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters

A collection of various NTP daemon parameters.

Responses

200

netgate.ntp.ntpconfig.Parameters

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters"

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

creates netgate.ntp.ntpconfig.Parameters

post /data/netgate-ntp:ntp-config/netgate-ntp:parameters

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters

A collection of various NTP daemon parameters.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Parameters to be added to list

enabled-flags
object (netgate.ntp.ntpconfig.parameters.EnabledFlags)
driftfile
string

Full path name of the drift file. If not specified, /var/lib/ntp/drift.

statsdir
string

Full path name of the statistics directory. If not specified, /var/log/ntpstats

enable
boolean

If true, the NTP daemon is enabled.

disabled-flags
object (netgate.ntp.ntpconfig.parameters.DisabledFlags)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "enabled-flags":
    {
    },
  • "driftfile": "string",
  • "statsdir": "string",
  • "enable": true,
  • "disabled-flags":
    {
    }
}

creates or updates netgate.ntp.ntpconfig.Parameters

put /data/netgate-ntp:ntp-config/netgate-ntp:parameters

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters

A collection of various NTP daemon parameters.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Parameters to be added or updated

netgate-ntp:parameters
object (netgate.ntp.ntpconfig.Parameters)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.Parameters

delete /data/netgate-ntp:ntp-config/netgate-ntp:parameters

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters

A collection of various NTP daemon parameters.

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-ntp:ntp-config/netgate-ntp:parameters"

	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.ntp.ntpconfig.parameters.DisabledFlags

get /data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags

A set of flags explicitly disabled.

Responses

200

netgate.ntp.ntpconfig.parameters.DisabledFlags

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags"

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

creates netgate.ntp.ntpconfig.parameters.DisabledFlags

post /data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags

A set of flags explicitly disabled.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.parameters.DisabledFlags to be added to list

monitor
boolean

If true, disable monitor.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.ntp.ntpconfig.parameters.DisabledFlags

put /data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags

A set of flags explicitly disabled.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.parameters.DisabledFlags to be added or updated

netgate-ntp:disabled-flags
object (netgate.ntp.ntpconfig.parameters.DisabledFlags)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.parameters.DisabledFlags

delete /data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags

A set of flags explicitly disabled.

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-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:disabled-flags"

	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.ntp.ntpconfig.parameters.EnabledFlags

get /data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags

A set of flags explicitly enabled.

Responses

200

netgate.ntp.ntpconfig.parameters.EnabledFlags

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags"

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

creates netgate.ntp.ntpconfig.parameters.EnabledFlags

post /data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags

A set of flags explicitly enabled.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.parameters.EnabledFlags to be added to list

monitor
boolean

If true, enable monitor.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.ntp.ntpconfig.parameters.EnabledFlags

put /data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags

A set of flags explicitly enabled.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.parameters.EnabledFlags to be added or updated

netgate-ntp:enabled-flags
object (netgate.ntp.ntpconfig.parameters.EnabledFlags)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.parameters.EnabledFlags

delete /data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags

A set of flags explicitly enabled.

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-ntp:ntp-config/netgate-ntp:parameters/netgate-ntp:enabled-flags"

	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.ntp.ntpconfig.Restrictions

get /data/netgate-ntp:ntp-config/netgate-ntp:restrictions

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions

returns netgate.ntp.ntpconfig.Restrictions

Responses

200

netgate.ntp.ntpconfig.Restrictions

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions"

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

creates netgate.ntp.ntpconfig.Restrictions

post /data/netgate-ntp:ntp-config/netgate-ntp:restrictions

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions

creates netgate.ntp.ntpconfig.Restrictions

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Restrictions to be added to list

restriction
Array of objects (netgate.ntp.ntpconfig.restrictions.Restriction)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.ntp.ntpconfig.Restrictions

put /data/netgate-ntp:ntp-config/netgate-ntp:restrictions

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions

creates or updates netgate.ntp.ntpconfig.Restrictions

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Restrictions to be added or updated

netgate-ntp:restrictions
object (netgate.ntp.ntpconfig.Restrictions)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.Restrictions

delete /data/netgate-ntp:ntp-config/netgate-ntp:restrictions

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions

removes netgate.ntp.ntpconfig.Restrictions

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-ntp:ntp-config/netgate-ntp:restrictions"

	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.ntp.ntpconfig.restrictions.Restriction

post /data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction

creates netgate.ntp.ntpconfig.restrictions.Restriction

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.restrictions.Restriction to be added to list

noquery
boolean

If true, disable ntpq/ntpdc queries.

kod
boolean

If true, enable Kiss o' Death packets.

address
string

Network to restrict.

noserve
boolean

If true, disable service/everything except ntpq and ntpdc queries.

limited
boolean

If true, enable Kiss o' Death packets.

nopeer
boolean

If true, deny peer association packets.

notrap
boolean

If true, deny mode 6 control message trap service.

nomodify
boolean

If true, deny run-time config by ntpq and ntpdc.

present
boolean
address-family
string (netgate.common.IpAddressFamily)
Enum: "ipv4" "ipv6"

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "noquery": true,
  • "kod": true,
  • "address": "string",
  • "noserve": true,
  • "limited": true,
  • "nopeer": true,
  • "notrap": true,
  • "nomodify": true,
  • "present": true,
  • "address-family": "ipv4"
}

returns netgate.ntp.ntpconfig.restrictions.Restriction

get /data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction={address}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction={address}

returns netgate.ntp.ntpconfig.restrictions.Restriction

path Parameters
address
required
string

Id of restriction

Responses

200

netgate.ntp.ntpconfig.restrictions.Restriction

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction=%7Baddress%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-ntp:restriction":
    {
    }
}

creates netgate.ntp.ntpconfig.restrictions.Restriction

post /data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction={address}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction={address}

creates netgate.ntp.ntpconfig.restrictions.Restriction

path Parameters
address
required
string

Id of restriction

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.restrictions.Restriction to be added to list

noquery
boolean

If true, disable ntpq/ntpdc queries.

kod
boolean

If true, enable Kiss o' Death packets.

address
string

Network to restrict.

noserve
boolean

If true, disable service/everything except ntpq and ntpdc queries.

limited
boolean

If true, enable Kiss o' Death packets.

nopeer
boolean

If true, deny peer association packets.

notrap
boolean

If true, deny mode 6 control message trap service.

nomodify
boolean

If true, deny run-time config by ntpq and ntpdc.

present
boolean
address-family
string (netgate.common.IpAddressFamily)
Enum: "ipv4" "ipv6"

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "noquery": true,
  • "kod": true,
  • "address": "string",
  • "noserve": true,
  • "limited": true,
  • "nopeer": true,
  • "notrap": true,
  • "nomodify": true,
  • "present": true,
  • "address-family": "ipv4"
}

creates or updates netgate.ntp.ntpconfig.restrictions.Restriction

put /data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction={address}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction={address}

creates or updates netgate.ntp.ntpconfig.restrictions.Restriction

path Parameters
address
required
string

Id of restriction

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.restrictions.Restriction to be added or updated

netgate-ntp:restriction
object (netgate.ntp.ntpconfig.restrictions.Restriction)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.restrictions.Restriction

delete /data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction={address}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction={address}

removes netgate.ntp.ntpconfig.restrictions.Restriction

path Parameters
address
required
string

Id of restriction

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-ntp:ntp-config/netgate-ntp:restrictions/netgate-ntp:restriction=%7Baddress%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))

}

returns netgate.ntp.ntpconfig.Servers

get /data/netgate-ntp:ntp-config/netgate-ntp:servers

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers

returns netgate.ntp.ntpconfig.Servers

Responses

200

netgate.ntp.ntpconfig.Servers

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers"

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

creates netgate.ntp.ntpconfig.Servers

post /data/netgate-ntp:ntp-config/netgate-ntp:servers

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers

creates netgate.ntp.ntpconfig.Servers

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Servers to be added to list

server
Array of objects (netgate.ntp.ntpconfig.servers.Server)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.ntp.ntpconfig.Servers

put /data/netgate-ntp:ntp-config/netgate-ntp:servers

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers

creates or updates netgate.ntp.ntpconfig.Servers

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Servers to be added or updated

netgate-ntp:servers
object (netgate.ntp.ntpconfig.Servers)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.Servers

delete /data/netgate-ntp:ntp-config/netgate-ntp:servers

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers

removes netgate.ntp.ntpconfig.Servers

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-ntp:ntp-config/netgate-ntp:servers"

	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.ntp.ntpconfig.servers.Server

post /data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server

creates netgate.ntp.ntpconfig.servers.Server

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.servers.Server to be added to list

prefer
boolean

If true, favor this server more than others.

operational-mode
string (netgate.ntp.NtpServerMode)
Enum: "server" "pool"
host
string

NTP server IP address or FQDN.

noselect
boolean

If true, disable time sync for this server, track stats only.

maxpoll
integer <int32>

Maximum poll interval expressed as a power of 2 in seconds.

iburst
boolean

If true, send a burst of attempts to an unreachable server to speed up acquisition of time synchronization.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "prefer": true,
  • "operational-mode": "server",
  • "host": "string",
  • "noselect": true,
  • "maxpoll": 0,
  • "iburst": true
}

returns netgate.ntp.ntpconfig.servers.Server

get /data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server={host}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server={host}

returns netgate.ntp.ntpconfig.servers.Server

path Parameters
host
required
string

Id of server

Responses

200

netgate.ntp.ntpconfig.servers.Server

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.ntp.ntpconfig.servers.Server

post /data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server={host}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server={host}

creates netgate.ntp.ntpconfig.servers.Server

path Parameters
host
required
string

Id of server

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.servers.Server to be added to list

prefer
boolean

If true, favor this server more than others.

operational-mode
string (netgate.ntp.NtpServerMode)
Enum: "server" "pool"
host
string

NTP server IP address or FQDN.

noselect
boolean

If true, disable time sync for this server, track stats only.

maxpoll
integer <int32>

Maximum poll interval expressed as a power of 2 in seconds.

iburst
boolean

If true, send a burst of attempts to an unreachable server to speed up acquisition of time synchronization.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "prefer": true,
  • "operational-mode": "server",
  • "host": "string",
  • "noselect": true,
  • "maxpoll": 0,
  • "iburst": true
}

creates or updates netgate.ntp.ntpconfig.servers.Server

put /data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server={host}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server={host}

creates or updates netgate.ntp.ntpconfig.servers.Server

path Parameters
host
required
string

Id of server

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.servers.Server to be added or updated

netgate-ntp:server
object (netgate.ntp.ntpconfig.servers.Server)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.servers.Server

delete /data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server={host}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server={host}

removes netgate.ntp.ntpconfig.servers.Server

path Parameters
host
required
string

Id of 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-ntp:ntp-config/netgate-ntp:servers/netgate-ntp:server=%7Bhost%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))

}

returns netgate.ntp.ntpconfig.Tinker

get /data/netgate-ntp:ntp-config/netgate-ntp:tinker

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tinker

Tinker options.

Responses

200

netgate.ntp.ntpconfig.Tinker

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tinker"

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

creates netgate.ntp.ntpconfig.Tinker

post /data/netgate-ntp:ntp-config/netgate-ntp:tinker

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tinker

Tinker options.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Tinker to be added to list

panic
integer <int64>

Panic threshold in seconds. 0 disables. Default 1000.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.ntp.ntpconfig.Tinker

put /data/netgate-ntp:ntp-config/netgate-ntp:tinker

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tinker

Tinker options.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Tinker to be added or updated

netgate-ntp:tinker
object (netgate.ntp.ntpconfig.Tinker)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.Tinker

delete /data/netgate-ntp:ntp-config/netgate-ntp:tinker

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tinker

Tinker options.

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-ntp:ntp-config/netgate-ntp:tinker"

	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.ntp.ntpconfig.Tos

get /data/netgate-ntp:ntp-config/netgate-ntp:tos

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tos

TOS options.

Responses

200

netgate.ntp.ntpconfig.Tos

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tos"

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

creates netgate.ntp.ntpconfig.Tos

post /data/netgate-ntp:ntp-config/netgate-ntp:tos

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tos

TOS options.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Tos to be added to list

orphan
integer <int32>

Orphan stratum in the range 1 through 16.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.ntp.ntpconfig.Tos

put /data/netgate-ntp:ntp-config/netgate-ntp:tos

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tos

TOS options.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.Tos to be added or updated

netgate-ntp:tos
object (netgate.ntp.ntpconfig.Tos)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.ntp.ntpconfig.Tos

delete /data/netgate-ntp:ntp-config/netgate-ntp:tos

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-config/netgate-ntp:tos

TOS options.

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-ntp:ntp-config/netgate-ntp:tos"

	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))

}

ntp-state

returns netgate.ntp.NtpState

get /data/netgate-ntp:ntp-state

Example URL

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

Network Time Protocol daemon configuration for time keeping and services.

Responses

200

netgate.ntp.NtpState

400

Internal error

Request samples

Copy
package main

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

func main() {

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

returns netgate.ntp.ntpstate.Interfaces

get /data/netgate-ntp:ntp-state/netgate-ntp:interfaces

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:interfaces

Interface binding specifications.

Responses

200

netgate.ntp.ntpstate.Interfaces

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

returns netgate.ntp.ntpstate.interfaces.Interface

get /data/netgate-ntp:ntp-state/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:interfaces/netgate-ntp:interface={sequence}

returns netgate.ntp.ntpstate.interfaces.Interface

path Parameters
sequence
required
integer <int64>

Id of interface

Responses

200

netgate.ntp.ntpstate.interfaces.Interface

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:interfaces/netgate-ntp:interface=%7Bsequence%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-ntp:interface":
    {
    }
}

returns netgate.ntp.ntpstate.Logconfigs

get /data/netgate-ntp:ntp-state/netgate-ntp:logconfigs

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:logconfigs

An ordered sequence of NTPD logconfig settings.

Responses

200

netgate.ntp.ntpstate.Logconfigs

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

returns netgate.ntp.ntpstate.logconfigs.Logconfig

get /data/netgate-ntp:ntp-state/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:logconfigs/netgate-ntp:logconfig={sequence}

returns netgate.ntp.ntpstate.logconfigs.Logconfig

path Parameters
sequence
required
integer <int64>

Id of logconfig

Responses

200

netgate.ntp.ntpstate.logconfigs.Logconfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:logconfigs/netgate-ntp:logconfig=%7Bsequence%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-ntp:logconfig":
    {
    }
}

returns netgate.ntp.ntpstate.Parameters

get /data/netgate-ntp:ntp-state/netgate-ntp:parameters

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:parameters

A collection of various NTP daemon parameters.

Responses

200

netgate.ntp.ntpstate.Parameters

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

returns netgate.ntp.ntpstate.parameters.DisabledFlags

get /data/netgate-ntp:ntp-state/netgate-ntp:parameters/netgate-ntp:disabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:parameters/netgate-ntp:disabled-flags

A set of flags explicitly disabled.

Responses

200

netgate.ntp.ntpstate.parameters.DisabledFlags

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:parameters/netgate-ntp:disabled-flags"

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

returns netgate.ntp.ntpstate.parameters.EnabledFlags

get /data/netgate-ntp:ntp-state/netgate-ntp:parameters/netgate-ntp:enabled-flags

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:parameters/netgate-ntp:enabled-flags

A set of flags explicitly enabled.

Responses

200

netgate.ntp.ntpstate.parameters.EnabledFlags

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:parameters/netgate-ntp:enabled-flags"

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

returns netgate.ntp.ntpstate.Peers

get /data/netgate-ntp:ntp-state/netgate-ntp:peers

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:peers

Information about the server's peer associations.

Responses

200

netgate.ntp.ntpstate.Peers

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

returns netgate.ntp.ntpstate.peers.Peer

get /data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer={id}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer={id}

returns netgate.ntp.ntpstate.peers.Peer

path Parameters
id
required
integer <int32>

Id of peer

Responses

200

netgate.ntp.ntpstate.peers.Peer

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer=%7Bid%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-ntp:peer":
    {
    }
}

returns netgate.ntp.ntpstate.peers.peer.Status

get /data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer={id}/netgate-ntp:status

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer={id}/netgate-ntp:status

The decoded peer status.

path Parameters
id
required
integer <int32>

Id of peer

Responses

200

netgate.ntp.ntpstate.peers.peer.Status

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer=%7Bid%7D/netgate-ntp:status"

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

returns netgate.ntp.ntpstate.peers.peer.Variables

get /data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer={id}/netgate-ntp:variables

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer={id}/netgate-ntp:variables

The peer variables of an association.

path Parameters
id
required
integer <int32>

Id of peer

Responses

200

netgate.ntp.ntpstate.peers.peer.Variables

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer=%7Bid%7D/netgate-ntp:variables"

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

returns netgate.ntp.ntpstate.peers.peer.variables.Variable

get /data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer={id}/netgate-ntp:variables/netgate-ntp:variable={name}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer={id}/netgate-ntp:variables/netgate-ntp:variable={name}

returns netgate.ntp.ntpstate.peers.peer.variables.Variable

path Parameters
id
required
integer <int32>

Id of peer

name
required
string

Id of variable

Responses

200

netgate.ntp.ntpstate.peers.peer.variables.Variable

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:peers/netgate-ntp:peer=%7Bid%7D/netgate-ntp:variables/netgate-ntp:variable=%7Bname%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-ntp:variable":
    {
    }
}

returns netgate.ntp.ntpstate.Restrictions

get /data/netgate-ntp:ntp-state/netgate-ntp:restrictions

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:restrictions

returns netgate.ntp.ntpstate.Restrictions

Responses

200

netgate.ntp.ntpstate.Restrictions

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

returns netgate.ntp.ntpstate.restrictions.Restriction

get /data/netgate-ntp:ntp-state/netgate-ntp:restrictions/netgate-ntp:restriction={address}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:restrictions/netgate-ntp:restriction={address}

returns netgate.ntp.ntpstate.restrictions.Restriction

path Parameters
address
required
string

Id of restriction

Responses

200

netgate.ntp.ntpstate.restrictions.Restriction

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:restrictions/netgate-ntp:restriction=%7Baddress%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-ntp:restriction":
    {
    }
}

returns netgate.ntp.ntpstate.Servers

get /data/netgate-ntp:ntp-state/netgate-ntp:servers

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:servers

returns netgate.ntp.ntpstate.Servers

Responses

200

netgate.ntp.ntpstate.Servers

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

returns netgate.ntp.ntpstate.servers.Server

get /data/netgate-ntp:ntp-state/netgate-ntp:servers/netgate-ntp:server={host}

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:servers/netgate-ntp:server={host}

returns netgate.ntp.ntpstate.servers.Server

path Parameters
host
required
string

Id of server

Responses

200

netgate.ntp.ntpstate.servers.Server

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:servers/netgate-ntp:server=%7Bhost%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-ntp:server":
    {
    }
}

returns netgate.ntp.ntpstate.Tinker

get /data/netgate-ntp:ntp-state/netgate-ntp:tinker

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:tinker

Tinker options.

Responses

200

netgate.ntp.ntpstate.Tinker

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

returns netgate.ntp.ntpstate.Tos

get /data/netgate-ntp:ntp-state/netgate-ntp:tos

Example URL

https://hostname/restconf/data/netgate-ntp:ntp-state/netgate-ntp:tos

TOS options.

Responses

200

netgate.ntp.ntpstate.Tos

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

ntp-config-operation

creates netgate.ntp.NtpConfigOperation

post /operations/netgate-ntp:ntp-config-operation

Example URL

https://hostname/restconf/operations/netgate-ntp:ntp-config-operation

creates netgate.ntp.NtpConfigOperation

Request Body schema: application/yang-data+json
input
object (netgate.ntp.ntpconfigoperation.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":
    {
    }
}

ntp-control

creates netgate.ntp.NtpControl

post /operations/netgate-ntp:ntp-control

Example URL

https://hostname/restconf/operations/netgate-ntp:ntp-control

creates netgate.ntp.NtpControl

Request Body schema: application/yang-data+json
input
object (netgate.ntp.ntpcontrol.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":
    {
    }
}