Uploading and applying a pre-shared key file by using REST Administration APIs
System administrators can upload a pre-shared key file to Eclipse Amlen by using the Eclipse Amlen REST API FILE method. System administrators can then apply the pre-shared key file by using the Eclipse Amlen REST API POST method.
You can upload a pre-shared key file by using the Eclipse Amlen REST API FILE method. You can then apply the pre-shared key file by using the Eclipse Amlen REST API POST method. If you apply a new pre-shared key file, the existing pre-shared key file is overwritten without warning.
curl -X PUT -T /var/tmp/MyPreSharedKeyFile.csv http://127.0.0.1:9089/ima/v1/file/myPSKfile_201603016.csv
The
following example shows applying 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/
The
following shows an example response to the POST
method.
{
"Version": "v1",
"Code": "CWLNA6011",
"Message": "The requested configuration change has completed successfully."
}