Upload a pre-shared key file

Purpose

Uploads a pre-shared key file to 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 PUT method with the following Eclipse Amlen file URI:

http://<admin-endpoint-IP:Port>/ima/v1/file/<PreSharedKeyFileName>

Usage NotesĀ®

  • If you apply a new PSK file, the existing PSK file is overwritten without warning.
  • You cannot view the contents of the PreSharedKey file by using a REST API. To view the contents of the PSK file, you must manually retrieve the file from the filesystem.
  • The supported file format of a pre-shared key file is CSV.

Related REST Administration APIs

Example

Upload a pre-shared key file called "MyPreSharedKeyFile.csv" and save it as "myPSKfile_201603016.csv" by using cURL:
curl -X PUT -T /var/tmp/MyPreSharedKeyFile.csv http://127.0.0.1:9089/ima/v1/file/myPSKfile_201603016.csv 
An example response:

{        
  "Version": "v1",
  "Code": "CWLNA6011",
  "Message": "The requested configuration change has completed successfully."
}