REST API  4.0.0
REST API for SafeNet Network HSMs
POST /api/lunasa/hsms/{hsmid}/counter/actions/{actionid}

POST /api/lunasa/hsms/{hsmid}/counter/actions/{actionid}

monitor: Sets interval and samples configuration parameters for the counter associated with the HSM.

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: string

interval

The interval over which the HSM is polled, in seconds. See "hsm information monitor" of SafeNet Network HSM Product Documentation for more details of this configuration parameter.

Use: Required

JSON Schema:

   Object
   type: integer

samples

The number of samples to collect during the HSM polling. See "hsm information monitor" of SafeNet Network HSM Product Documentation for more details of this configuration parameter. In the product documentation, the parameter is "rounds."

Use: Required

JSON Schema:

   Object
   type: integer

Responses

200

A list of counters collected during the HSM polling.

Location

JSON Schema:

    id: Object
        type: string

"Location" is the URL to the task spawned to perform the counter action.

400

Unexpected error

404

HSM or action does not exist.

Example Request

   POST 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/counter/actions/monitor
   {"interval": 2, "samples": 10}

Example Result

{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/tasks/0', 'Content-Length': '712', 'Access-Control-Allow-Credentials': 'true'}

{
   "counters": [
      {
         "operationErrors": 2444,
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 284893,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      },
      {
         "operationErrors": 2444,
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 284941,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      },
      {
         "operationErrors": 2444,
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 284949,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      },
      {
         "operationErrors": 2444, 
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 284957,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      },
      {
         "operationErrors": 2444,
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 284965,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      },
      {
         "operationErrors": 2444,
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 284973,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      },
      {
         "operationErrors": 2444,
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 284981,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      },
      {
         "operationErrors": 2444,
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 284989,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      },
      {
         "operationErrors": 2444,
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 284997,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      },
      {
         "operationErrors": 2444,
         "cryptoOperationErrors": 0,
         "criticalEvents": 0,
         "operationRequests": 285045,
         "cryptoOperationRequests": 0,
         "nonCriticalEvents": 0
      }
   ]
}