AE-2016: Save/Upload Setting API
Review Request #987 — Created July 22, 2025 and updated
| Information | |
|---|---|
| apoorva.sn | |
| AMP | |
| amp_4_0 | |
| AE-2016 | |
| Reviewers | |
| ngurunathan, pmurugaiyan, pradeep, shuinvy | |
Problem
Save/Upload Setting API
Solution
Have fixed issues after porting for Save/Upload Setting API
Save / upload setting
Save Setting
[root@AN admin]# curl 'http://127.0.0.1:8000/cm/save_setting' \
-H 'Accept: application/json, text/plain, /' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' \
-b 'csrftoken=6tCNasi5MjbDWBwMRNHFMcN0wA5IIJSY; hive_key=1; django_language=en; csrf_token=6tCNasi5MjbDWBwMRNHFMcN0wA5IIJSY; current_user=array; hive_sess=339e4339-4d49-4768-bd06-6ceea8666354' \
-H 'Origin: http://127.0.0.1:8000' \
-H 'Referer: http://127.0.0.1:8000/app/' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36' \
-H 'X-CSRFToken: 6tCNasi5MjbDWBwMRNHFMcN0wA5IIJSY' \
-H 'sec-ch-ua: "Not)A;Brand";v="8", "Chromium";v="138", "Google Chrome";v="138"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
--data-raw 'post_data=&csrfmiddlewaretoken=6tCNasi5MjbDWBwMRNHFMcN0wA5IIJSY' \
--insecure \
--output test.setting
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 18503 100 18440 100 63 76514 261 --:--:-- --:--:-- --:--:-- 77095Upload Setting
[root@AN admin]#
[root@AN admin]# curl 'http://127.0.0.1:8000/cm/upload_setting' \
-X POST \
-F 'file=@backup_download.setting' \
-F 'csrfmiddlewaretoken=NmP8BCyyjIm34fTy1PLNieDczQVLU7oq' \
-b 'csrftoken=NmP8BCyyjIm34fTy1PLNieDczQVLU7oq; hive_key=1; django_language=en; csrf_token=NmP8BCyyjIm34fTy1PLNieDczQVLU7oq; current_user=array; hive_sess=98b8ad6d-ca88-4f4e-9e45-00a76142ea99' \
-H 'Origin: http://127.0.0.1:8000' \
-H 'Referer: http://127.0.0.1:8000/app/' \
--insecure
{"is_success": true}
