netgate-ntp API (25.10)

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

Copyright 2018-2025 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.Makestep)

Allow stepping system clock.

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

Interface binding specifications.

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

Logging options

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

TOS options.

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

Maxchange options.

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

Access rules

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

The NTP parameters managed by the NTP daemon.

netgate-ntp:logdir
string

Full path name of the log directory.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:makestep": {
    },
  • "netgate-ntp:interfaces": {
    },
  • "netgate-ntp:servers": {
    },
  • "netgate-ntp:log": {
    },
  • "netgate-ntp:tos": {
    },
  • "netgate-ntp:maxchange": {
    },
  • "netgate-ntp:access-rules": {
    },
  • "netgate-ntp:parameters": {
    },
  • "netgate-ntp:logdir": "string"
}

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

Access rules

Responses

Request samples

package main

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

func main() {

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

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

creates netgate.ntp.ntpconfig.daemon.AccessRules

Access rules

Request Body schema: application/yang-data+json

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

Array of objects (netgate.ntp.ntpconfig.daemon.accessrules.Access)

Allow and deny rules for NTP requests.

Responses

Request samples

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

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

Access rules

Request Body schema: application/yang-data+json

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

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

Access rules

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.AccessRules

Access rules

Responses

Request samples

package main

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

func main() {

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

	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.accessrules.Access

Allow and deny rules for NTP requests.

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.daemon.accessrules.Access to be added to list

netgate-ntp:all
boolean

If true, allow access from all addresses.

netgate-ntp:sequence
integer <int64>

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

netgate-ntp:action
string (netgate.ntp.NtpAccessAction)
Enum: "allow" "deny"
netgate-ntp:prefix
string

If specified, allow access from this subnet.

Responses

Request samples

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

returns netgate.ntp.ntpconfig.daemon.accessrules.Access

Allow and deny rules for NTP requests.

path Parameters
sequence
required
integer <int64>

Id of access

Responses

Request samples

package main

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

func main() {

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

creates or updates netgate.ntp.ntpconfig.daemon.accessrules.Access

Allow and deny rules for NTP requests.

path Parameters
sequence
required
integer <int64>

Id of access

Request Body schema: application/yang-data+json

netgate.ntp.ntpconfig.daemon.accessrules.Access to be added or updated

object (netgate.ntp.ntpconfig.daemon.accessrules.Access)

Allow and deny rules for NTP requests.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.accessrules.Access

Allow and deny rules for NTP requests.

path Parameters
sequence
required
integer <int64>

Id of access

Responses

Request samples

package main

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

func main() {

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

netgate-ntp:binddevice
string

Interface to bind to.

netgate-ntp:bind
string

IPv4 address to bind to.

netgate-ntp:bind6
string

IPv6 address to bind to.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:binddevice": "string",
  • "netgate-ntp:bind": "string",
  • "netgate-ntp:bind6": "string"
}

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

}

returns netgate.ntp.ntpconfig.daemon.Log

Logging options

Responses

Request samples

package main

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

func main() {

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

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

creates netgate.ntp.ntpconfig.daemon.Log

Logging options

Request Body schema: application/yang-data+json

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

netgate-ntp:rtc
boolean

Log RTC information

netgate-ntp:rawmeasurements
boolean

Log raw NTP measurements

netgate-ntp:selection
boolean

Log source selection

netgate-ntp:tempcomp
boolean

Log temperature compensation

netgate-ntp:refclocks
boolean

Log reference clock measurements

netgate-ntp:tracking
boolean

Log changes to the estimate of system's gain or loss rate.

netgate-ntp:statistics
boolean

Log statistics

netgate-ntp:measurements
boolean

Log measurements

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:rtc": true,
  • "netgate-ntp:rawmeasurements": true,
  • "netgate-ntp:selection": true,
  • "netgate-ntp:tempcomp": true,
  • "netgate-ntp:refclocks": true,
  • "netgate-ntp:tracking": true,
  • "netgate-ntp:statistics": true,
  • "netgate-ntp:measurements": true
}

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

Logging options

Request Body schema: application/yang-data+json

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

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

Logging options

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Log

Logging options

Responses

Request samples

package main

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

func main() {

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

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

Allow stepping system clock.

Responses

Request samples

package main

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

func main() {

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

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

creates netgate.ntp.ntpconfig.daemon.Makestep

Allow stepping system clock.

Request Body schema: application/yang-data+json

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

netgate-ntp:limit
integer <int32>

Number of initial clock updates during which stepping is allowed.

netgate-ntp:threshold
integer <int32>

Step threshold. The system clock will be stepped if the adjustment is larger than the specified value.

Responses

Request samples

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

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

Allow stepping system clock.

Request Body schema: application/yang-data+json

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

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

Allow stepping system clock.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Makestep

Allow stepping system clock.

Responses

Request samples

package main

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

func main() {

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

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

Maxchange options.

Responses

Request samples

package main

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

func main() {

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

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

creates netgate.ntp.ntpconfig.daemon.Maxchange

Maxchange options.

Request Body schema: application/yang-data+json

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

netgate-ntp:offset
integer <int32>

Maximum clock update offset in seconds. If the offset is greater than this value, the NTP daemon will exit unless start and ignore values prevent it.

netgate-ntp:start
integer <int32>

Number of clock updates after which to begin checking the offset.

netgate-ntp:ignore
integer <int32>

Number of times to ignore clock updates greater than the offset.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:offset": 0,
  • "netgate-ntp:start": 0,
  • "netgate-ntp:ignore": 0
}

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

Maxchange options.

Request Body schema: application/yang-data+json

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

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

Maxchange options.

Responses

Request samples

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

removes netgate.ntp.ntpconfig.daemon.Maxchange

Maxchange options.

Responses

Request samples

package main

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

func main() {

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

	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

netgate-ntp:maxupdateskew
integer <int32>

Maximum skew update threshold.

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/chrony/drift.

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

Force monitor flags to disabled.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:maxupdateskew": 0,
  • "netgate-ntp:enabled-flags": {
    },
  • "netgate-ntp:driftfile": "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:rtcsync
boolean

If true, disable RTC sync.

netgate-ntp:monitor
boolean

If true, disable monitor.

netgate-ntp:leapsectz
boolean

If true, disable getting leap second info from the timezone database.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:rtcsync": true,
  • "netgate-ntp:monitor": true,
  • "netgate-ntp:leapsectz": 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:rtcsync
boolean

If true, enable RTC sync.

netgate-ntp:monitor
boolean

If true, enable monitor.

netgate-ntp:leapsectz
boolean

If true, enable getting leap second info from the timezone database.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-ntp:rtcsync": true,
  • "netgate-ntp:monitor": true,
  • "netgate-ntp:leapsectz": 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.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:prefer
boolean

If true, favor this server more than others.

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

Desired number of sources to be used from the pool

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:burst
boolean

If true, send a burst of attempts to an server that did not provide good measurements to speed up acquisition of time synchronization.

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:prefer": true,
  • "netgate-ntp:operational-mode": "server",
  • "netgate-ntp:maxsources": 0,
  • "netgate-ntp:host": "string",
  • "netgate-ntp:noselect": true,
  • "netgate-ntp:burst": true,
  • "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.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": {
    }
}