AE-2059: Upgrade Centre and Automation Hub and Topology API's
Review Request #1004 — Created Aug. 7, 2025 and submitted — Latest diff uploaded
| Information | |
|---|---|
| apoorva.sn | |
| AMP | |
| amp_4_0 | |
| AE-2059 | |
| Reviewers | |
| ngurunathan, pmurugaiyan, pradeep, shuinvy | |
Problem
Port API's for the following:
Port the API’s:
Upgrade Center
Automation Hub
-Device Configuration Files -Cloned Files -Customized FilesTopology
-SLB Topology -Real ServiceSolution
Have made changes w.r.t python3 syntax so that the API returns the correct data
Automation Hub
Device Configuration Files
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/config_file/ConfigFile/_get_list_data' \
-H 'Accept: application/json, text/plain, /' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'Connection: keep-alive' \
-b 'csrftoken=SWmmY4kaUMWvkS1TAKil04Xo8ctTrgiZ; hive_key=1; django_language=en; csrf_token=SWmmY4kaUMWvkS1TAKil04Xo8ctTrgiZ; current_user=array; hive_sess=b275fc80-41f5-48dd-ad80-61e76ae9205b' \
-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: SWmmY4kaUMWvkS1TAKil04Xo8ctTrgiZ' \
-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"' \
--insecure
[{"name": "APV-166", "file_type": "device", "device_type": "vAPV", "create_time": "2025-07-29 10:13:35", "modify_time": "2025-07-29 10:13:35", "comment": "", "device_name": "", "cli_content": "", "upload_path": "", "upload_type": false, "pk": "{\"file_type\": \"device\", \"name\": \"APV-166\"}", "pk_id": "APV-166-device"}][root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/device_mgmt/device/Device/_get_list_data' \
-H 'Accept: application/json, text/plain, /' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'Connection: keep-alive' \
-b 'csrftoken=9wjJiduwuI01EpoUYhkcHheYg5uECMd8; hive_key=1; django_language=en; csrf_token=9wjJiduwuI01EpoUYhkcHheYg5uECMd8; current_user=array; hive_sess=979d4f31-e8c2-4b49-ba3c-a908ee0ae0d1' \
-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: 9wjJiduwuI01EpoUYhkcHheYg5uECMd8' \
-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"' \
--insecure
[{"zone": "default", "id": "953679f5-6c36-11f0-a370-0050568d64ef", "name": "APV-166", "type": "vAPV", "ip": "192.168.162.166", "protocol": "restapi", "group_name_from": "new", "restapi_port": 9997, "restapi_account": {"restapi_username": "restapi", "restapi_password": ""}, "console_account": {"console_username": "array", "console_password": ""}, "connection": true, "status": true, "log_enable": true, "snmp_general": {"snmp_enable": false, "community": ""}, "license_key": "3ece94cb-15c95c69-3f6cb2e8-0426831e-017e89f2-33380080-1454d8ab-20250604-20250902", "webui_port": 8888, "enable_password": "", "backup_enable": false, "gateway_domain": "", "location": "", "firewall_ip": "", "intranet_ip": "", "own": "", "extend_fields": "", "host_name": "AN", "system_cpu": "Intel(R) Xeon(R) CPU", "system_ram": "3879500 kbytes.", "system_boot_time": "Sun Jun 15 18:55:09 GMT (+0000) 2025", "system_up_time": "43 days, 9 hrs, 52 mins", "platform_bld_date": "Tue Apr 16 13:12:36 GMT 2024", "ssl_hw": "No HW Available", "compression_hw": "No HW Available", "network_interface": "4 x 10Gigabit Ethernet fiber", "model": "Array vAPV", "serial_number": "75FA684AA3D6C00005012643240734", "license_feature": "WebWall, Clustering, L4SLB, L7SLB, Caching, SSL, tProxy, SwCompression, LLB, QoS, MultiLang, DynRoute, IPv6, SWMaintenance", "license_date": "Expires on Sep 02 2025", "build_version": "ArrayOS Rel.APV.10.7.0.16 build on Thu Apr 11 10:58:07 2024", "license_limit": "vCPUs(x4), NICs(x4), RAM(8 GB), Bandwidth(1000 Mbps)", "asso_ip_pool": [], "device_group": "apv-grp", "pk": "{\"id\": \"953679f5-6c36-11f0-a370-0050568d64ef\", \"name\": \"APV-166\", \"type\": \"vAPV\"}", "pk_id": "953679f5-6c36-11f0-a370-0050568d64ef-APV-166-vAPV"}]Clone Device Config
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/config_file/ConfigFile/_perform' \
-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=gNvKI9vNH5JVIyQTdekOnm7RYqz9bm9L; hive_key=1; django_language=en; csrf_token=gNvKI9vNH5JVIyQTdekOnm7RYqz9bm9L; current_user=array; hive_sess=48099a01-7278-4d84-bdcd-a4018a7afe1f' \
-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: gNvKI9vNH5JVIyQTdekOnm7RYqz9bm9L' \
-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 'action=Clone_file&options=%7B%22__pk_list%22%3A%5B%22%7B%5C%22name%5C%22%3A%5C%22APV-166%5C%22%2C%5C%22file_type%5C%22%3A%5C%22device%5C%22%2C%5C%22device_type%5C%22%3A%5C%22vAPV%5C%22%7D%22%5D%2C%22file_name%22%3A%22APV-166-Clone%22%2C%22comment%22%3A%22Dev-166-cone%22%2C%22option%22%3Atrue%2C%22vs%22%3A%22%22%7D&csrfmiddlewaretoken=gNvKI9vNH5JVIyQTdekOnm7RYqz9bm9L' \
--insecure
[true, {"config_change": true, "refresh_page": false, "msg": ""}]Customized Files
Custom Configuration
Text config:
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/config_file/ConfigFile/_add' \
-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=AvNIUoUlcsrF7W9dbXSyV69YUn6dOW9v; hive_key=1; django_language=en; csrf_token=AvNIUoUlcsrF7W9dbXSyV69YUn6dOW9v; current_user=array; hive_sess=60ab07e0-c5c7-4ed9-965f-7f3607caccdb' \
-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: AvNIUoUlcsrF7W9dbXSyV69YUn6dOW9v' \
-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=%7B%22name%22%3A%22Custom_config_text%22%2C%22file_type%22%3A%22customize%22%2C%22device_type%22%3A%22vAPV%22%2C%22cli_content%22%3A%22system%20command%20timeout%20120%5Cnsystem%20command%20override%20on%22%7D&csrfmiddlewaretoken=AvNIUoUlcsrF7W9dbXSyV69YUn6dOW9v' \
--insecure
[true, "name=%22Custom_config_text%22&file_type=%22customize%22", []]File Config:
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/config_file/ConfigFile/_add' \
-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=KHlyYlQB7I3RHyzXG9ABP3BBd3PscmOY; hive_key=1; django_language=en; csrf_token=KHlyYlQB7I3RHyzXG9ABP3BBd3PscmOY; current_user=array; hive_sess=d49f7ee7-a817-4f0e-bdb9-6599dd62d52a' \
-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: KHlyYlQB7I3RHyzXG9ABP3BBd3PscmOY' \
-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=%7B%22name%22%3A%22custom_config_file_type%22%2C%22file_type%22%3A%22customize%22%2C%22device_type%22%3A%22vAPV%22%2C%22cli_content%22%3A%22%23%23URL%23%23%5Cnsystem%20command%20timeout%20120%5Cnsystem%20command%20override%20on%5Cnadmin%20aaa%20off%5Cnadmin%20aaa%20authorize%20off%5Cnadmin%20aaa%20method%20RADIUS%5Cnhostname%20%5C%22AN%5C%22%5Cnconfig%20timeout%20180%20%5Cnsystem%20timezone%20%5C%22Asia%2FIndia%2FKolkata%5C%22%5Cnconfig%20multiconfig%20disable%22%2C%22upload_path%22%3A%22%2Ftmp%2Fwebui_upload%2Fconfig%20(1).txt%22%2C%22upload_type%22%3Atrue%7D&csrfmiddlewaretoken=KHlyYlQB7I3RHyzXG9ABP3BBd3PscmOY' \
--insecure
[true, "name=%22custom_config_file_type%22&file_type=%22customize%22", []]Upload File:
curl 'http://127.0.0.1:8000/upload' \
-H 'Accept: /' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'Connection: keep-alive' \
-H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryA7AgsBqYc9nBSBhA' \
-b 'csrftoken=2R1qHvEFvnvg0u5lFE20Z0ya2PFG70jn; hive_key=1; django_language=en; csrf_token=2R1qHvEFvnvg0u5lFE20Z0ya2PFG70jn; current_user=array; hive_sess=58b5d1e7-6b28-431d-83b3-8fbac4681773' \
-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 '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 $'------WebKitFormBoundaryA7AgsBqYc9nBSBhA\r\nContent-Disposition: form-data; name="file"; filename="config (1).txt"\r\nContent-Type: text/plain\r\n\r\n\r\n------WebKitFormBoundaryA7AgsBqYc9nBSBhA--\r\n' \
--insecure
{"files": [{"name": "config (1).txt", "size": 0, "url": "/tmp/webui_upload/config (1).txt"}]}Backup Config:
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/config_file/ConfigFile/_perform' \
-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=dQaKoEmsSFgisDGyjE8ti9i4g65bCjWF; hive_key=1; django_language=en; csrf_token=dQaKoEmsSFgisDGyjE8ti9i4g65bCjWF; current_user=array; hive_sess=6cb8035b-f2d7-4f5a-9c91-ecf519fba34a' \
-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: dQaKoEmsSFgisDGyjE8ti9i4g65bCjWF' \
-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 'action=Backup&options=%7B%22__pk_list%22%3A%5B%22%7B%5C%22file_type%5C%22%3A%5C%22device%5C%22%2C%5C%22name%5C%22%3A%5C%22APV-166%5C%22%7D%22%5D%2C%22comment%22%3A%22backup%20APV-166%22%7D&csrfmiddlewaretoken=dQaKoEmsSFgisDGyjE8ti9i4g65bCjWF' \
--insecure
[true, {"config_change": true, "refresh_page": false, "msg": ""}]Recover:
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/config_file/ConfigFile/_perform' \
-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=91OxyukvOUOJML7tww9861b9DORn19wW; django_language=en; csrf_token=91OxyukvOUOJML7tww9861b9DORn19wW; hive_key=1; current_user=array; hive_sess=ed26fb47-a19e-483d-b3d5-4f9e9049eb6a' \
-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: 91OxyukvOUOJML7tww9861b9DORn19wW' \
-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 'action=Recover&options=%7B%22__pk_list%22%3A%5B%22%7B%5C%22file_type%5C%22%3A%5C%22backup%5C%22%2C%5C%22name%5C%22%3A%5C%22APV-166-2025_07_08_10:06:38.cfg%5C%22%7D%22%5D%2C%22backup%22%3Afalse%7D&csrfmiddlewaretoken=91OxyukvOUOJML7tww9861b9DORn19wW' \
--insecure
[true, {"config_change": true, "refresh_page": false, "msg": ""}][root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/config_file/ConfigFile/_perform' \
-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=RJvxfLicrf2C2JmrP1DnZzKGLxuF7wer; django_language=en; csrf_token=RJvxfLicrf2C2JmrP1DnZzKGLxuF7wer; hive_key=1; current_user=array; hive_sess=8ace2aac-e49b-40c5-8d55-35780f8fc629' \
-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: RJvxfLicrf2C2JmrP1DnZzKGLxuF7wer' \
-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 'action=Recover&options=%7B%22__pk_list%22%3A%5B%22%7B%5C%22file_type%5C%22%3A%5C%22backup%5C%22%2C%5C%22name%5C%22%3A%5C%22APV-166-2025_07_08_10:06:38.cfg%5C%22%7D%22%5D%2C%22backup%22%3Afalse%7D&csrfmiddlewaretoken=RJvxfLicrf2C2JmrP1DnZzKGLxuF7wer' \
--insecure
[true, {"config_change": true, "refresh_page": false, "msg": ""}]Config Compare
Device
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/config_file/ConfigFile/_perform' \
-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=jkTCFpaqQHdz4S9TgXMJf29SmfsySKr9; django_language=en; csrf_token=jkTCFpaqQHdz4S9TgXMJf29SmfsySKr9; hive_key=1; current_user=array; hive_sess=1ba723b7-6e50-4fa8-ba0a-fdfdacd19ee6' \
-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: jkTCFpaqQHdz4S9TgXMJf29SmfsySKr9' \
-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 'action=Onekey_Compliance_Check&options=%7B%22__pk_list%22%3A%5B%22%7B%5C%22name%5C%22%3A%5C%22APV-136-2025_08_05_12%3A58%3A44.cfg%5C%22%2C%5C%22file_type%5C%22%3A%5C%22backup%5C%22%2C%5C%22device_type%5C%22%3A%5C%22vAPV%5C%22%2C%5C%22device_name%5C%22%3A%5C%22APV-166%5C%22%7D%22%5D%2C%22module%22%3A%22all%22%2C%22option%22%3A%22immediate%22%7D&csrfmiddlewaretoken=jkTCFpaqQHdz4S9TgXMJf29SmfsySKr9' \
--insecure
[true, {"config_change": true, "refresh_page": false, "msg": ""}]between devices or same device:
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/config_file/ConfigFile/_perform' \
-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=bymZQrgWTsczGN4nW4BE7XA8aPwRg17L; django_language=en; csrf_token=bymZQrgWTsczGN4nW4BE7XA8aPwRg17L; hive_key=1; current_user=array; hive_sess=a242deff-9104-454e-9e7d-8b0b1849a830' \
-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: bymZQrgWTsczGN4nW4BE7XA8aPwRg17L' \
-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 'action=Custom_Compliance_check&options=%7B%22__pk_list%22%3A%5B%5D%2C%22source_device%22%3A%22APV-136%22%2C%22source_config%22%3A%22APV-166-2025_08_05_12:29:27.cfg%22%2C%22target_type%22%3A%22device%22%2C%22target_device%22%3A%22APV-136%22%2C%22target_config%22%3A%22APV-166-2025_08_05_12:29:45.cfg%22%7D&csrfmiddlewaretoken=bymZQrgWTsczGN4nW4BE7XA8aPwRg17L'
--insecure
[true, {"config_change": true, "refresh_page": false, "msg": ""}]Upgrade Centre
Add Update:
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/update/Update/_add' \
-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=mOCwGyw94BG2oJln129QjbiGZGvq4FUE; hive_key=1; django_language=en; csrf_token=mOCwGyw94BG2oJln129QjbiGZGvq4FUE; current_user=array; hive_sess=b3e75880-04f1-4d59-8d2d-705706a63d5b' \
-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: mOCwGyw94BG2oJln129QjbiGZGvq4FUE' \
-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=%7B%22app_name%22%3A%22ArrayOS-Rel_APV_10_7_3_12.array%22%2C%22build_version%22%3A%22Rel.APV.10.7.3.12%22%2C%22md5_value%22%3A%222be5df6c0cc69c2955e03407d9c112ec%22%7D&csrfmiddlewaretoken=mOCwGyw94BG2oJln129QjbiGZGvq4FUE' \
--insecure
[true, "id=0&app_name=%22ArrayOS-Rel_APV_10_7_3_12.array%22&build_version=%22Rel.APV.10.7.3.12%22", []]Delete Update:
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/configuration/update/Update/_delete' \
-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' \
-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: ZRTB3UijQBSlBoXvvkJefKXGOOZooFzS' \
-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"' \
-b 'csrftoken=ZRTB3UijQBSlBoXvvkJefKXGOOZooFzS; hive_key=1; django_language=en; csrf_token=ZRTB3UijQBSlBoXvvkJefKXGOOZooFzS; current_user=array; hive_sess=15131ce1-7807-4ce0-8308-2ffd89dfdb2d' \
--data-raw 'pk=%7B%22app_name%22%3A%22ArrayOS-Rel_APV_10_7_3_12.array%22%2C%22build_version%22%3A%22Rel.APV.10.7.3.12%22%2C%22id%22%3A1%7D&csrfmiddlewaretoken=ZRTB3UijQBSlBoXvvkJefKXGOOZooFzS' \
--insecureSLB Topology
[root@AN admin]# curl $'http://127.0.0.1:8000/proxy_req_dev/webui_utils/\'\'' \
-H 'Accept: application/json, text/plain, /' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'CM-Data: 953679f5-6c36-11f0-a370-0050568d64ef' \
-H 'CM-Type: device' \
-H 'Connection: keep-alive' \
-b 'csrftoken=Ft7gYtTaGib2MjJ0TpieFfnnvuxByTZo; hive_key=1; django_language=en; csrf_token=Ft7gYtTaGib2MjJ0TpieFfnnvuxByTZo; current_user=array; hive_sess=19425dc4-f7b2-41a4-83e4-4d4a82a72cc4' \
-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: Ft7gYtTaGib2MjJ0TpieFfnnvuxByTZo' \
-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"' \
--insecure
{"result": 1, "data": [{"basic": {"protocol": "https", "service_name": "vs1", "enable": 1, "vip": "192.168.162.161", "vport": 443, "arp": 1, "max_conn": 0}, "policies": [{"type": "static", "dst": {"name": "RS1", "protocol": "http", "enable": 1, "updown_status": 1,"type": "rs", "ip": "192.168.162.161", "port": 9000, "max_conn": 0, "health_relation": "and", "add_relation": "none", "recovery_time": 0, "warm_up_time": 0, "max_cps": 0, "soft_bandwidth": 0, "hard_bandwidth": 0,"keepdip": 0, "hc_up": 3, "hc_down": 3,"server_conn_reuse": 1, "server_persist": 1, "check_type": "icmp"}}]}]}[root@AN admin]Real Service
[root@AN admin]# curl 'http://127.0.0.1:8000/api/cm/device_mgmt/device_group/RoleDeviceGroup/_perform' \
-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=wep0NyUOAYRRPT3hxq213gtO7pfFKgFT; hive_key=1; django_language=en; csrf_token=wep0NyUOAYRRPT3hxq213gtO7pfFKgFT; current_user=array; hive_sess=10c2a58d-d82f-4853-a85d-9e30754f516c' \
-H 'Origin: http://127.0.0.1:8000' \
-H 'Referer: http://127.0.0.1:8000app/' \
-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: wep0NyUOAYRRPT3hxq213gtO7pfFKgFT' \
-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 'action=FilterRoleDeviceGroups&options=%7B%22role_id%22%3A%220%22%7D&csrfmiddlewaretoken=wep0NyUOAYRRPT3hxq213gtO7pfFKgFT' \
--insecure
[true, {"result": [{"group_name": "apv-grp2", "device_list": []}, {"group_name": "apv-grp", "device_list": [{"id": "953679f5-6c36-11f0-a370-0050568d64ef", "zone": "default", "name": "APV-166", "ip": "192.168.162.166", "protocol": "restapi", "restapi_port": 9997, "connection": true, "status": true, "license_key": "3ece94cb-15c95c69-3f6cb2e8-0426831e-017e89f2-33380080-1454d8ab-20250604-20250902", "gateway_domain": "", "location": "", "firewall_ip": "", "intranet_ip": "", "type": "vAPV", "extend_fields": null, "own": "", "log_enable": 1, "snmp_general": {"snmp_enable": false, "community": ""}, "webui_port": 8888, "device_group": "apv-grp", "enable_password": "", "backup_enable": false, "restapi_account": {"restapi_username": "restapi", "restapi_password": null}, "console_account": {"console_username": "array", "console_password": null}, "host_name": "AN", "system_cpu": "Intel(R) Xeon(R) CPU", "system_ram": "3879500 kbytes.", "system_boot_time": "Sun Jun 15 18:55:09 GMT (+0000) 2025", "system_up_time": "51 days, 4 hrs, 3 mins", "platform_bld_date": "Tue Apr 16 13:12:36 GMT 2024", "ssl_hw": "No HW Available", "compression_hw": "No HW Available", "network_interface": "4 x 10Gigabit Ethernet fiber", "model": "Array vAPV", "serial_number": "75FA684AA3D6C00005012643240734", "build_version": "ArrayOS Rel.APV.10.7.0.16 build on Thu Apr 11 10:58:07 2024", "license_limit": "vCPUs(x4), NICs(x4), RAM(8 GB), Bandwidth(1000 Mbps)", "license_date": "Expires on Sep 02 2025", "license_feature": "WebWall, Clustering, L4SLB, L7SLB, Caching, SSL, tProxy, SwCompression, LLB, QoS, MultiLang, DynRoute, IPv6, SWMaintenance", "group_name_from": ""}]}], "config_change": true, "refresh_page": false, "msg": ""}][root@AN admin]# curl 'http://127.0.0.1:8000/real_service?role_id=0' \
-H 'Accept: application/json, text/plain, /' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'Connection: keep-alive' \
-b 'csrftoken=Dq65U57IBwUcwsbxLkWpqSx6fikcxa1y; hive_key=1; django_language=en; csrf_token=Dq65U57IBwUcwsbxLkWpqSx6fikcxa1y; current_user=array; hive_sess=e14153d6-ee27-44c2-8e35-17ebc773880f' \
-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: Dq65U57IBwUcwsbxLkWpqSx6fikcxa1y' \
-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"' \
--insecure
{"APV-166": {"device": {"id": "953679f5-6c36-11f0-a370-0050568d64ef", "name": "APV-166", "ip": "192.168.162.166", "port": 9997, "username": "restapi", "password": "restuser@123", "type": "vAPV", "connection": "connected", "device_group": "apv-grp"}, "RealService": [{"instance_id": "RS1", "service_name": "RS1", "protocol": "http", "enable": true, "ssl_host": null, "ip": "192.168.162.161", "ip_add": "192.168.162.161", "ip_domain": "192.168.162.161", "port": 9000, "max_conn": 0, "check_type_http": "icmp", "hc_up": 3, "hc_down": 3, "blocks": [], "groups": [], "upDown": "UP"}]}}
