Configuring NTP Service Information

Function

This interface is used to configure the NTP service information.

Syntax

Operation type: PATCH

URL: https://device_ip/redfish/v1/Systems/NTPService

Request header:

X-Auth-Token: auth_value

Request message body:

{
    "ClientEnabled":ClientEnabled,
    "NTPLocalServers":NTPLocalServers,
    "NTPRemoteServers":NTPRemoteServers,
    "NTPRemoteServersbak":NTPRemoteServersbak,
    "ServerEnabled":ServerEnabled,
    "Target":Target
}

Request Parameters

Table 1 Request parameters

Parameter

Mandatory/Optional

Parameter Description

Value

ClientEnabled

Mandatory

Whether the NTP client is enabled.

Boolean value. The value can be true or false.

NTPLocalServers

Optional

Local IP address used for the NTP service.

IPv4 address. The value is a string. This parameter is valid only when ServerEnabled is set to true.

NOTE:

This parameter is invalid in this version.

NTPRemoteServers

Mandatory

IP address of the preferred NTP server.

IPv4 address. The value is a string. This parameter is valid only when ClientEnabled is set to true. The value must be different from that of NTPRemoteServersbak.

NTPRemoteServersbak

Mandatory

IP address of the alternate NTP server.

IPv4 address. The value is a string. This parameter is valid only when ClientEnabled is set to true. The value must be different from that of NTPRemoteServers.

ServerEnabled

Mandatory

Whether the NTP server is enabled.

Boolean value. The value is false.

Target

Optional

Configuration type of the NTP service.

Character string. The value is Client.

Usage Guidelines

None

Example

Request:

PATCH https://10.10.10.10/redfish/v1/Systems/NTPService 

Request header:

X-Auth-Token: auth_value

Request message body:

{
    "ClientEnabled":true,
    "NTPLocalServers":"",
    "NTPRemoteServers":"192.168.xx.xx",
    "NTPRemoteServersbak":"",
    "ServerEnabled":false,
    "Target":"Client"
}

Response:

{
    "@odata.type": "#MindXEdgeNTPService.v1_0_0.MindXEdgeNTPService",
    "@odata.context": "/redfish/v1/$metadata#Systems/NTPService",
    "@odata.id": "/redfish/v1/Systems/NTPService",
    "Id": "NTPService",
    "Name": "NTPService",
    "ClientEnabled": true,
    "ServerEnabled": false, 
    "Port": null,
    "NTPRemoteServers": "192.168.xx.xx", 
    "NTPRemoteServersbak": null, 
    "NTPLocalServers": ""
}

Response code: 200

Output Description

Table 2 Operation output description

Field

Type

Description

@odata.type

Character string

Type of the NTP service resource.

@odata.context

Character string

OData description of the NTP service resource model.

@odata.id

Character string

Path to access the NTP service resource.

Id

Character string

ID of the NTP service resource.

Name

Character string

Name of the NTP service resource.

ClientEnabled

Boolean

Whether the NTP client is enabled.

ServerEnabled

Boolean

Whether the NTP server is enabled.

Port

Character string

NTP server port number.

NTPRemoteServers

Character string

IP address of the preferred NTP server.

NTPRemoteServersbak

Character string

IP address of the alternate NTP server.

NTPLocalServers

Character string

Local IP address used for the NTP service.