DHCP Reservation
11 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| getDhcpReservationGrid | GET | Get DHCP reservation list |
| createDhcpReservation | POST | Create a new DHCP reservation |
| deleteDhcpReservation | DELETE | Delete an exist DHCP reservation |
| modifyDhcpReservation | PATCH | Modify an exist DHCP reservation |
| exportDhcpReservation | POST | Export DHCP reservation to IP_MAC Binding |
| getGridAllDhcpUserList | GET | Get the dhcp user list of all servers |
| reservationFromDhcpUserList | POST | Reservation From Dhcp User List |
| batchExportDhcpReservationListToFile | POST | Batch Export DHCP reservation list to file |
| exportDhcpReservationListToFile | GET | Export DHCP reservation list to file |
| importDhcpReservationListFromFile | POST | Import DHCP reservation list from file |
| downloadDhcpImportResult | GET | Download DHCP import result |
getDhcpReservationGrid
GET /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dhcp
Get DHCP reservation list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
page | query | integer | no | Start page number. Start from 1. (default 1) |
pageSize | query | integer | no | Number of entries per page. It should be within the range of 1–1000. (default 100) |
sorts.mac | query | string | no | Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect |
sorts.ip | query | string | no | Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect |
sorts.netName | query | string | no | Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect |
sorts.description | query | string | no | Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect |
sorts.status | query | string | no | Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect |
searchKey | query | string | no | Fuzzy query parameters, support field : mac, ip, description. |
// omada_call_operation
{
"operationId": "getDhcpReservationGrid",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get DHCP reservation list of the site with the given omadacId and siteId.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
createDhcpReservation
POST /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dhcp
Create a new DHCP reservation
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (required) — schema CreateDhcpReservationOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
netId | string | yes | This field represents LAN Network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface |
mac | string | yes | Device MAC address, format: AA-BB-CC-11-22-33 |
ip | string | no | Reserved IP address |
options | array<custom DHCP Options> | no | Advanced DHCP options |
description | string | no | Description of DHCP reservation. Description should contain 1 to 128 characters |
status | boolean | yes | DHCP reservation enable status |
confirmConflict | boolean | no | True when creating an entry with IP and IP-MAC Binding conflicts confirmed |
serverType | string | no | Dhcp Server Device Type |
serverMac | string | no | Dhcp Server Device Mac |
serverStackId | string | no | Dhcp Server Stack ID |
// omada_call_operation
{
"operationId": "createDhcpReservation",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Create a new DHCP reservation with the given params.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-33503 - This network does not exist.
-34511 - The number of DHCP Reservation entries has reached the limit.
-34512 - Invalid network. Please select a network with the purpose selected as Interface.
-34513 - Enter an IP address within the Network IP range.
-34514 - This IP address conflicts with an existing DHCP Reservation entry.
-34515 - This MAC address conflicts with an existing DHCP Reservation entry.
-34520 - The LAN network in this entry does not exist, please reconfigure the DHCP reservation entry.
-34522 - This IP address of DHCP Reservation conflicts with a reserved static IP-MAC binding.
-34543 - The IP cannot be the same as the LAN network IP.
deleteDhcpReservation
DELETE /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dhcp/{mac}
Delete an exist DHCP reservation
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
mac | path | string | yes | MAC address of the DHCP reservation, format: AA-BB-CC-11-22-33. |
// omada_call_operation
{
"operationId": "deleteDhcpReservation",
"params": {
"siteId": "<siteId>",
"mac": "<mac>"
}
}Details, permissions and error codes
Delete an exist DHCP reservation with the given params.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
modifyDhcpReservation
PATCH /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dhcp/{mac}
Modify an exist DHCP reservation
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
mac | path | string | yes | MAC address of the DHCP reservation, format: AA-BB-CC-11-22-33. |
Request body — application/json (required) — schema CreateDhcpReservationOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
netId | string | yes | This field represents LAN Network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface |
mac | string | yes | Device MAC address, format: AA-BB-CC-11-22-33 |
ip | string | no | Reserved IP address |
options | array<custom DHCP Options> | no | Advanced DHCP options |
description | string | no | Description of DHCP reservation. Description should contain 1 to 128 characters |
status | boolean | yes | DHCP reservation enable status |
confirmConflict | boolean | no | True when creating an entry with IP and IP-MAC Binding conflicts confirmed |
serverType | string | no | Dhcp Server Device Type |
serverMac | string | no | Dhcp Server Device Mac |
serverStackId | string | no | Dhcp Server Stack ID |
// omada_call_operation
{
"operationId": "modifyDhcpReservation",
"params": {
"siteId": "<siteId>",
"mac": "<mac>"
},
"body": "{...}"
}Details, permissions and error codes
Modify an exist DHCP reservation with the given params.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-33503 - This network does not exist.
-34511 - The number of DHCP Reservation entries has reached the limit.
-34512 - Invalid network. Please select a network with the purpose selected as Interface.
-34513 - Enter an IP address within the Network IP range.
-34514 - This IP address conflicts with an existing DHCP Reservation entry.
-34515 - This MAC address conflicts with an existing DHCP Reservation entry.
-34520 - The LAN network in this entry does not exist, please reconfigure the DHCP reservation entry.
-34522 - This IP address of DHCP Reservation conflicts with a reserved static IP-MAC binding.
-34543 - The IP cannot be the same as the LAN network IP.
exportDhcpReservation
POST /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dhcp/{mac}/export
Export DHCP reservation to IP_MAC Binding
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
mac | path | string | yes | DHCP MAC address |
Request body — application/json (required) — schema ExportDhcpReservationOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
interfaceId | string | yes | This field represents LAN Network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface |
// omada_call_operation
{
"operationId": "exportDhcpReservation",
"params": {
"siteId": "<siteId>",
"mac": "<mac>"
},
"body": "{...}"
}Details, permissions and error codes
Export an exist DHCP reservation to IP_MAC Binding.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-33503 - This network does not exist.
-33621 - The number of IP-MAC Binding entries has reached the limit.
-33623 - The binding IP cannot be the same as the LAN network IP.
-33752 - This IP address already exists.
-33753 - This IP address of IP-MAC binding conflicts with a reserved static DHCP Reservation.
getGridAllDhcpUserList
GET /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dhcp/user-list
Get the dhcp user list of all servers
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
page | query | integer | no | Start page number. Start from 1. (default 1) |
pageSize | query | integer | no | Number of entries per page. It should be within the range of 1–1000. (default 100) |
// omada_call_operation
{
"operationId": "getGridAllDhcpUserList",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get the dhcp user list of all servers.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
reservationFromDhcpUserList
POST /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dhcp/user-list/reservation
Reservation From Dhcp User List
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (required) — schema DhcpUserFilterVO
| Field | Type | Required | Description |
|---|---|---|---|
selectMacs | BatchSelectMacsVO | yes | (BatchSelectMacsVO not expanded; call omada_get_schema "BatchSelectMacsVO") |
selectIps | array<string> | yes | Selected Ips |
netId | string | no | Lan Network IDs |
serverMac | string | no | Dhcp Server Macs |
serverStackId | string | no | Dhcp Server StackIds |
type | string | no | Filter Type of Dhcp User: "device", "client" or "device, client" |
searchKey | string | no | Search Key |
sorts | object | no | Sort rule, key: sort field, value: sort direction, value parameter may be one of asc or desc. |
// omada_call_operation
{
"operationId": "reservationFromDhcpUserList",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Reservation From Dhcp User List.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
batchExportDhcpReservationListToFile
POST /openapi/v1/{omadacId}/sites/{siteId}/setting/service/files/dhcp/batch-export
Batch Export DHCP reservation list to file
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (required) — schema DhcpReservationFilterVO
| Field | Type | Required | Description |
|---|---|---|---|
selectMacs | BatchSelectMacsVO | yes | (BatchSelectMacsVO not expanded; call omada_get_schema "BatchSelectMacsVO") |
sortMap | object | no | Sort Direction. The keys that can be sorted are:mac, ip, net_name, description, status, clientName, name, value is asc or desc |
netId | string | no | Lan Network IDs |
type | string | no | Device types for which IP is reserved |
searchKey | string | no | Search Key |
// omada_call_operation
{
"operationId": "batchExportDhcpReservationListToFile",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Batch Export DHCP reservation list to file.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1005 - Operation forbidden.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
exportDhcpReservationListToFile
GET /openapi/v1/{omadacId}/sites/{siteId}/setting/service/files/dhcp/export
Export DHCP reservation list to file
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
// omada_call_operation
{
"operationId": "exportDhcpReservationListToFile",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Export existed DHCP reservation list to file.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1005 - Operation forbidden.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
importDhcpReservationListFromFile
POST /openapi/v1/{omadacId}/sites/{siteId}/setting/service/files/dhcp/import
Import DHCP reservation list from file
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (optional)
| Field | Type | Required | Description |
|---|---|---|---|
file | string (binary) | no | DHCP reservation file. |
// omada_call_operation
{
"operationId": "importDhcpReservationListFromFile",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Import DHCP reservation list from existed file.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-33712 - This file is empty.
-33713 - Failed to process the files.
-34533 - The uploaded file contains wrong-format content. Please download the error messages, modify your file as required and re-upload it.
-34544 - The format of the import file must be csv.
-34545 - The number of DHCP Reservation entries has reached the limit. The exceeding entries cannot be saved.
downloadDhcpImportResult
GET /openapi/v1/{omadacId}/sites/{siteId}/setting/service/files/dhcp/import-result
Download DHCP import result
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
// omada_call_operation
{
"operationId": "downloadDhcpImportResult",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Download DHCP import result.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-34534 - The error messages file has expired and cannot be downloaded.