REST API  17
REST API for Luna Network HSMs
PUT /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/policies/{policyid}

PUT /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/policies/{policyid}

Sets a specific partition policy.

Parameters

hsmid

The serial number of the HSM of interest.

Use: Required

JSON Schema:

   Object
   type: integer
   format: int64
   minimum: 1
   maximum: 9999999999

partitionid

The identifier of the partition of interest

Use: Required

JSON Schema:

   Object
   type: integer
   format: int64
   minimum: 1000000
   maximum: 99999999999999999

policyid

The identifier of the policy to change

Use: Required

JSON Schema:

   Object
   type: string
   minLength: 1
   maxLength: 32
   pattern: ^[a-zA-Z0-9_.-]*$

value

The new value for the partition policy

Use: Required

JSON Schema:

   Object
   type: integer
   minimum: 0
   maximum: 255

Responses

204

Success

Location

JSON Schema:

    id: Object
        type: string

"Location" is the URL to the task spawned to perform the action on the partition policy.

400

FRAMEWORK_BAD_REQUEST

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

404

HSM, partition or policy does not exist.

Example Request

   PUT 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011784/policies/33
   {"value": 0}

Example Result

{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/api/lunasa/hsms/tasks/37', 'Content-Length': '2', 'Access-Control-Allow-Credentials': 'true'}

{
}