Description: Exports user-defined settings to zip file under the following path: <XRAY_HOME>/backup/config/<SERVICE_ID>_xray_exported_config_<TIMESTAMP>.zip
.
Note
For Xray 2.x versions, it is mandatory to specify the source Binary management (instance_id
) when exporting watches, ignore rules, and indexed resources. This REST API is supported from Xray version 2.11.0.
Related Dependencies:
- Exporting watches requires exporting policies.
- Exporting ignored rules requires exporting watches.
API Version: v1
Security: Requires an admin user
Usage: POST /api/v1/configuration/export
Consumes: application/json
Produces : application/json
Sample Usage:
POST api/v1/configuration/export { # Export all configurations "export_all" : false (default, supported from Xray 3.41.4), # Specifying specific entities to export "policies" : false (default), "watches" : false (default), "ignore_rules" : false (default), "custom_licenses" : false (default), "custom_issues" : false (default), "webhooks" : false (default), "indexed_resources" : false (default), "ticketing_integrations" : false (default, supported from Xray 3.41.4), # Pre Xray 3.x "mail_server" : false (default, not supported for Xray 3.x), "proxy_config": false (default, not supported for Xray 3.x), "instance_id" : “” (default, not required for Xray 3.x) }
Sample Response:
{ "info": "Successfully exported config to file <SERVICE_ID>_xray_exported_config_<TIMESTAMP>.zip under {XRAY_HOME}/backup/config" }
Response Codes:
200: Success.400: Got an invalid request
500: Failed to export config file.