Skip to main content
Skip table of contents

View DHCP pool

View DHCP pool

View DHCP pool within a group

GET /api/admin/v1/dhcp-subnets/{subnet}

Method parameters

int subnet, unique identifier of the DHCP pool

200 OK

Successful response

JSON
{
    "id": 1807,
    "subnet": "192.168.204.0/24",
    "relay": "[\"192.168.204.1\"]",
    "option_routers": "192.168.204.1",
    "pools": [
        {
            "id": 1862,
            "start_address": "192.168.204.240",
            "end_address": "192.168.204.253"
        }
    ],
    "dhcp_subnet_group": {
        "id": 65,
        "title": "Group"
    }
}

401 Unauthorized

Authorization token is not provided or is invalid. Obtaining a token

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/dhcp-subnets/{subnet}' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "subnet": 0
}'
PHP
PHP
$data = array (
  'subnet' => 0,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/dhcp-subnets/{subnet}', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.