netgate-ntp API (24.10)

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

Copyright 2018-2020 Rubicon Communications, LLC.

ntp-config

returns netgate.ntp.NtpConfig

Network Time Protocol daemon configuration for time keeping and services.

Responses

Request samples

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
{
  • "netgate-ntp:ntp-config": {
    }
}

creates netgate.ntp.NtpConfig

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

object (netgate.ntp.ntpconfig.System)

The NTP system parameters not managed by the daemon.

object (netgate.ntp.ntpconfig.Daemon)

NTP daemon configuration parameters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:system": {
    },
  • "netgate-ntp:daemon": {
    }
}

creates or updates netgate.ntp.NtpConfig

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

object (netgate.ntp.NtpConfig)

Network Time Protocol daemon configuration for time keeping and services.

Responses

Request samples

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

removes netgate.ntp.NtpConfig

Network Time Protocol daemon configuration for time keeping and services.

Responses

Request samples

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.Daemon

NTP daemon configuration parameters.

Responses

Request samples

package main

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

func main() {

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

	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
{
  • "netgate-ntp:daemon": {
    }
}

creates netgate.ntp.ntpconfig.Daemon

NTP daemon configuration parameters.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.Tinker)

Tinker options.

object (netgate.ntp.ntpconfig.daemon.Interfaces)

Interface binding specifications.

object (netgate.ntp.ntpconfig.daemon.Servers)
object (netgate.ntp.ntpconfig.daemon.Tos)

TOS options.

object (netgate.ntp.ntpconfig.daemon.Restrictions)
object (netgate.ntp.ntpconfig.daemon.Logconfigs)

An ordered sequence of NTPD logconfig settings.

object (netgate.ntp.ntpconfig.daemon.Parameters)

The NTP parameters managed by the NTP daemon.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:tinker": {
    },
  • "netgate-ntp:interfaces": {
    },
  • "netgate-ntp:servers": {
    },
  • "netgate-ntp:tos": {
    },
  • "netgate-ntp:restrictions": {
    },
  • "netgate-ntp:logconfigs": {
    },
  • "netgate-ntp:parameters": {
    }
}

creates or updates netgate.ntp.ntpconfig.Daemon

NTP daemon configuration parameters.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.Daemon)

NTP daemon configuration parameters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:daemon": {
    }
}

removes netgate.ntp.ntpconfig.Daemon

NTP daemon configuration parameters.

Responses

Request samples

package main

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

func main() {

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

	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.daemon.Interfaces

Interface binding specifications.

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.daemon.Interfaces

Interface binding specifications.

Request Body schema: application/yang-data+json

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

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

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:interface": [
    ]
}

creates or updates netgate.ntp.ntpconfig.daemon.Interfaces

Interface binding specifications.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.Interfaces)

Interface binding specifications.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Interfaces

Interface binding specifications.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/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.daemon.interfaces.Interface

creates netgate.ntp.ntpconfig.daemon.interfaces.Interface

Request Body schema: application/yang-data+json

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

netgate-ntp:sequence
integer <int64>

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

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

Match an IP prefix.

netgate-ntp:match-all
boolean

Match all interfaces.

netgate-ntp:match-interface
string

Match an interface name.

Responses

Request samples

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

returns netgate.ntp.ntpconfig.daemon.interfaces.Interface

returns netgate.ntp.ntpconfig.daemon.interfaces.Interface

path Parameters
sequence
required
integer <int64>

Id of interface

Responses

Request samples

package main

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

func main() {

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

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

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

path Parameters
sequence
required
integer <int64>

Id of interface

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.interfaces.Interface)

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.interfaces.Interface

removes netgate.ntp.ntpconfig.daemon.interfaces.Interface

path Parameters
sequence
required
integer <int64>

Id of interface

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/interfaces/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.daemon.Logconfigs

An ordered sequence of NTPD logconfig settings.

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.daemon.Logconfigs

An ordered sequence of NTPD logconfig settings.

Request Body schema: application/yang-data+json

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

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

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:logconfig": [
    ]
}

creates or updates netgate.ntp.ntpconfig.daemon.Logconfigs

An ordered sequence of NTPD logconfig settings.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.Logconfigs)

An ordered sequence of NTPD logconfig settings.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Logconfigs

An ordered sequence of NTPD logconfig settings.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/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.daemon.logconfigs.Logconfig

creates netgate.ntp.ntpconfig.daemon.logconfigs.Logconfig

Request Body schema: application/yang-data+json

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

netgate-ntp:sequence
integer <int64>

Logconfig options must be ordered.

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

Responses

Request samples

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

returns netgate.ntp.ntpconfig.daemon.logconfigs.Logconfig

returns netgate.ntp.ntpconfig.daemon.logconfigs.Logconfig

path Parameters
sequence
required
integer <int64>

Id of logconfig

Responses

Request samples

package main

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

func main() {

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

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

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

path Parameters
sequence
required
integer <int64>

Id of logconfig

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.logconfigs.Logconfig)

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.logconfigs.Logconfig

removes netgate.ntp.ntpconfig.daemon.logconfigs.Logconfig

path Parameters
sequence
required
integer <int64>

Id of logconfig

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/logconfigs/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.daemon.Parameters

The NTP parameters managed by the NTP daemon.

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.daemon.Parameters

The NTP parameters managed by the NTP daemon.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.parameters.EnabledFlags)

Force monitor flags to enabled.

netgate-ntp:driftfile
string

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

netgate-ntp:statsdir
string

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

object (netgate.ntp.ntpconfig.daemon.parameters.DisabledFlags)

Force monitor flags to disabled.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:enabled-flags": {
    },
  • "netgate-ntp:driftfile": "string",
  • "netgate-ntp:statsdir": "string",
  • "netgate-ntp:disabled-flags": {
    }
}

creates or updates netgate.ntp.ntpconfig.daemon.Parameters

The NTP parameters managed by the NTP daemon.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.Parameters)

The NTP parameters managed by the NTP daemon.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Parameters

The NTP parameters managed by the NTP daemon.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/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.daemon.parameters.DisabledFlags

Force monitor flags to disabled.

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.daemon.parameters.DisabledFlags

Force monitor flags to disabled.

Request Body schema: application/yang-data+json

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

netgate-ntp:monitor
boolean

If true, disable monitor.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:monitor": true
}

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

Force monitor flags to disabled.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.parameters.DisabledFlags)

Force monitor flags to disabled.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.parameters.DisabledFlags

Force monitor flags to disabled.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/parameters/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.daemon.parameters.EnabledFlags

Force monitor flags to enabled.

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.daemon.parameters.EnabledFlags

Force monitor flags to enabled.

Request Body schema: application/yang-data+json

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

netgate-ntp:monitor
boolean

If true, enable monitor.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:monitor": true
}

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

Force monitor flags to enabled.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.parameters.EnabledFlags)

Force monitor flags to enabled.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.parameters.EnabledFlags

Force monitor flags to enabled.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/parameters/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.daemon.Restrictions

returns netgate.ntp.ntpconfig.daemon.Restrictions

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.daemon.Restrictions

creates netgate.ntp.ntpconfig.daemon.Restrictions

Request Body schema: application/yang-data+json

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

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

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:restriction": [
    ]
}

creates or updates netgate.ntp.ntpconfig.daemon.Restrictions

creates or updates netgate.ntp.ntpconfig.daemon.Restrictions

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.Restrictions)

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Restrictions

removes netgate.ntp.ntpconfig.daemon.Restrictions

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/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.daemon.restrictions.Restriction

creates netgate.ntp.ntpconfig.daemon.restrictions.Restriction

Request Body schema: application/yang-data+json

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

netgate-ntp:noquery
boolean

If true, disable ntpq/ntpdc queries.

netgate-ntp:kod
boolean

If true, enable Kiss o' Death packets.

netgate-ntp:address
string

Network to restrict.

netgate-ntp:noserve
boolean

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

netgate-ntp:limited
boolean

If true, enable Kiss o' Death packets.

netgate-ntp:nopeer
boolean

If true, deny peer association packets.

netgate-ntp:notrap
boolean

If true, deny mode 6 control message trap service.

netgate-ntp:nomodify
boolean

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

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

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:noquery": true,
  • "netgate-ntp:kod": true,
  • "netgate-ntp:address": "string",
  • "netgate-ntp:noserve": true,
  • "netgate-ntp:limited": true,
  • "netgate-ntp:nopeer": true,
  • "netgate-ntp:notrap": true,
  • "netgate-ntp:nomodify": true,
  • "netgate-ntp:address-family": "ipv4"
}

returns netgate.ntp.ntpconfig.daemon.restrictions.Restriction

returns netgate.ntp.ntpconfig.daemon.restrictions.Restriction

path Parameters
address
required
string

Id of restriction

Responses

Request samples

package main

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

func main() {

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

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

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

path Parameters
address
required
string

Id of restriction

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.restrictions.Restriction)

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.restrictions.Restriction

removes netgate.ntp.ntpconfig.daemon.restrictions.Restriction

path Parameters
address
required
string

Id of restriction

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/restrictions/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.daemon.Servers

returns netgate.ntp.ntpconfig.daemon.Servers

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.daemon.Servers

creates netgate.ntp.ntpconfig.daemon.Servers

Request Body schema: application/yang-data+json

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

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

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:server": [
    ]
}

creates or updates netgate.ntp.ntpconfig.daemon.Servers

creates or updates netgate.ntp.ntpconfig.daemon.Servers

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.Servers)

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Servers

removes netgate.ntp.ntpconfig.daemon.Servers

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/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.daemon.servers.Server

creates netgate.ntp.ntpconfig.daemon.servers.Server

Request Body schema: application/yang-data+json

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

netgate-ntp:host
string

NTP server IP address or FQDN.

netgate-ntp:noselect
boolean

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

netgate-ntp:prefer
boolean

If true, favor this server more than others.

netgate-ntp:operational-mode
string (netgate.ntp.NtpServerMode)
Enum: "server" "pool"
netgate-ntp:maxpoll
integer <int32>

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

netgate-ntp:iburst
boolean

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

Responses

Request samples

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

returns netgate.ntp.ntpconfig.daemon.servers.Server

returns netgate.ntp.ntpconfig.daemon.servers.Server

path Parameters
host
required
string

Id of server

Responses

Request samples

package main

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

func main() {

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

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

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

path Parameters
host
required
string

Id of server

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.servers.Server)

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.servers.Server

removes netgate.ntp.ntpconfig.daemon.servers.Server

path Parameters
host
required
string

Id of server

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/servers/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.daemon.Tinker

Tinker options.

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.daemon.Tinker

Tinker options.

Request Body schema: application/yang-data+json

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

netgate-ntp:panic
integer <int64>

Panic threshold in seconds. 0 disables. Default 1000.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:panic": 0
}

creates or updates netgate.ntp.ntpconfig.daemon.Tinker

Tinker options.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.Tinker)

Tinker options.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Tinker

Tinker options.

Responses

Request samples

package main

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

func main() {

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

TOS options.

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.daemon.Tos

TOS options.

Request Body schema: application/yang-data+json

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

netgate-ntp:orphan
integer <int32>

Orphan stratum in the range 1 through 16.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:orphan": 0
}

creates or updates netgate.ntp.ntpconfig.daemon.Tos

TOS options.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.daemon.Tos)

TOS options.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Tos

TOS options.

Responses

Request samples

package main

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

func main() {

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

}

returns netgate.ntp.ntpconfig.System

The NTP system parameters not managed by the daemon.

Responses

Request samples

package main

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

func main() {

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

creates netgate.ntp.ntpconfig.System

The NTP system parameters not managed by the daemon.

Request Body schema: application/yang-data+json

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

netgate-ntp:namespace
string (netgate.common.NetworkNamespace)
Enum: "host" "dataplane"
netgate-ntp:enable
boolean

If true, the NTP daemon is enabled.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:namespace": "host",
  • "netgate-ntp:enable": true
}

creates or updates netgate.ntp.ntpconfig.System

The NTP system parameters not managed by the daemon.

Request Body schema: application/yang-data+json

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

object (netgate.ntp.ntpconfig.System)

The NTP system parameters not managed by the daemon.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:system": {
    }
}

removes netgate.ntp.ntpconfig.System

The NTP system parameters not managed by the daemon.

Responses

Request samples

package main

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

func main() {

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

}

ntp-state

returns netgate.ntp.NtpState

Network Time Protocol daemon configuration for time keeping and services.

Responses

Request samples

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
{
  • "netgate-ntp:ntp-state": {
    }
}

returns netgate.ntp.ntpstate.Peers

Information about the server's peer associations.

Responses

Request samples

package main

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

func main() {

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

returns netgate.ntp.ntpstate.peers.Peer

returns netgate.ntp.ntpstate.peers.Peer

path Parameters
id
required
integer <int32>

Id of peer

Responses

Request samples

package main

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

func main() {

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

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

The decoded peer status.

path Parameters
id
required
integer <int32>

Id of peer

Responses

Request samples

package main

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

func main() {

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

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

The peer variables of an association.

path Parameters
id
required
integer <int32>

Id of peer

Responses

Request samples

package main

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

func main() {

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

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

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

path Parameters
id
required
integer <int32>

Id of peer

name
required
string

Id of variable

Responses

Request samples

package main

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

func main() {

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

ntp-config-operation

operates on netgate.ntp.NtpConfigOperation

operates on netgate.ntp.NtpConfigOperation

Request Body schema: application/yang-data+json
object (netgate.ntp.ntpconfigoperation.Input)

Responses

Request samples

Content type
application/yang-data+json
{
  • "input": {
    }
}

Response samples

Content type
application/yang-data+json
{
  • "output": {
    }
}

ntp-control

operates on netgate.ntp.NtpControl

operates on netgate.ntp.NtpControl

Request Body schema: application/yang-data+json
object (netgate.ntp.ntpcontrol.Input)

Responses

Request samples

Content type
application/yang-data+json
{
  • "input": {
    }
}

Response samples

Content type
application/yang-data+json
{
  • "output": {
    }
}

ntp-coredump

operates on netgate.ntp.NtpCoredump

operates on netgate.ntp.NtpCoredump

Request Body schema: application/yang-data+json
object (netgate.ntp.ntpcoredump.Input)

Responses

Request samples

Content type
application/yang-data+json
{
  • "input": {
    }
}

Response samples

Content type
application/yang-data+json
{
  • "output": {
    }
}