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ΒΆ

ConfigurationModelΒΆ

Attribute

Type

Required

Description

master_key

string

yes

Base64 encode master key file content.

configuration

string

yes

Configuration file content.

Retrieve Available Attributes of the ConfigurationModelΒΆ

Request

Method

GET

Path

/api/v2/objspec/configuration_import

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

GET

Path

/api/v2/internal/masterkey/export

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

GET

Path

/api/v2/internal/configuration/export

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

POST

Path

/api/v2/internal/configuration/import

Headers

Content-Type: Application/json

Body

ConfigurationModel

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"
}