- Created by Ramya Raman, last modified on May 16, 2021
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 2 Current »
Returns a list of all NTP Servers configuration data.
Resource URL
http://{host}/api/2.0/ntp_servers/.format
Example Request
GET
[ { "NtpServer": { "id": 1, "title": "utcnist.colorado.edu", "ip_address": "128.138.140.44", "network_id": 0, "status": "Got reply, offset 0.012 delay 0.100", "modified": "1612441532120", "created": "1611142282208" } }, { "NtpServer": { "id": 2, "title": "utcnist2coloradoedu", "ip_address": "128.138.141.172", "network_id": 0, "status": "No reply received in time. Next query in 6 secs", "modified": "1612441530920", "created": "1611142282208" } } ]
GET ntp_servers/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Returns a single specific NTP Server configuration data.
Resource URL
http://{host}/api/2.0/ntp_servers/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired NTP Server to be viewed. |
Example Request
GET
{ "NtpServer": { "id": 1, "title": "utcnist.colorado.edu", "ip_address": "128.138.140.44", "network_id": 0, "status": "Sending query", "modified": "1612441579839", "created": "1611142282208" } }
Adds a new NTP Server configuration.
Resource URL
http://{host}/api/2.0/ntp_servers/.format
Example Request
POST
Body
{ "NtpServer": { "title": "NEW_NIST", "ip_address": "64.90.182.55", "network_id": 0 } }
Response
{ "NtpServer": { "id": 6, "title": "NEW_NIST", "ip_address": "64.90.182.55", "network_id": 0, "status": null, "modified": "1619518200556", "created": "1619518200556" } }
PUT ntp_servers/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | PUT |
Updates a single specific NTP Server configuration.
Resource URL
http://{host}/api/2.0/ntp_servers/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired NTP Server to be updated. |
Example Request
PUT
Body
{ "NtpServer": { "title": "EDIT_NTP2", "ip_address": "192.168.0.254", "network_id": 0 } }
Response
{ "NtpServer": { "id": 1, "title": "EDIT_NTP2", "ip_address": "192.168.0.254", "network_id": 0, "status": "Sending query", "modified": "1619519062417", "created": "1611142282208" } }
DELETE ntp_servers/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | DELETE |
Deletes a single specific NTP Server configuration.
Resource URL
http://{host}/api/2.0/ntp_servers/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired NTP to be deleted. |
Example Request
DELETE
{ "success": true }
GET device_clocks/command/sync
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Synchronizes local clock.
Resource URL
http://{host}/api/2.0/device_clocks/command/sync/.format
Example Request
GET
{ "Task": { "id": 926790, "device_id": 9011, "type": "Realtime clock Sync", "type_id": 8, "mode": "Starting", "mode_id": 1, "status": null, "description": null, "total": 0, "completed": 0, "time_remained": 0, "modified": "1620135352408" } }
GET device_clocks/{device_id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Returns current status of local clock.
Resource URL
http://{host}/api/2.0/device_clocks/{device_id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
device_id | integer | The Device ID for which the Device Clock displays the clock status. |
Example Request
GET
{ "DeviceClock": { "id": 9011, "offset": 0.002, "drift": -3.4, "offset_age": 1, "sync": 1, "modified": "1620736291957" } }
Returns a list of all NTP Servers configuration data.
Resource URL
http://{host}/api/2.0/ntp/config/.format
Example Request
GET
[ { "NtpServer": { "id": 1, "title": "utcnist.colorado.edu", "ip_address": "128.138.140.44", "network_id": 0, "status": "Got reply, offset 0.010 delay 0.100", "modified": "1612441434582", "created": "1611142282208" } }, { "NtpServer": { "id": 2, "title": "utcnist2coloradoedu", "ip_address": "128.138.141.172", "network_id": 0, "status": "Got reply, offset 0.028 delay 0.100", "modified": "1612441433982", "created": "1611142282208" } }, { "NtpServer": { "id": 3, "title": "google", "ip_address": "216.239.35.8", "network_id": 0, "status": "Got reply, offset 0.005 delay 0.100", "modified": "1612441433081", "created": "1611142282208" } } ]
GET ntp/config/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Returns a single specific NTP Server configuration data.
Resource URL
http://{host}/api/2.0/ntp/config/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired NTP Server to be viewed. |
Example Request
GET
{ "NtpServer": { "id": 1, "title": "utcnist.colorado.edu", "ip_address": "128.138.140.44", "network_id": 0, "status": "Got reply, offset 0.021 delay 0.100", "modified": "1619518003174", "created": "1611142282208" } }
Adds a new NTP Server configuration.
Resource URL
http://{host}/api/2.0/ntp/config/.format
Example Request
POST
Body
{ "NtpServer": { "title": "NY NIST", "ip_address": "64.90.182.55", "network_id": 0 } }
Response
{ "NtpServer": { "id": 5, "title": "NY NIST", "ip_address": "64.90.182.55", "network_id": 0, "status": null, "modified": "1619518139273", "created": "1619518139273" } }
Updates a single specific NTP Server configuration.
Resource URL
http://{host}/api/2.0/ntp/config/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired NTP Server to be updated. |
Example Request
PUT
Body
{ "NtpServer": { "title": "EDIT_NTP2", "ip_address": "192.168.0.254", "network_id": 0 } }
Response
{ "NtpServer": { "id": 6, "title": "EDIT_NTP2", "ip_address": "192.168.0.254", "network_id": 0, "status": "Sending query", "modified": "1620116573642", "created": "1620113988859" } }
DELETE ntp/config
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | DELETE |
Deletes a single specific NTP Server configuration.
Resource URL
http://{host}/api/2.0/ntp/config/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired NTP to be deleted. |
Example Request
DELETE
{ "success": true }
Returns a list of all PTP Servers configuration data.
Resource URL
http://{host}/api/2.0/ptp/config/.format
Example Request
GET
[ { "PtpServer": { "id": 1, "title": "PTP55c", "network_id": 8, "ptp_domain": 55, "ptp_working_mode_id": 1, "modified": "1614157960017", "created": "1614157960017" } } ]
GET ptp/config/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Returns a single specific PTP Server configuration data.
Resource URL
http://{host}/api/2.0/ptp/config/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired PTP Server to be viewed. |
Example Request
GET
{ "PtpServer": { "id": 1, "title": "PTP55c", "network_id": 8, "ptp_domain": 55, "ptp_working_mode_id": 1, "modified": "1614157960017", "created": "1614157960017" } }
Returns current PTP status.
Resource URL
http://{host}/api/2.0/ptp/status/.format
Example Request
GET
[ { "PtpStatus": { "id": 3921164033, "device_id": 1909, "network_interface_id": 190904, "iface": "eth4", "network": "RED", "is_configured": 1, "is_locked": 1, "grandmaster_id": "7CFE90FFFECB74A2", "sourceport_id": "985D82FFFF71D059", "source_ip": "10.0.1.99", "domain_number": 55, "selected_by_bmca": 1, "delay": "2us", "offset": "3us", "priority1": 128, "priority2": 128, "time_source": "GPS", "steps_removed": "1", "utc_offset": 37, "announce_interval": 1005176, "last_announce_time": "1620112658271", "clock_class": 248, "clock_accuracy": "100ns", "clock_variance": 17258, "modified": "1620112659119" } }, { "PtpStatus": { "id": 3921229570, "device_id": 1909, "network_interface_id": 190905, "iface": "eth5", "network": "BLUE", "is_configured": 0, "is_locked": 0, "grandmaster_id": "7CFE90FFFECB74A2", "sourceport_id": "985D82FFFF71D059", "source_ip": "10.0.1.99", "domain_number": 55, "selected_by_bmca": 0, "delay": "N/A", "offset": "105us", "priority1": 128, "priority2": 128, "time_source": "GPS", "steps_removed": "1", "utc_offset": 37, "announce_interval": 1015372, "last_announce_time": "1620112658563", "clock_class": 248, "clock_accuracy": "100ns", "clock_variance": 17258, "modified": "1620112659119" } } ]
Adds a new PTP Server configuration.
Resource URL
http://{host}/api/2.0/ptp/config/.format
Example Request
POST
Body
{ "PtpServer": { "id": 1, "title": "PTP55c", "network_id": 1, "ptp_domain": 55, "ptp_working_mode_id": 1, "modified": "1614157960017", "created": "1614157960017" } }
Response
{ "PtpServer": { "id": 5, "title": "PTP55c", "network_id": 1, "ptp_domain": 55, "ptp_working_mode_id": 1, "modified": "1620112843835", "created": "1620112843835" } }
Updates a single specific PTP Server configuration.
Resource URL
http://{host}/api/2.0/ptp/config/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired PTP Server to be updated. |
Example Request
PUT
Body
{ "PtpServer": { "id": 1, "title": "EDIT_PTP55c", "network_id": 1, "ptp_domain": 55, "ptp_working_mode_id": 1, "modified": "1614157960017", "created": "1614157960017" } }
Response
{ "PtpServer": { "id": 5, "title": "EDIT_PTP55c", "network_id": 1, "ptp_domain": 55, "ptp_working_mode_id": 1, "modified": "1620114590046", "created": "1620112843835" } }
DELETE ptp/config
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | DELETE |
Deletes a single specific PTP Server configuration.
Resource URL
http://{host}/api/2.0/ptp/config/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired PTP to be deleted. |
Example Request
DELETE
{ "success": true }
- No labels