RESTAPI Manual
System
NTP
17 min
urls summary urls summary url get post patch put delete /rest/v1/rpc/clock datetime n y n n n /rest/v1/running/ntp global y n y n n /rest/v1/running/ntp keys/{key id} y y n n y /rest/v1/running/ntp servers/{address} y y n n y /rest/v1/rpc/ntp synchronize n y n n n /rest/v1/rpc/show ntp n y n n n examples examples ntp synchronize ntp synchronize post https //{switch ip}/rest/v1/rpc/ntp synchronize { "server" "192 0 0 1" } show ntp information show ntp information post https //{switch ip}/rest/v1/rpc/show ntp modify global ntp modify global ntp patch https //{switch ip}/rest/v1/running/ntp global { "enabled" "false", "authentication" "true", "fast jump" "false", "vrf" "mgmt" } update ntp global configuration update ntp global configuration patch https //{switch ip}/rest/v1/running/ntp global \[{ "op" "add", "path" "source interface", "value" \["loopback0"] }, { "op" "remove", "path" "source interface/eth0" }] create a ntp key create a ntp key post https //{switch ip}/rest/v1/running/ntp keys { "key id" 3, "type" "sha256", "key value" "password" } create a ntp server create a ntp server post https //{switch ip}/rest/v1/running/ntp servers { "address" "10 250 0 2", "key id" 1 } properties descriptions properties descriptions ntp global ntp global tree diagrams + rw ntp global \| + rw enabled? \| + rw authentication? \| + rw fast jump? \| + rw vrf? \| + rw source interface table of properties name required type/range description ntp global m path only node, has no configurable value global configuration of ntp enabled o "true" "false" (sub property of ntp global) the ntp state default value "true" authentication o "true" "false" (sub property of ntp global) the ntp authentication state default value "false" fast jump o "true" "false" (sub property of ntp global) configure ntp synchronous step mode to fast jump vrf o "mgmt" "default" (sub property of ntp global) ntp can be enabled only in one vrf at a time in this revision, it is either default vrf or management vrf default value "default" source interface o ethernet name portchannel name vlan1 4094 loopback0 199 "eth0" (sub property of ntp global) this is the interface whose ip address is used as the source ip address for generating ntp traffic user is required to make sure that the ntp server is reachable via this ip address and the same ip address is reachable from the ntp server the source interface should be in the same vrf as the vrf ntp is enabled in ntp servers ntp servers tree diagrams + rw ntp servers \| + rw ntp server \[address] \| + rw address \| + rw key id? table of properties name required type/range description ntp servers m path only node, has no configurable value address m a b c d xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx (sub property of ntp servers) this server address is a simple ntp server address, it is only used to synchronize the time with the server key id o 0 4294967295 (sub property of ntp servers) ntp keys ntp keys tree diagrams + rw ntp keys + rw ntp key \[key id] + rw key id + rw type + rw key value table of properties name required type/range description ntp keys m path only node, has no configurable value ntp authentication key configuration key id m 0 4294967295 (sub property of ntp keys) the key id is used to identify the key, and the key id is unique type m "md5" "sha1" "sha256" "sha384" "sha512" (sub property of ntp keys) the type is used to store the key encryption type, and the key encryption type is md5 by default key value m string (sub property of ntp keys) the value is used to store the encrypted key value ntp synchronize ntp synchronize tree diagrams + x ntp synchronize \| + w input \| | + w server \| | + w unprivileged? \| + ro output \| + ro text? table of properties name required type/range description ntp synchronize m path only node, has no configurable value synchronize the time with the ntp server server m a b c d xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx (sub property of input) the server address is used to synchronize the time with the server unprivileged o "true" "false" (sub property of input) the unprivileged is used to determine whether the user has the right to synchronize the time default value "false" text ro string (sub property of output) show ntp show ntp tree diagrams + x show ntp \| + ro output \| + ro text? table of properties name required type/range description show ntp m path only node, has no configurable value display ntp info text ro string (sub property of output) clock datetime clock datetime tree diagrams + x clock datetime + w input + w ymd + w hms table of properties name required type/range description clock datetime m path only node, has no configurable value set the system clock date and time ymd m string (sub property of input) hms m string (sub property of input)
