Apply a pre-shared key file
Purpose
Applies the previously uploaded pre-shared key file by creating the PreSharedKey configuration in Eclipse Amlen. A pre-shared key (PSK) is a secret key that can be shared between two devices (for example, a client and a server) that are connected by a secured channel. The PSK is used by the server to authenticate the client.
URI
Use the Eclipse Amlen REST API POST method with the following Eclipse Amlen configuration URI:
http://<admin-endpoint-IP:Port>/ima/v1/configuration/
Object configuration data
Provide PreSharedKeyFile object configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:
{  
  "PreSharedKey":"<PreSharedKeyFileName>"
}Where:- PreSharedKeyFileName
 - Required.
 
Usage NotesĀ®
- You must upload the certificate to the server before you can apply it. Upload a pre-shared key file to upload the PSK file.
 - If you apply a new PSK file, the existing PSK file is overwritten without warning.
 - Capitalization and double quotation marks must be used as shown.
 
Related REST Administration APIs
Example
Apply a pre-shared key file called "myPSKfile_201603016.csv" by using cURL:
curl -X POST \
   -H 'Content-Type: application/json'  \
   -d  '{
         "PreSharedKey": "myPSKfile_201603016.csv"  
        }
      '  \
http://127.0.0.1:9089/ima/v1/configuration/An
      example response to the POST
      method.
{        
  "Version": "v1",
  "Code": "CWLNA6011",
  "Message": "The requested configuration change has completed successfully."
}