Skip to main content
Version: 3.8.x.x LTS

Exporting an existing configuration

The API supports the export of environments or applications. Two different approaches are provided:

  • The first approach creates a downloadable file that can be used by the GUI's import function without requiring conversion. This is the default use case. For example: https://<hostname>:8037/nevisadmin/rest/configuration/environment/<envid>/export.

    In order for the export to work, set the Accept header to "application/octet-stream". If a Swagger UI is used for the call, the resulting file will be accessible through a download link generated in the "Response Body" section.

  • The second approach returns the file content as a base64 encoded string to make REST imports easier and to allow for simply uploading the output if needed. For example: https://<hostname>:8037/nevisadmin/rest/configuration/environment/<envid>/export?base64=true.

    In this case, set the Accept header to either "application/xml" or "application/json". Also, add the query parameter base64 with value "true". This results in:

Exported configuration result
<fileDescription name="env_test.exp">
<directory>export</directory>
<contentBase64><base64-encoded file content></contentBase64>
</fileDescription>