Skip to content

DHCP Reservation ​

11 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).

OperationMethodSummary
getDhcpReservationGridGETGet DHCP reservation list
createDhcpReservationPOSTCreate a new DHCP reservation
deleteDhcpReservationDELETEDelete an exist DHCP reservation
modifyDhcpReservationPATCHModify an exist DHCP reservation
exportDhcpReservationPOSTExport DHCP reservation to IP_MAC Binding
getGridAllDhcpUserListGETGet the dhcp user list of all servers
reservationFromDhcpUserListPOSTReservation From Dhcp User List
batchExportDhcpReservationListToFilePOSTBatch Export DHCP reservation list to file
exportDhcpReservationListToFileGETExport DHCP reservation list to file
importDhcpReservationListFromFilePOSTImport DHCP reservation list from file
downloadDhcpImportResultGETDownload DHCP import result

getDhcpReservationGrid ​

GET /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dhcp

Get DHCP reservation list

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
sorts.macquerystringnoSort 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.ipquerystringnoSort 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.netNamequerystringnoSort 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.descriptionquerystringnoSort 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.statusquerystringnoSort 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
searchKeyquerystringnoFuzzy query parameters, support field : mac, ip, description.
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema CreateDhcpReservationOpenApiVO

FieldTypeRequiredDescription
netIdstringyesThis 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
macstringyesDevice MAC address, format: AA-BB-CC-11-22-33
ipstringnoReserved IP address
optionsarray<custom DHCP Options>noAdvanced DHCP options
descriptionstringnoDescription of DHCP reservation. Description should contain 1 to 128 characters
statusbooleanyesDHCP reservation enable status
confirmConflictbooleannoTrue when creating an entry with IP and IP-MAC Binding conflicts confirmed
serverTypestringnoDhcp Server Device Type
serverMacstringnoDhcp Server Device Mac
serverStackIdstringnoDhcp Server Stack ID
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
macpathstringyesMAC address of the DHCP reservation, format: AA-BB-CC-11-22-33.
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
macpathstringyesMAC address of the DHCP reservation, format: AA-BB-CC-11-22-33.

Request body — application/json (required) — schema CreateDhcpReservationOpenApiVO

FieldTypeRequiredDescription
netIdstringyesThis 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
macstringyesDevice MAC address, format: AA-BB-CC-11-22-33
ipstringnoReserved IP address
optionsarray<custom DHCP Options>noAdvanced DHCP options
descriptionstringnoDescription of DHCP reservation. Description should contain 1 to 128 characters
statusbooleanyesDHCP reservation enable status
confirmConflictbooleannoTrue when creating an entry with IP and IP-MAC Binding conflicts confirmed
serverTypestringnoDhcp Server Device Type
serverMacstringnoDhcp Server Device Mac
serverStackIdstringnoDhcp Server Stack ID
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
macpathstringyesDHCP MAC address

Request body — application/json (required) — schema ExportDhcpReservationOpenApiVO

FieldTypeRequiredDescription
interfaceIdstringyesThis 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
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema DhcpUserFilterVO

FieldTypeRequiredDescription
selectMacsBatchSelectMacsVOyes(BatchSelectMacsVO not expanded; call omada_get_schema "BatchSelectMacsVO")
selectIpsarray<string>yesSelected Ips
netIdstringnoLan Network IDs
serverMacstringnoDhcp Server Macs
serverStackIdstringnoDhcp Server StackIds
typestringnoFilter Type of Dhcp User: "device", "client" or "device, client"
searchKeystringnoSearch Key
sortsobjectnoSort rule, key: sort field, value: sort direction, value parameter may be one of asc or desc.
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema DhcpReservationFilterVO

FieldTypeRequiredDescription
selectMacsBatchSelectMacsVOyes(BatchSelectMacsVO not expanded; call omada_get_schema "BatchSelectMacsVO")
sortMapobjectnoSort Direction. The keys that can be sorted are:mac, ip, net_name, description, status, clientName, name, value is asc or desc
netIdstringnoLan Network IDs
typestringnoDevice types for which IP is reserved
searchKeystringnoSearch Key
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (optional)

FieldTypeRequiredDescription
filestring (binary)noDHCP reservation file.
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// 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.

Released under the MIT License. Not affiliated with or endorsed by TP-Link.