API v2: Exporting/Importing System Configuration πΒΆ
Warning
The endpoints described in this section belong to the /internal API group and may change without prior notice. These interfaces are intended for internal use and are not guaranteed to be stable between releases.
For more details refer to the API BETA Endpoints section.
Data StructuresΒΆ
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
yes |
Base64 encode master key file content. |
|
string |
yes |
Configuration file content. |
Retrieve Available Attributes of the ConfigurationModelΒΆ
Request
Method |
|
Path |
|
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
Exporting the Master KeyΒΆ
Note
Exporting the Master Key requires a certificate, which will be used to encrypt the exported key data.
Request
Method |
|
Path |
|
GET /api/v2/internal/masterkey/export
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' \
'https://10.0.214.98/api/v2/internal/masterkey/export' \
-d '{
"certificate": "-----BEGIN CERTIFICATE-----\nMIIC...snip...\n-----END CERTIFICATE-----\n"
}'
Exporting System ConfigurationΒΆ
Request
Method |
|
Path |
|
GET /api/v2/internal/configuration/export
The following example downloads the configuration to a file named fudo_config.conf.
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' \
'https://10.0.214.98/api/v2/internal/configuration/export' \
-o fudo_config.conf
Importing System ConfigurationΒΆ
Request
Method |
|
Path |
|
Headers |
|
Body |
|
POST /api/v2/internal/configuration/import
Example Request
curl -s -k -X POST \
-H 'Authorization:sgfeea6jsaz4mum9su8w61877n1g06sk' \
'https://10.31.87.227/api/v2/internal/configuration/import' \
-H 'Content-Type: application/json' \
-d '{"master_key":"<base64 masterkey decrypted>","configuration": "<sql file content>"}'
Response
{
"result": "success"
}