Skip to content

Network Analyze ​

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

OperationMethodSummary
downloadCaptureFilePOSTDownload package capture file
getAllCaptureDevicesGETGet devices that can capture packages
queryPackageCaptureStatusGETQuery package capture status
getDeviceInterfacesGETGet device interfaces
startPackageCapturePOSTStart package capturing
stopPackageCaptureGETStop package capturing
getLastCaptureDeviceGETGet last capture device

downloadCaptureFile ​

POST /openapi/v1/{omadacId}/files/sites/{siteId}/capture/device-type/{deviceType}/{deviceMac}/download

Download package capture file

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceTypepathstringyesDevice type, and should be a value in [ap, switch, gateway].
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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

FieldTypeRequiredDescription
requestIdstringyesA GUID based on the timestamp.
stackbooleannoParameter [stack] indicates whether the device supports stacking.
json
// omada_call_operation
{
  "operationId": "downloadCaptureFile",
  "params": {
    "siteId": "<siteId>",
    "deviceType": "<deviceType>",
    "deviceMac": "<deviceMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Download package capture file.
The interface requires one of the permissions:
Site Tools 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.

getAllCaptureDevices ​

GET /openapi/v1/{omadacId}/sites/{siteId}/capture/all-devices/device-type/{deviceType}

Get devices that can capture packages

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceTypepathstringyesDevice type, and should be a value in [ap, switch, gateway].
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": "getAllCaptureDevices",
  "params": {
    "siteId": "<siteId>",
    "deviceType": "<deviceType>"
  }
}
Details, permissions and error codes

Get the grid of devices that can capture packages.
The interface requires one of the permissions:
Site Tools 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):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

queryPackageCaptureStatus ​

GET /openapi/v1/{omadacId}/sites/{siteId}/capture/device-type/{deviceType}/{deviceMac}/{requestId}/status

Query package capture status

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceTypepathstringyesDevice type, and should be a value in [ap, switch, gateway].
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
requestIdpathstringyesA GUID based on the timestamp.
json
// omada_call_operation
{
  "operationId": "queryPackageCaptureStatus",
  "params": {
    "siteId": "<siteId>",
    "deviceType": "<deviceType>",
    "deviceMac": "<deviceMac>",
    "requestId": "<requestId>"
  }
}
Details, permissions and error codes

Query package capture status.
The interface requires one of the permissions:
Site Tools 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):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

getDeviceInterfaces ​

GET /openapi/v1/{omadacId}/sites/{siteId}/capture/device-type/{deviceType}/{deviceMac}/interfaces

Get device interfaces

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceTypepathstringyesDevice type, and should be a value in [ap, switch, gateway].
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
json
// omada_call_operation
{
  "operationId": "getDeviceInterfaces",
  "params": {
    "siteId": "<siteId>",
    "deviceType": "<deviceType>",
    "deviceMac": "<deviceMac>"
  }
}
Details, permissions and error codes

Get device interfaces.
The interface requires one of the permissions:
Site Tools 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):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

startPackageCapture ​

POST /openapi/v1/{omadacId}/sites/{siteId}/capture/device-type/{deviceType}/{deviceMac}/start

Start package capturing

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceTypepathstringyesDevice type, and should be a value in [ap, switch, gateway].
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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

FieldTypeRequiredDescription
durationintegernoPacket capture duration, in seconds.
interfaceTypeintegernoInterface type. 0: Wired; 1: Wireless; 2: LAN Network.
singlePackageSizeintegernoSingle package size, in bytes.
channelintegerno(Wireless) 0: 2.4GHz 1: 5GHz-1 2:5GHz-2 3: 6GHz
interfaceNamestringnoInterface name.
interfaceIdstringnoInterface ID, for example: if interfaceType is network, interfaceId should be 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.
filterRulesstringnoFilter rules.
captureModeintegernoCapture mode. 0: Local packet capture; 1: Flow-mode packet capture.
arChannelintegernoChannel.
otaFilterRulesstringnoFilter rules of air interface packet capture.
srcMacintegernoSource L4 port of the packet.
destMacstringnoDestination MAC address of the packet.
destPortintegernoDestination L4 port of the packet.
srcIpstringnoIP address of the message sender.
destIpstringnoDestination IP address of the packet.
protocolintegernoPacket type/protocol. It's required when a Switch captures packets.
stackbooleannoWhether the device supports stacking.
unitintegernoEquipment unit ID.
json
// omada_call_operation
{
  "operationId": "startPackageCapture",
  "params": {
    "siteId": "<siteId>",
    "deviceType": "<deviceType>",
    "deviceMac": "<deviceMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Start package capturing.
The interface requires one of the permissions:
Site Tools 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.

stopPackageCapture ​

GET /openapi/v1/{omadacId}/sites/{siteId}/capture/device-type/{deviceType}/{deviceMac}/stop

Stop package capturing

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceTypepathstringyesDevice type, and should be a value in [ap, switch, gateway].
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
json
// omada_call_operation
{
  "operationId": "stopPackageCapture",
  "params": {
    "siteId": "<siteId>",
    "deviceType": "<deviceType>",
    "deviceMac": "<deviceMac>"
  }
}
Details, permissions and error codes

Stop package capturing.
The interface requires one of the permissions:
Site Tools 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.

getLastCaptureDevice ​

GET /openapi/v1/{omadacId}/sites/{siteId}/capture/lastDevice

Get last capture device

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "getLastCaptureDevice",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get last capture device.
The interface requires one of the permissions:
Site Tools 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):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

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