REST API Create, Endpoints & Examples
In the realm of IT infrastructure, efficient and secure management of storage resources is paramount. REST (Representational State Transfer) APIs provide a flexible and scalable approach for managing various components within a storage system. This article delves into the REST API endpoints related to Auth Groups, ISCSI Targets, LUNs, Pools, Shares, Snapshots, and System Status, offering a comprehensive guide for administrators and developers.
Table of Contents
API Create
To create API open “Configuration” menu and click “API Management” to open management page.
To create API key you need to click “New API” button.
In this pop-up you can set enable state, name, expire time and authorized pool names (If any pool name is not selected, API key will be considered authorized in all pools.)
After setting details, click “Permissions” tab to set API key permissions. In this tab you can give permissions to every endpoint for API key. Then submit to get API key.
Here you can see your API key at table.
To see API key click “Show…”. Here is you can see your API key.
API Endpoints
Auth Group
Auth Group releated operations
Detail
Detail of spesific Auth Group.
Method: GET
URL: https://192.168.1.201/api/v2/auth_group/<id>
Example Output:
{ "chap": [ { "chap_user": "metroclient", "chap_password": "secretsecret" } ], "group_id": "d5796e19830189c02065ea9fdd6dd1d3312a222f", "group_name": "metro", "initiator": [ { "iqn": "iqn.2005-01.il.ac.huji.cs:nobody", "iqn_alias": "metroc", "id": "c656e281485c6f897bd3282a85c8e09b69560f3e", "group_id": "d5796e19830189c02065ea9fdd6dd1d3312a222f" }, { "iqn": "iqn.1993-08.org.debian:01:569060d5dd3c", "id": "400755d273c30998487d7560e7e96f5bc8ec89a9", "group_id": "d5796e19830189c02065ea9fdd6dd1d3312a222f", "iqn_alias": "bbq" }, { "iqn_alias": "sss", "group_id": "d5796e19830189c02065ea9fdd6dd1d3312a222f", "id": "2f2b43912a87f85784f1462b23f0a90917294cc4", "iqn": "iqn.2025-05.com.ngxio:982b0941de0c:arcsighttarget82" } ], "owner": "RSA3Q866_B", }
Detail List
Detailed list of all Auth Groups
Method: GET
URL: https://192.168.1.201/api/v2/auth_group/list
Example Output:
[ { "group_id": "1", "group_name": "DefaultAuthGroup" }, { "chap": [ { "chap_user": "metroclient", "chap_password": "secretsecret" } ], "group_id": "d5796e19830189c02065ea9fdd6dd1d3312a222f", "group_name": "metro", "initiator": [ { "iqn": "iqn.2005-01.il.ac.huji.cs:nobody", "iqn_alias": "metroc", "id": "c656e281485c6f897bd3282a85c8e09b69560f3e", "group_id": "d5796e19830189c02065ea9fdd6dd1d3312a222f" }, { "iqn": "iqn.1993-08.org.debian:01:569060d5dd3c", "id": "400755d273c30998487d7560e7e96f5bc8ec89a9", "group_id": "d5796e19830189c02065ea9fdd6dd1d3312a222f", "iqn_alias": "bbq" }, { "iqn_alias": "sss", "group_id": "d5796e19830189c02065ea9fdd6dd1d3312a222f", "id": "2f2b43912a87f85784f1462b23f0a90917294cc4", "iqn": "iqn.2025-05.com.ngxio:982b0941de0c:arcsighttarget82" } ], "owner": "RSA3Q866_B" } { "chap": [ { "chap_user": null, "chap_password": null, } ] "group_id": "eaf1849db55023ce8c61c41fad97a95cc80c2148", "group_name": "x", "initiator": [ { "iqn": "iqn.2016-04.com.open-iscsi:a89eff514d99", "id": "7c52a68ebc13879568d79908488b9283101899bd", "group_id": "eaf1849db55023ce8c61c41fad97a95cc80c2148", "iqn_alias": "ngxopenstack0131" }, { "iqn_alias": "ssd", "iqn": "iqn.2016-04.com.open-iscsi:a89e3514d99", "id": "052f14c57e17811d7546ee26d8f0d32f6de4b200", "group_id": "eaf1849db55023ce8c61c41fad97a95cc80c2148" }, { "iqn_alias": "eeq", "id": "029442065499bb6f9cfbd43c5b64da3e3674ac18", "iqn": "iqn.2016-04.com.open-iscsi:a89eff514d3", "group_id": "eaf1849db55023ce8c61c41fad97a95cc80c2148" } ], "owner": "1" } ]
List
List of Auth Groups
Method: GET
URL: https://192.168.1.201/api/v2/auth_group
Example Output:
[ { "group_name": "DefaultAuthGroup", "group_id": "1" }, { "group_id": "d5796e19830189c02065ea9fdd6dd1d3312a222f" "group_name": "metro", "owner": "RSA3Q866_B", }, { "group_id": "eaf1849db55023ce8c61c41fad97a95cc80c2148", "group_name": "x" "owner": "1", } ]
ISCSI Target
ISCSI Target releated operations
Detail
Detail of specific ISCSI Target.
Method: GET
URL: https://192.168.1.201/api/v2/iscsi_target/<id>
Example Output:
{ "group_id": "1", "group_name": "DefaultAuthGroup", "iqn_name": "iqn.2015-03.com.ngxio.rsa3q866", "luns": [ { "lun_id": "589c0001c1d60fe4ac1f312febffe4ae", "lun_name": "x", "lun_number": "0", "pool_name": "nvme1" "profile": "-", "vol_id": "fe8a213fd118cef3010239b167fa86fe88c8d101" } ], "owner": "1", "portal_id": "84904f58234656a66ede2075a38596003bb0013c", "portal_name": "asgasdg", "scsi_id": "fc9a57b1fd478fa0aa72fb1bb81cd5129eb1de3f", "scsi_target_name": "t1", "target_iqn": "iqn.2015-03.com.ngxio.rsa3q866:t1" }
Detail List
Detailed list of all ISCSI Targets
Method: GET
URL: https://192.168.1.201/api/v2/iscsi_target/list
Example Output:
[ { "group_id": "1", "group_name": "DefaultAuthGroup", "iqn_name": "iqn.2015-03.com.ngxio.rsa3q866", "luns": [ { "lun_id": "589c0001c1d60fe4ac1f312febffe4ae", "lun_name": "x", "lun_number": "0", "pool_name": "nvme1" "profile": "-", "vol_id": "fe8a213fd118cef3010239b167fa86fe88c8d101" } ], "owner": "1", "portal_id": "84904f58234656a66ede2075a38596003bb0013c", "portal_name": "asgasdg", "scsi_id": "fc9a57b1fd478fa0aa72fb1bb81cd5129eb1de3f", "scsi_target_name": "t1", "target_iqn": "iqn.2015-03.com.ngxio.rsa3q866:t1" }, { "group_id": "1", "group_name": "DefaultAuthGroup", "iqn_name": "iqn.2015-03.com.ngxio.rsa3q866", "luns": [], "owner": "RSA3Q866_A", "portal_id": "649754f78d29d607c64f695fd7070c6a8131d164", "portal_name": "vmware", "scsi_id": "7eca073a5bdd98e1e0d7a753279cf1b4c50c6d3d", "scsi_target_name": "vmware", "target_iqn": "iqn.2015-03.com.ngxio.rsa3q866:vmware" }, ]
List
List of ISCSI Targets
Method: GET
URL: https://192.168.1.201/api/v2/iscsi_target
Example Output:
[ { "owner": "1", "scsi_id": "fc9a57b1fd478fa0aa72fb1bb81cd5129eb1de3f", "scsi_target_name": "t1" }, { "owner": "RSA3Q866_A", "scsi_id": "7eca073a5bdd98e1e0d7a753279cf1b4c50c6d3d", "scsi_target_name": "vmware" }, ]
LUN
LUN releated operations
Detail
Detail of specific LUN.
Method: GET
URL: https://192.168.1.201/api/v2/lun/<id>
Example Output:
{ "blocksize": "16384", "clone": "", "compress_ratio": "-", "compress": "off", "dedup": "off", "dram_cache": "on", "flash_cache": "on", "io_type": "transactional", "owner": "1", "pool_name": "nvme1", "protocols": { "fc": null, "iscsi": "t1", }, "provision_type": "thin", "qos_priority": 16, "scsi_lunid": "589c0001c1d60fe4ac1f312febffe4ae", "sizebysnapshots": "57344", "vol_id": "fe8a213fd118cef3010239b167fa86fe88c8d101", "vol_name": "x", "vol_size": "1100585369600", "vol_used": "1106423808" }
Detail List
Detailed list of all LUNs.
Method: GET
URL: https://192.168.1.201/api/v2/lun/list
Example Output:
[ { "blocksize": "16384", "clone": "", "compress_ratio": "-", "compress": "off", "dedup": "off", "dram_cache": "on", "flash_cache": "on", "io_type": "transactional", "owner": "1", "pool_name": "nvme1", "protocols": { "fc": null, "iscsi": null, }, "provision_type": "full", "qos_priority": 128, "scsi_lunid": "589c004ef5ddf2db32dd4437960711b2", "sizebysnapshots": "0", "vol_id": "f5d09c2614f903f1c1700e14a36a329f763c56bd", "vol_name": "lun2", "vol_size": "1073741824", "vol_used": "1042223104" }, { "blocksize": "16384", "clone": "", "compress_ratio": "-", "compress": "off", "dedup": "off", "dram_cache": "on", "flash_cache": "on", "io_type": "transactional", "owner": "1", "pool_name": "nvme1", "protocols": { "fc": null, "iscsi": "t1", }, "provision_type": "thin", "qos_priority": 16, "scsi_lunid": "589c0001c1d60fe4ac1f312febffe4ae", "sizebysnapshots": "57344", "vol_id": "fe8a213fd118cef3010239b167fa86fe88c8d101", "vol_name": "x", "vol_size": "1100585369600", "vol_used": "1106423808" } ]
List
List of LUNs.
Method: GET
URL: https://192.168.1.201/api/v2/lun
Example Output:
[ { "name": "lun2", "owner": "1", "pool": "nvme1", "vol_id": "f5d09c2614f903f1c1700e14a36a329f763c56bd" }, { "name": "x", "owner": "1", "pool": "nvme1", "vol_id": "fe8a213fd118cef3010239b167fa86fe88c8d101" } ]
Pool
Pool releated operations
Detail
Detail of specific Pool.
Method: GET
URL: https://192.168.1.201/api/v2/pool/<id>
Example Output:
{ "data": [ { "disk": "HDD18", "enclosure": "E1:S18", "info": "", "lunid": "", "state": "ONLINE", "stripe_info": "c-1" }, { "disk": "HDD15", "enclosure": "E1:S15", "info": "", "lunid": "", "state": "ONLINE", "stripe_info": "c-1" } ], "encryption": 0, "integrity": { "can_stop": 0, "can_start": 1, "info": "No info" }, "is_nvme": 1, "owner": "1", "pool_id": "b42ecdf4c9a0e6677546fb4da04b0ebede0476e5", "pool_name": "nvme1", "raidtype": "raid1", "status": "ONLINE", "stripe_len": 2 }
Detail List
Detailed list of all Pools.
Method: GET
URL: https://192.168.1.201/api/v2/pool/list
Example Output:
[ { "data": [ { "disk": "HDD18", "enclosure": "E1:S18", "info": "", "lunid": "", "state": "ONLINE", "stripe_info": "c-1" }, { "disk": "HDD15", "enclosure": "E1:S15", "info": "", "lunid": "", "state": "ONLINE", "stripe_info": "c-1" } ], "encryption": 0, "integrity": { "can_stop": 0, "can_start": 1, "info": "No info" }, "is_nvme": 1, "owner": "1", "pool_id": "b42ecdf4c9a0e6677546fb4da04b0ebede0476e5", "pool_name": "nvme1", "raidtype": "raid1", "status": "ONLINE", "stripe_len": 2 } { "data": [ { "disk": "HDD4", "enclosure": "E1:S4", "info": "", "lunid": "", "state": "ONLINE", "stripe_info": "c-1" }, { "disk": "HDD6", "enclosure": "E1:S6", "info": "", "lunid": "", "state": "ONLINE", "stripe_info": "c-1" }, { "disk": "HDD5", "enclosure": "E1:S5", "info": "", "lunid": "", "state": "ONLINE", "stripe_info": "c-1" } ], "encryption": 0, "integrity": { "can_start": 1, "can_stop": 0, "info": "No info" }, "is_nvme": 1, "owner": "1", "pool_id": "158958043cc29b0eaf226fee5060ede83e92eceb", "pool_name": "ryo2", "raidtype": "raid5", "status": "ONLINE", "stripe_len": 3 } ]
List
List of Pools.
Method: GET
URL: https://192.168.1.201/api/v2/pool
Example Output:
[ { "owner": "1", "pool_id": "b42ecdf4c9a0e6677546fb4da04b0ebede0476e5", "pool_name": "nvme1" }, { "owner": "1", "pool_id": "158958043cc29b0eaf226fee5060ede83e92eceb", "pool_name": "ryo2" } ]
Snapshot
Snapshot releated operations
Detail
Detail of specific Snapshot.
Method: GET
URL: https://192.168.1.201/api/v2/snapshot/<id>
Example Output:
{ "binded": 0, "created": "1713251666", "pool_name": "nvme1", "reserved": "57344", "restore": 1, "snap_id": "816479d3d58565ea7670d7c3dc9a25fb143e96e6", "snap_name": "x", "vol_name": "x" }
Detail List
Detailed list of all Snapshots.
Method: GET
URL: https://192.168.1.201/api/v2/snapshot/list
Example Output:
{ "shares": [ { "binded": 0, "created": "1715091440", "pool_name": "nvme1", "reserved": "98304", "restore": 1, "snap_id": "f9afd48e46ecf68ff26b58e42396870b3df896ae", "snap_name": "dasd", "vol_name": "test" } ], "luns": [ { "binded": 0, "created": "1713251666", "pool_name": "nvme1", "reserved": "57344", "restore": 1, "snap_id": "816479d3d58565ea7670d7c3dc9a25fb143e96e6", "snap_name": "x", "vol_name": "x" } ] }
List
List of Snapshots.
Method: GET
URL: https://192.168.1.201/api/v2/snapshot
Example Output:
{ "luns": [ { "lun_name": "x", "pool_name": "nvme1", "snap_id": "816479d3d58565ea7670d7c3dc9a25fb143e96e6", "snap_name": "x" } ], "shares": [ { "pool_name": "nvme1", "share_name": "test", "snap_id": "f9afd48e46ecf68ff26b58e42396870b3df896ae", "snap_name": "dasd" } ] }
Status
Status releated operations
Capacity
Status of Capacity
Method: GET
URL: https://192.168.1.201/api/v2/status/capacity
Example Output:
{ "example_pool": { "info": { "allocated_size": "43271795507", "compress_ratio": "1.79", "dedup_ratio": "1.27x", "free_size": "84442493013196", "logical_avail": "68300828797152", "logical_reserved": "218522300576", "total_size": "84442493013196" }, "protocol_usage": { "iscsi": "214748414720", "replica": "49920", "shares": "49920" }, } }
Cluster
Status of cluster
Method: GET
URL: https://192.168.1.201/api/v2/status/cluster
Example Output:
{ "connected": 1, "interconnects": { "ethernet": 1, "hbactive": 0, "hbdrive": 0, "serial": 1 }, "peers": [ { "id": "RSA3Q866_B" }, { "id": "RSA3Q866_A" } ], "status": "Master" }
Enclosures
Status of enclosures
Method: GET
URL: https://192.168.1.201/api/v2/status/enclosures
Example Output:
[ { "model": "NVMEX11", "no": 1, "owner": 0, "serial": "NVMEX11" }, { "model": "D2U24", "no": 2, "owner": 0, "serial": "50015b214087fbbf" } ]
Overloaded Volumes
Status of overloaded volumes
Method: GET
URL: https://192.168.1.201/api/v2/status/overloaded_volumes
Example Output:
{ "last_check_time": "1717140583", "overloaded_volumes": [ { "name": "lun2", "pool": "nvme1", "type": "lun", "used": 1042223104, "vol_id": "f5d09c2614f903f1c1700e14a36a329f763c56bd", "volsize": 1073741824 } ], }
Pools
Status of pools
Method: GET
URL: https://192.168.1.201/api/v2/status/pools
Example Output:
[ { "integrity": { "can_start": 1, "can_stop": 0, "info": "No info" }, "owner": "1", "pool_id": "f1a3357a0911d9e43e3bc2fdf448dbcd9c628955", "pool_name": "testpoool", "status": "ONLINE" }, { "integrity": { "can_start": 1, "can_stop": 0, "info": "No info" }, "owner": "1", "pool_id": "ba0dabe3e360c5977aa44a7aa70f8a618a3c9244", "pool_name": "nvme8", "status": "ONLINE" } ]
Services
Status of services
Method: GET
URL: https://192.168.1.201/api/v2/status/services
Example Output:
{ "cifs": 0, "nfs": 1, "s3": 0, "san": 1 }
System Info
Status of system info
Method: GET
URL: https://192.168.1.201/api/v2/status/system_info
Example Output:
{ "app_version": "2.3.2", "controller_type": "2", "date": "Mon Apr 1 09:48:29 +03 2024", "dramcachesize": "258GB", "fc_initiators": 0, "luns": 0, "maxlun": "64", "maxsnap": "2048", "os_version": "13.2", "product": "H2000G2", "scsi_initiators": 0, "service_tag": "RSA3Q866", "shares": 1, "snapshot_count": "0", "uptime": "33 minutes, 38 seconds", "used_lun": 1, "user_count": 1 }
API Request Examples
Curl
curl \ --location 'https://192.168.1.19/api/v2/pool/<POOL_ID>' \ --header 'Authorization: Bearer <API_KEY>'
Python – requests
import requests headers = { 'Authorization': 'Bearer <API_KEY>', } response = requests.get('https://192.168.1.19/api/v2/pool/<POOL_ID>', headers=headers)
Go
package main import ( "fmt" "io" "log" "net/http" ) func main() { client := &http.Client{} req, err := http.NewRequest("GET", "https://192.168.1.19/api/v2/pool/<POOL_ID>", nil) if err != nil { log.Fatal(err) } req.Header.Set("Authorization", "Bearer <API_KEY>") resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close() bodyText, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Printf("%s\n", bodyText) }
PHP
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://192.168.1.19/api/v2/pool/<POOL_ID>'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer <API_KEY>', ]); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $response = curl_exec($ch); curl_close($ch);
Javascript – Fetch
fetch('https://192.168.1.19/api/v2/pool/<POOL_ID>', { headers: { 'Authorization': 'Bearer <API_KEY>' } });
NodeJS – Axios
import axios from 'axios'; const response = await axios.get('https://192.168.1.19/api/v2/pool/<POOL_ID>', { headers: { 'Authorization': 'Bearer <API_KEY>' } });