Range

Function

This API is used to get parameter range for Storage > RAID page.

Note:

The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

Request Message

None.

Sample:

POST /API/StorageConfig/Raid/Range HTTP/1.1
{
    "version": "1.0",
    "data": {}
}

Response Message

Parameter Description

Table 1

ParameterRangeTypeDescription
disk_infoJSON ObjectDisk Info Object, see Table 2 for detailed information
raid_infoJSON ObjectRaid Info Object, see Table 3 for detailed information
about_raid_infoJSON ObjectAbout Raid Info Object, see Table 5 for detailed information
create_raidJSON ObjectCreate Info Object, see Table 6 for detailed information
ctrl_infoJSON ObjectCtrl Info Object, see Table 8 for detailed information

Table 2

Disk Info Object

ParameterRangeTypeDescription
No1~16int32The page displays the serial number of the hard drive
enableboolIs the hard drive in a configurable state, that is, it can be checked for hot backup or Raid reconstruction
checkboolUsed to select the current hard drive for hot backup or rebuild Raid
id0~16int32The ID number of the hard drive
disk_modelmax_length:40stringModel of hard drive
serial_nomax_length:20stringThe serial number of the hard drive
total_size2147483647int32The capacity of the hard drive, in GB
array_namemax_length:20stringWhich RAID disk does the hard disk belong to
disk_typeNormal Disk
HotDisk
Raid Disk
stringIndicates that the hard drive is a regular hard drive, set as a hot spare, and formed into a RAID disk
button_type"Add HotDisk"
"Remove HotDisk"
""
stringDisplay the button to set/release the hot spare operation. If the character is blank, it indicates that the operation is not supported and does not need to be displayed
slot_nomax_length:8stringThe slot number of the hard drive

Table 3

Raid Info Object

ParameterRangeTypeDescription
Noint32The page displays the serial number of the RAID disk
checkboolThe page displays the serial number of the RAID disk for selecting the current hard drive for rebuilding the current Raid or deleting operations
raid_id0~16int32The page displays the serial number of the RAID disk
raid_namemax_length:32stringThe page displays the name of the RAID disk
raid_typeRAID0
RAID1
RAID4
RAID5
RAID0
RAID10
stringRAID level type
total_size0~ 2147483647int32Capacity of RAID disk
raid_statusNormal
Degrade
Offline
stringRAID status, normal, degraded, offline
hot_disk0~16int32Number of hot spares for RAID disks
sub_disk_listarrayThe hard disk ID for building a RAID disk
rebuild_buttonRebuild RAIDint32The display operation reconstructs the current RAID disk button, and an empty string indicates that it does not need to be displayed
taskobjectTask Object,Refer to Table 4 for detailed information

Table 4

Task Object

ParameterRangeTypeDescription
statusNone
Rebuild
Sync
stringRAID disk operation progress, no operation progress, rebuilding RAID (taking very long hours, 3 days or more), synchronizing data
progress0~100int32Percentage of operation progress

Table 5

About Raid Info Object

ParameterRangeTypeDescription
max_raid_num0~16int32Support the number of RAID disks to be formed
raid_typeint32List of types that support building RAID
hotdisk_typePublic HotDiskstringThere is currently only one type of hot spare supported
support_rebuildNo
Yes
intDoes it support reconstruction operations

Table 6

Create Raid Object

ParameterRangeTypeDescription
itemOneKeyCreate
CreateRaid
DeleteRaid
AddHotDisk
RemoveHotDisk
Rebuild
stringSupported Actions
raid_typeRAID0
RAID1
RAID4
RAID5
RAID6
RAID10
stringSupported RAID types for creation
disk_infoarrayA hard disk that can be used to form RAID, Ctrl Disk Info Object, see Table 7 for detailed information

Table 7

Task Object

ParameterRangeTypeDescription
id0~16int32The ID of the hard drive
serial_nomax_length:20stringThe serial number of the hard drive
checkboolCheck the hard drive used to build RAID

Table 8

Ctrl Info Object

ParameterRangeTypeDescription
itemOneKeyCreate
CreateRaid
DeleteRaid
AddHotDisk
RemoveHotDisk
Rebuild
sringName of the RAID disk to be built

Table 9

ParameterRangeTypeDescription
ctrlOneKeyCreate
CreateRaid
DeleteRaid
AddHotDisk
RemoveHotDisk
Rebuild
stringCommand for operation (corresponding to JSON when the parameter is get, fill in and modify the parameters and return it)

Tips:

The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "disk_info": {
            "type": "object",
            "items": {
                "No": {
                    "type": "int32",
                    "min": 0,
                    "max": 16
                },
                "enable": {
                    "type": "bool"
                },
                "check": {
                    "type": "bool"
                },
                "id": {
                    "type": "int32",
                    "min": 0,
                    "max": 16
                },
                "disk_model": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 40
                },
                "serial_no": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 20
                },
                "total_size": {
                    "type": "int32",
                    "unit": "GB",
                    "min": 0,
                    "max": 2147483647
                },
                "array_name": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 32
                },
                "disk_type": {
                    "type": "string",
                    "items": [
                        "Normal Disk",
                        "HotDisk",
                        "Raid Disk"
                    ]
                },
                "button_type": {
                    "type": "string",
                    "items": [
                        "",
                        "Add HotDisk",
                        "Remove HotDisk"
                    ]
                },
                "slot_no": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 8
                }
            }
        },
        "raid_info": {
            "type": "object",
            "items": {
                "No": {
                    "type": "int32",
                    "min": 0,
                    "max": 16
                },
                "check": {
                    "type": "bool"
                },
                "raid_id": {
                    "type": "int32",
                    "min": 0,
                    "max": 16
                },
                "raid_name": {
                    "type": "string",
                    "min_len": 1,
                    "max_len": 24
                },
                "raid_type": {
                    "type": "string",
                    "items": [
                        "RAID0",
                        "RAID1",
                        "RAID5",
                        "RAID6",
                        "RAID10"
                    ]
                },
                "total_size": {
                    "type": "int32",
                    "min": 0,
                    "max": 2147483647
                },
                "raid_status": {
                    "type": "string",
                    "items": [
                        "Normal",
                        "Degrade",
                        "Offline"
                    ]
                },
                "hot_disk": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 16
                },
                "sub_disk_list": {
                    "type": "array",
                    "min_size": 0,
                    "max_size": 16,
                    "items": [

                    ]
                },
                "rebuild_button": {
                    "type": "string",
                    "items": [
                        "",
                        "Rebuild RAID"
                    ]
                },
                "task": {
                    "type": "object",
                    "items": {
                        "status": {
                            "type": "string",
                            "items": [
                                "None",
                                "Rebuild",
                                "Sync"
                            ]
                        },
                        "progress": {
                            "type": "int32",
                            "min": 0,
                            "max": 100
                        }
                    }
                }
            }
        },
        "about_raid_info": {
            "type": "object",
            "items": {
                "max_raid_num": {
                    "type": "int32",
                    "min": 0,
                    "max": 16
                },
                "raid_type": {
                    "type": "object",
                    "items": {

                    }
                },
                "hotdisk_type": {
                    "type": "string",
                    "items": [
                        "Global Hot Spare Disk"
                    ]
                },
                "support_rebuild": {
                    "type": "string",
                    "items": [
                        "Not supported",
                        "Supported"
                    ]
                }
            }
        },
        "create_raid": {
            "type": "object",
            "items": {
                "raid_name": {
                    "type": "string",
                    "min_len": 1,
                    "max_len": 24
                },
                "raid_type": {
                    "type": "string",
                    "items": [
                        "RAID0",
                        "RAID1",
                        "RAID5",
                        "RAID6",
                        "RAID10"
                    ]
                },
                "slot_no": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 8
                },
                "enable": {
                    "type": "bool"
                },
                "disk_info": {
                    "type": "array",
                    "size": 0,
                    "items": [

                    ]
                }
            }
        },
        "ctrl": {
            "type": "string",
            "items": [
                "OneKeyCreate",
                "CreateRaid",
                "DeleteRaid",
                "AddHotDisk",
                "RemoveHotDisk",
                "Rebuild"
            ]
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.