# Range

## Function

This API is used to get the Format Camera's Storage page parameter range.

## Request Message

None.

Sample:

    POST /API/IPCMaintaint/IPCDisk/Range HTTP/1.1

    {
        "version":"1.0",
        "data":{}
    }

## Response Message

### Parameter Description

##### Table 1

Parameter | Range | Type | Description
--- | --- | --- | ---
channel_info |  | object | For details, see Table 2.
channels_items_datasame |  | object array | An array of objects whose parameters need to be synchronized (cloud-only). For details about the object contents, see Table 4 .

##### Table 2

Parameter | Range | Type | Description
--- | --- | --- | ---
CH1 |  | object | For details, see Table 3.
… |  |  |
IP_CH1 |  |  |
… |  |  |
WIFI_CH1 |  |  |
… |  |  |

##### Table 3

Parameter | Range | Type | Description
--- | --- | --- | ---
status | "NoHdd", "Unformat", "Normal", "Full", "ReadOnly", "HddError", "Connecting", "Offline", "Occupied", "Oversized", "Broken", "Degrade", "Rebuilding", "Backup", "RaidHdd" | string | Status of the storage device.
ip_address | 0 ~ 63 | string |
serial_no | 0 ~ 20 | string |
disk_type | "ReadAndWriteDisk", "RedundantDisk", "ReadOnlyDisk" | string | Disk type.
total_size | 0 ~ 2147483647 | int | Total size.
free_size | 0 ~ 2147483647 | int | Free space size.
total_time | 0 ~ 2147483647 | int | Total recording time.
free_time | 0 ~ 2147483647 | int | Remaining recording duration.
format_enable |  | bool | Whether it can be formatted.

##### Table 4

Parameter | Range | Type | Description
--- | --- | --- | ---
datasame_channels | 0-Maximum number of channels | string array | Channel group that needs to synchronize parameters (cloud only)
datasame_items | 0-Maximum number of channels | string array | Parameter fields that need to be synchronized (cloud only)

Sample:

    HTTP/1.1 200 OK
    Content-Type: application/json

    {
        "result": "success",
        "data": {
            "channel_max": 32,
            "channels_items_datasame": {
                "type": "array",
                "min_size": 0,
                "max_size": 32,
                "items": [
                    {
                        "datasame_items": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 32,
                            "items": {
                                "type": "string",
                                "items": ["channel_select"]
                            }
                        },
                        "datasame_channels": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 32,
                            "items": {
                                "type": "string",
                                "items": ["CH1"]
                            }
                        }
                    },
                    {
                        "datasame_items": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 32,
                            "items": {
                                "type": "string",
                                "items": ["channel_select"]
                            }
                        },
                        "datasame_channels": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 32,
                            "items": {
                                "type": "string",
                                "items": ["CH3"]
                            }
                        }
                    }
                ]
            },
            "channel_info": {
                "type": "object",
                "items": {
                    "CH1": {
                        "type": "object",
                        "items": {
                            "status": {
                                "type": "string",
                                "items": [
                                    "NoHdd",
                                    "Unformat",
                                    "Normal",
                                    "Full",
                                    "ReadOnly",
                                    "HddError",
                                    "Connecting",
                                    "Offline",
                                    "Occupied",
                                    "Oversized",
                                    "Broken",
                                    "Degrade",
                                    "Rebuilding",
                                    "Backup",
                                    "RaidHdd"
                                ]
                            },
                            "ip_address": {
                                "type": "string",
                                "min_len": 0,
                                "max_len": 63
                            },
                            "serial_no": {
                                "type": "string",
                                "min_len": 0,
                                "max_len": 20
                            },
                            "disk_type": {
                                "type": "string",
                                "items": [
                                    "ReadAndWriteDisk",
                                    "RedundantDisk",
                                    "ReadOnlyDisk"
                                ]
                            },
                            "total_size": {
                                "type": "int32",
                                "min": 0,
                                "max": 2147483647
                            },
                            "free_size": {
                                "type": "int32",
                                "min": 0,
                                "max": 2147483647
                            },
                            "total_time": {
                                "type": "int32",
                                "min": 0,
                                "max": 2147483647
                            },
                            "free_time": {
                                "type": "int32",
                                "min": 0,
                                "max": 2147483647
                            },
                            "format_enable": {"type": "bool"}
                        }
                    }
                }
            }
        }
    }

## Error Code

See Response Messages Body and Common error_code for more information.