OpenAPI EAP modify ports

OpenAPI EAP modify ports

OpenAPI EAP modify ports
OpenAPI EAP modify ports
3 weeks ago - last edited 3 weeks ago
Hardware Version:
Firmware Version: 5.15.24.18

Hello,

 

I have implemented a limited set of functionality using the OpenAPI. My code can log in and successfully call several API methods. So my basic OpenAPI infrastructure is working.

 

The OpenAPI docs indicate that it is possible to modify the ports of an EAP. See:

 

https://use1-omada-northbound.tplinkcloud.com/doc.html#/03%20Device/Ap/modifyApPort

 

Specifically I am trying to use the API to enable/disable the ETH ports on the EAP615-WALL and EAP655-WALL

 

The status and settings of the ETH ports can be retrieved via the "Get AP Port List" API call:

 

https://use1-omada-northbound.tplinkcloud.com/doc.html#/03%20Device/Ap/getApPortList

 

I can successfully call the above methods and get valid results.

 

However when I make an API call to change the status of an ETH port, I get a "Internal Server Error".

 

Here is the debug output of my test code: (Since this is a test env I'm not worried about leaking the secrets in the following snippet.)

 

mdu-wifi-mgt(dev)> oc.disable_ap_ports("98-25-4A-75-C5-5C")
OmadaOpenapi::sey_ap_ports_status(false)
https://172.16.1.194:8043/openapi/v1/50f9c80e0e88fa2b9823de529c3ff6e3/sites/6776ba117f60061acafbe67f/aps/98-25-4A-75-C5-5C/ports
{headers:
  {"Content-Type" => "application/json",
   "accept-encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
   "accept" => "*/*",
   "Authorization" => "AccessToken=AT-DhURBaXKyYhgedRpLLEr8Ufr4VmFA4Hq"},
 verify: false,
 body: "{\"lanPort\":\"ETH1\",\"status\":false}"}
{"timestamp" => 1754790668968,
 "status" => 500,
 "error" => "Internal Server Error",
 "path" => "/openapi/v1/50f9c80e0e88fa2b9823de529c3ff6e3/sites/6776ba117f60061acafbe67f/aps/98-25-4A-75-C5-5C/ports"}

 

So, two questions:

 

1) Is the API call "Modify Ap Port Config" (https://use1-omada-northbound.tplinkcloud.com/doc.html#/03%20Device/Ap/modifyApPort) implemented and functional?

 

2) If yes, am I calling it correctly, ie passing the correct values in the body of the request?

 

Thanks

Mark

 

 

  0      
  0      
#1
Options
1 Accepted Solution
Re:OpenAPI EAP modify ports-Solution
3 weeks ago - last edited 3 weeks ago

Hi  @Solideco 

 

Thank you for your feedback. We are aware of this issue and will fix it in the subsequent Omada Controller. Please stay tuned for the update.

Recommended Solution
  0  
  0  
#3
Options
2 Reply
Re:OpenAPI EAP modify ports
3 weeks ago

Additional info/comments:

 

I'm leaning towards the "Modify Ap Port Config" API method as being non-function or not completely implemented. 

 

After rereading the documentation for the API method (https://use1-omada-northbound.tplinkcloud.com/doc.html#/03%20Device/Ap/modifyApPort) there appears to be a fundamental design problem. Namely, the documentation does not indicate how a port is referenced.

 

The EAP615-Wall and EAP655-Wall devices each have 3 LAN ports. At least on the EAP615-Wall the ports have IDs ETH1, ETH2, and ETH3. By default the portName is the same unless changed.

 

The "Get Ap port list" method returns data about the ports which looks like this:

 

[{"id" => "ETH1",
  "portType" => 0,
  "lanPort" => "ETH1",
  "name" => "ETH1",
  "linkStatus" => 0,
  "linkSpeed" => 0,
  "supportVlan" => true,
  "localVlanEnable" => false,
  "status" => true,
  "supportPoe" => false,
  "poeOutEnable" => false,
  "supportVlanOption" => true,
  "supportVlanTagged" => true,
  "supportStatusEnable" => true,
  "supportStatusInform" => true,
  "uplinkPort" => false,
  "supportBandwidthControl" => false,
  "bandwidthControlEnable" => false,
  "ingressRateLimit" => {"status" => false, "rate" => 0},
  "egressRateLimit" => {"status" => false, "rate" => 0}},
 {"id" => "ETH2",
  "portType" => 0,
  "lanPort" => "ETH2",
  "name" => "ETH2",
  "linkStatus" => 0,
  "linkSpeed" => 0,
  "supportVlan" => true,
  "localVlanEnable" => false,
  "status" => true,
  "supportPoe" => false,
  "poeOutEnable" => false,
  "supportVlanOption" => true,
  "supportVlanTagged" => true,
  "supportStatusEnable" => true,
  "supportStatusInform" => true,
  "taggedNetworkId" => [],
  "untaggedNetworkId" => [],
  "uplinkPort" => false,
  "supportBandwidthControl" => false,
  "bandwidthControlEnable" => false,
  "ingressRateLimit" => {"status" => false, "rate" => 0},
  "egressRateLimit" => {"status" => false, "rate" => 0}},
 {"id" => "ETH3",
  "portType" => 0,
  "lanPort" => "ETH3",
  "name" => "ETH3",
  "linkStatus" => 0,
  "linkSpeed" => 0,
  "supportVlan" => true,
  "localVlanEnable" => false,
  "status" => true,
  "supportPoe" => true,
  "poeOutEnable" => false,
  "supportVlanOption" => true,
  "supportVlanTagged" => true,
  "supportStatusEnable" => true,
  "supportStatusInform" => true,
  "taggedNetworkId" => [],
  "untaggedNetworkId" => [],
  "uplinkPort" => false,
  "supportBandwidthControl" => false,
  "bandwidthControlEnable" => false,
  "ingressRateLimit" => {"status" => false, "rate" => 0},
  "egressRateLimit" => {"status" => false, "rate" => 0}}]

 

The documentation for "Modify Ap Port Config" does not indicate that a "Port Id" is required or even is an optional value. Further, the documentation doesn't even mention "Port Id".

 

Without supporting "Port Id" as a parameter, it is unclear how a specific port can be modified. Presumably, an array for all of the ports could be passed, but each element of the array would still need the "Port ID". Given this, it's hard to see how it is even possible for the "Modify Ap Port Config" method is supposed to function.

 

As an aside, the V2 Web API includes the Port ID in the URL when changing the port configuration. Ex:

 

https://172.16.1.194:8043/50f9c80e0e88fa2b9823de529c3ff6e3/api/v2/sites/6776ba117f60061acafbe67f/eaps/98-25-4A-75-C5-5C/ports/ETH1

 

Payload:

{
  "name": "ETH1",
  "lanPort": "ETH1",
  "status": true,
  "supportVlan": true,
  "supportPoe": false,
  "supportVlanTagged": true,
  "supportStatusEnable": true,
  "supportBandwidthControl": false,
  "localVlanEnable": false
}

 

So, does the OpenAPI method "Modify Ap Port Config" work as documented?

 

Mark

 

 

 

 

 

 

 

 

 

  0  
  0  
#2
Options
Re:OpenAPI EAP modify ports-Solution
3 weeks ago - last edited 3 weeks ago

Hi  @Solideco 

 

Thank you for your feedback. We are aware of this issue and will fix it in the subsequent Omada Controller. Please stay tuned for the update.

Recommended Solution
  0  
  0  
#3
Options