Skip to content

OSPF ​

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

OperationMethodSummary
getOspfDeviceGETGet Ospf Device list
getGridOspfInterfaceGETGet Ospf Interface list
createOspfInterfacePOSTCreate Ospf Interface
modifyOspfInterfacePUTModify Ospf Interface
batchDeleteOspfInterfacePOSTBatch Delete Ospf Interface
getGridOspfProcessGETGet Ospf Process list
createOspfProcessPOSTCreate Ospf Process
modifyOspfProcessPUTModify Ospf Process
batchDeleteOspfProcessPOSTBatch Delete Ospf Process
deleteOspfInterfaceDELETEDelete Ospf Interface
deleteOspfProcessDELETEDelete Ospf Process
getStackVlanIfGETGet Stack Vlan Interface list for OSPF
getOswVlanIfGETGet Switch Vlan Interface list for OSPF

getOspfDevice ​

GET /openapi/v1/{omadacId}/sites/{siteId}/ospf/device

Get Ospf Device list

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

Get Ospf Device list.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device Manager View Only

getGridOspfInterface ​

GET /openapi/v1/{omadacId}/sites/{siteId}/ospf/interface

Get Ospf Interface 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)
json
// omada_call_operation
{
  "operationId": "getGridOspfInterface",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get Ospf Interface list.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device Manager View Only

createOspfInterface ​

POST /openapi/v1/{omadacId}/sites/{siteId}/ospf/interface

Create Ospf Interface

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

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

FieldTypeRequiredDescription
deviceNamestringyesDevice Name
macstringyesDevice Mac
typeintegernoOSPF Interface type, 0: VLAN interface; 1: Loopback interface. If null, defaults to VLAN interface (0).
vlanInterfaceIdstringnoVlan Interface ID. Not Null when type is 0.
vlanInterfaceNamestringnoVlan Interface Name. Not Null when type is 0.
vlanIdintegernoVlan ID should be within the range of 1–4094. Not Null when type is 0.
loopbackInterfaceIdstringnoLoopback Interface ID. Not Null when type is 1.
loopbackIdintegernoLoopback ID should be within the range of 1-64. Not Null when type is 1.
costintegeryesThe link cost. OSPF uses this value in computing shortest paths. It should be within the range of 1–65535.
networkTypeintegernoNetwork Type. Not Null when type is 0. It should be a value as follows: 0: Broadcast, 1: Non-Broadcast, 2: Point-to-Multipoint, 3: Point-to-Point. The default network type for Ethernet interfaces is broadcast.
passiveEnablebooleannoenable passive interface.
helloIntervalintegernoThe hello interval for the specified interface in seconds. Not Null when type is 0. This parameter must be the same for all routers attached to a network. It should be within the range of 1-65535 seconds and the default is 10 seconds.
deadIntervalintegernoThe dead interval for the specified interface in seconds. This specifies how long a router will wait to see a neighbor router's Hello packets before declaring that the router is down. This parameter must be the same for all routers attached to a network. It should be within the range of 1-65535 seconds and the default is 40.
authenticationTypeintegernoAuthentication Type. Not Null when type is 0. It should be a value as follows: 0: None, 1: Simple, 2: MD5.
simpleKeystringnoDisplays the key used for simple authentication, its value should be within the range of 1-8.
md5KeyIdintegernoDisplays the key ID used for md5 authentication, its value should be within the range of 1-255.
md5KeystringnoDisplays the key used for md5 authentication, its value should be within the range of 1-16.
json
// omada_call_operation
{
  "operationId": "createOspfInterface",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create Ospf Interface.
The interface requires one of the permissions:
Site Settings Manager 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):
-39700 - Switch does not exist
-43904 - The interface ID already exists.
-43916 - The device does not support OSPF.
-43917 - The device does not support loopback interface.
-43921 - The Dead Interval cannot be smaller than or equal to the Hello Interval.

modifyOspfInterface ​

PUT /openapi/v1/{omadacId}/sites/{siteId}/ospf/interface/{ospfInterfaceId}

Modify Ospf Interface

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

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

FieldTypeRequiredDescription
deviceNamestringyesDevice Name
macstringyesDevice Mac
typeintegernoOSPF Interface type, 0: VLAN interface; 1: Loopback interface. If null, defaults to VLAN interface (0).
vlanInterfaceIdstringnoVlan Interface ID. Not Null when type is 0.
vlanInterfaceNamestringnoVlan Interface Name. Not Null when type is 0.
vlanIdintegernoVlan ID should be within the range of 1–4094. Not Null when type is 0.
loopbackInterfaceIdstringnoLoopback Interface ID. Not Null when type is 1.
loopbackIdintegernoLoopback ID should be within the range of 1-64. Not Null when type is 1.
costintegeryesThe link cost. OSPF uses this value in computing shortest paths. It should be within the range of 1–65535.
networkTypeintegernoNetwork Type. Not Null when type is 0. It should be a value as follows: 0: Broadcast, 1: Non-Broadcast, 2: Point-to-Multipoint, 3: Point-to-Point. The default network type for Ethernet interfaces is broadcast.
passiveEnablebooleannoenable passive interface.
helloIntervalintegernoThe hello interval for the specified interface in seconds. Not Null when type is 0. This parameter must be the same for all routers attached to a network. It should be within the range of 1-65535 seconds and the default is 10 seconds.
deadIntervalintegernoThe dead interval for the specified interface in seconds. This specifies how long a router will wait to see a neighbor router's Hello packets before declaring that the router is down. This parameter must be the same for all routers attached to a network. It should be within the range of 1-65535 seconds and the default is 40.
authenticationTypeintegernoAuthentication Type. Not Null when type is 0. It should be a value as follows: 0: None, 1: Simple, 2: MD5.
simpleKeystringnoDisplays the key used for simple authentication, its value should be within the range of 1-8.
md5KeyIdintegernoDisplays the key ID used for md5 authentication, its value should be within the range of 1-255.
md5KeystringnoDisplays the key used for md5 authentication, its value should be within the range of 1-16.
json
// omada_call_operation
{
  "operationId": "modifyOspfInterface",
  "params": {
    "siteId": "<siteId>",
    "ospfInterfaceId": "<ospfInterfaceId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify Ospf Interface.
The interface requires one of the permissions:
Site Settings Manager 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):
-39700 - Switch does not exist
-43904 - The interface ID already exists.
-43905 - OSPF Interface does not exist.
-43914 - The device name cannot be changed.
-43916 - The device does not support OSPF.
-43917 - The device does not support loopback interface.
-43921 - The Dead Interval cannot be smaller than or equal to the Hello Interval.

batchDeleteOspfInterface ​

POST /openapi/v1/{omadacId}/sites/{siteId}/ospf/interface/batch-delete

Batch Delete Ospf Interface

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

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

FieldTypeRequiredDescription
interfaceIdListarray<string>yesList of Interface ID
selectTypeintegeryesSelect Type, it should be a value as follows: 1: SELECT ALL, 2: SELECT INCLUDE, 3: SELECT EXCLUDE.
searchKeystringnoSearchKey
json
// omada_call_operation
{
  "operationId": "batchDeleteOspfInterface",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Batch Delete Ospf Interface.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify

getGridOspfProcess ​

GET /openapi/v1/{omadacId}/sites/{siteId}/ospf/process

Get Ospf Process 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)
json
// omada_call_operation
{
  "operationId": "getGridOspfProcess",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get Ospf Process list.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device Manager View Only

createOspfProcess ​

POST /openapi/v1/{omadacId}/sites/{siteId}/ospf/process

Create Ospf Process

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

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

FieldTypeRequiredDescription
deviceNamestringyesThe name of the device
macstringyesDevice Mac
processIdintegeryesProcess ID should be within the range of 1-65535.
routerModeintegeryesRouterMode, its value should be a value as follows: 0: AUTO, 1: MANUAL.
routerIdstringnoRouter ID
staticEnablebooleanyesStatic routing protocol switch
staticMetricintegernoSet the metric value to be used as the metric of redistributed routes. It should be within the range of 1-16777214 and the default is equal to Default Metric configured on Basic page.
staticMetricTypeintegernoSet the OSPF metric type of redistributed routes. It should be a value as follows: 1: External Type 1, 2: External Type 2. The default is External Type 2.
connectedEnablebooleanyesDirect connection routing protocol switch
connectedMetricintegernoSet the metric value to be used as the metric of redistributed routes. It should be within the range of 1-16777214 and the default is equal to Default Metric configured on Basic page.
connectedMetricTypeintegernoSet the OSPF metric type of redistributed routes. It should be a value as follows: 1: External Type 1, 2: External Type 2. The default is External Type 2.
autoCostEnablebooleannoenable Auto-Cost Reference Bandwidth.
autoCostintegernoAuto-Cost Reference Bandwidth.
vrfIdstringnoVRF ID.
areaListarray<OspfProcessAreaOpenApiVO>noUp to 16 entries are allowed for the areaList.
json
// omada_call_operation
{
  "operationId": "createOspfProcess",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create Ospf Process.
The interface requires one of the permissions:
Site Settings Manager 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):
-39700 - Switch does not exist
-43900 - The number of device OSPF Process has reached the upper limit.
-43901 - The process ID already exists.
-43912 - The OSPF process has duplicate networks.
-43913 - The OSPF process router ID is invalid.
-43915 - The OSPF process has invalid network IP.
-43916 - The device does not support OSPF.
-43918 - The OSPF process area type is invalid.
-43920 - The area ID cannot be duplicated.

modifyOspfProcess ​

PUT /openapi/v1/{omadacId}/sites/{siteId}/ospf/process/{ospfProcessId}

Modify Ospf Process

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

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

FieldTypeRequiredDescription
deviceNamestringyesThe name of the device
macstringyesDevice Mac
processIdintegeryesProcess ID should be within the range of 1-65535.
routerModeintegeryesRouterMode, its value should be a value as follows: 0: AUTO, 1: MANUAL.
routerIdstringnoRouter ID
staticEnablebooleanyesStatic routing protocol switch
staticMetricintegernoSet the metric value to be used as the metric of redistributed routes. It should be within the range of 1-16777214 and the default is equal to Default Metric configured on Basic page.
staticMetricTypeintegernoSet the OSPF metric type of redistributed routes. It should be a value as follows: 1: External Type 1, 2: External Type 2. The default is External Type 2.
connectedEnablebooleanyesDirect connection routing protocol switch
connectedMetricintegernoSet the metric value to be used as the metric of redistributed routes. It should be within the range of 1-16777214 and the default is equal to Default Metric configured on Basic page.
connectedMetricTypeintegernoSet the OSPF metric type of redistributed routes. It should be a value as follows: 1: External Type 1, 2: External Type 2. The default is External Type 2.
autoCostEnablebooleannoenable Auto-Cost Reference Bandwidth.
autoCostintegernoAuto-Cost Reference Bandwidth.
vrfIdstringnoVRF ID.
areaListarray<OspfProcessAreaOpenApiVO>noUp to 16 entries are allowed for the areaList.
json
// omada_call_operation
{
  "operationId": "modifyOspfProcess",
  "params": {
    "siteId": "<siteId>",
    "ospfProcessId": "<ospfProcessId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify Ospf Process.
The interface requires one of the permissions:
Site Settings Manager 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):
-39700 - Switch does not exist
-43902 - OSPF Process does not exist.
-43912 - The OSPF process has duplicate networks.
-43913 - The OSPF process router ID is invalid.
-43914 - The device name cannot be changed.
-43915 - The OSPF process has invalid network IP.
-43916 - The device does not support OSPF.
-43918 - The OSPF process area type is invalid.
-43919 - The process ID cannot be modified.
-43920 - The area ID cannot be duplicated.

batchDeleteOspfProcess ​

POST /openapi/v1/{omadacId}/sites/{siteId}/ospf/process/batch-delete

Batch Delete Ospf Process

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

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

FieldTypeRequiredDescription
processIdListarray<string>yesList of Process ID
selectTypeintegeryesSelect Type, it should be a value as follows: 1: SELECT ALL, 2: SELECT INCLUDE, 3: SELECT EXCLUDE.
searchKeystringnoSearchKey
json
// omada_call_operation
{
  "operationId": "batchDeleteOspfProcess",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Batch Delete Ospf Process.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify

deleteOspfInterface ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/switches/{switchMac}/interface/{ospfInterfaceId}

Delete Ospf Interface

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
switchMacpathstringyesSwitch MAC address, like AA-BB-CC-DD-EE-FF
ospfInterfaceIdpathstringyesOspf Interface ID
json
// omada_call_operation
{
  "operationId": "deleteOspfInterface",
  "params": {
    "siteId": "<siteId>",
    "switchMac": "<switchMac>",
    "ospfInterfaceId": "<ospfInterfaceId>"
  }
}
Details, permissions and error codes

Delete Ospf Interface.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify

deleteOspfProcess ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/switches/{switchMac}/process/{ospfProcessId}

Delete Ospf Process

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
switchMacpathstringyesSwitch MAC address, like AA-BB-CC-DD-EE-FF
ospfProcessIdpathstringyesOspf Process ID
json
// omada_call_operation
{
  "operationId": "deleteOspfProcess",
  "params": {
    "siteId": "<siteId>",
    "switchMac": "<switchMac>",
    "ospfProcessId": "<ospfProcessId>"
  }
}
Details, permissions and error codes

Delete Ospf Process.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify

getStackVlanIf ​

GET /openapi/v1/{omadacId}/sites/{siteId}/vlan-interface/stack/{stackId}

Get Stack Vlan Interface list for OSPF

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

Get Stack Vlan Interface list for OSPF.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device Manager View Only

getOswVlanIf ​

GET /openapi/v1/{omadacId}/sites/{siteId}/vlan-interface/switches/{switchMac}

Get Switch Vlan Interface list for OSPF

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
switchMacpathstringyesSwitch MAC address, like AA-BB-CC-DD-EE-FF
json
// omada_call_operation
{
  "operationId": "getOswVlanIf",
  "params": {
    "siteId": "<siteId>",
    "switchMac": "<switchMac>"
  }
}
Details, permissions and error codes

Get Switch Vlan Interface list for OSPF.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device Manager View Only

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