REST API  17
REST API for Luna Network HSMs
PUT /api/lunasa/ntp/servers/{serverid}

PUT /api/lunasa/ntp/servers/{serverid}

This resource allows changing settings for a specific server.

User Privileges

Users with the following role privileges can perform this command:

  • admin
  • operator

Parameters

serverid

Specifies the id of the NTP server.

Use: Required

JSON Schema:

    Object
    type:string
    minLength: 1
    maxLength: 64
    pattern: ^((?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9]))|((?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4})|([a-zA-Z0-9]([a-zA-Z0-9.-]{0,62}[a-zA-Z0-9])?)$

isBurstEnabled

Specifies flag controlling sending a burst of packets instead of usual single packet.

Use: Required

JSON Schema:

    Object
    type:boolean

isInitialBurstEnabled

Specifies flag controlling sending a burst of packets when an initial connection cannot be established.

Use: Required

JSON Schema:

    Object
    type:boolean

keyId

Specifies the key id used in communication with the NTP server.

Use: Optional

JSON Schema:

    Object
    type:integer
    minimum: 1
    maximum: 65535

nts

Specifies flag controlling enabling nts authentication.

Use: Optional

JSON Schema:

    Object
    type:boolean

isPreferredServer

Specifies flag designating this server as the preferred one.

Use: Required

JSON Schema:

    Object
    type:boolean

protocolVersion

Specifies the protocol version used in communication with the NTP server. Note: NTS Authentication is supported with protocol version 4 only.

Use: Required

JSON Schema:

    Object
    type:integer
    minimum: 3
    maximum: 4

port

Specifies the port used in communication with the NTP server. Default port is 4460. Note: This parameter can only be used with NTS Authentication.

Use: Optional

JSON Schema:

    Object
    type:integer
    minimum: 0
    maximum: 65535

Responses

204

Success

Location

"Location" is the URL to the newly created NTP server.

see GET /api/lunasa/ntp/servers/{serverid}

400

FRAMEWORK_BAD_REQUEST

Returned when the input data does not conform to the required validation schema.

400

NTP_INVALID_AUTHENTICATION

Parameters used for ntp authentication are invalid.

400

NTP_INVALID_VERSION_WITH_NTS

Version used with nts authentication is not supported.

400

NTP_CANNOT_USE_PORT_WITHOUT_NTS

Cannot add an NTS-KE port without using NTS.

500

NTP_OPERATION_FAILED

Unable to perform requested operation.

Example Request for modifying KeyId Authenticated server

    PUT
    https://1.2.3.4:8443/api/lunasa/ntp/servers/example.com
    {
        "isInitialBurstEnabled": true,
        "isBurstEnabled": false,
        "isPreferredServer": true,
        "keyId": 10,
        "protocolVersion": 3
    }

Example Request for modifying NTS Authenticated server

    PUT
    https://1.2.3.4:8443/api/lunasa/ntp/servers/example.com
    {
        "isInitialBurstEnabled": true,
        "isBurstEnabled": false,
        "isPreferredServer": true,
        "nts": true,
        "port": 4430,
        "protocolVersion": 4
    }

Example Response

{
}

Notes

This resource will require SO authentication when the forceSoLogin flag is enabled. (See GET /api/lunasa)

See Also

GET /api/lunasa/ntp/servers