REST API  14
REST API for Luna Network HSMs
POST /api/lunasa/network/actions/{actionid}

POST /api/lunasa/network/actions/{actionid}

Performs the specified action.

Parameters

actionid

The identifier of the action to be performed

Use: Required

JSON Schema:

   Object
   type: string

address

Specifies the address to ping, accepts an ip address or hostname.This parameter will be validated.

Use: Required

JSON Schema:

    Object
    type:string

Responses

200

The time it took to ping in seconds.

400

Bad request or unexpected error.

404

Invalid action.

Example Request

   POST
   https://1.2.3.4:8443/api/lunasa/network/actions/ping

   {
      "address" : "1.2.3.5"
   }

Example Result

Returns the transfer time of one packet in milliseconds. A time of 0 indicates the ping failed.

{'access-control-allow-origin': '*', 'content-type': 'application/json', 'content-length': '712', 'access-control-allow-credentials': 'true'}
{
  "time" : 0.000607
}