Omada V2 API

Omada V2 API
Omada V2 API
2021-02-21 03:21:27 - last edited 2021-02-21 17:30:08
Model:Adapter
Hardware Version:
Firmware Version:

How does one get info on the V2 API? I see on previous posts it was provided for V1, but nothing on the newest. I am currently running the Omada V4 Controller Software. 

Example - https://community.tp-link.com/en/business/forum/topic/156627

Please advise.

0
0
#1
Options
12 Reply
Re:Omada V2 API
2021-02-22 06:23:18

Dear @sic,

 

How does one get info on the V2 API? I see on previous posts it was provided for V1, but nothing on the newest. I am currently running the Omada V4 Controller Software. 
Example - https://community.tp-link.com/en/business/forum/topic/156627

 

Here is the API for Omada Controller V4.1.5 for your reference.

File:
Omada_SDN_Controller_V4.1.5 API Document.zipDownload
Best Regards!
0
0
#2
Options
Re:Omada V2 API
2021-07-03 20:20:02

@Fae This is great.  But I'm having a couple of issues with the API on v4.4.3 of the controller.

 

  • The path /api/v2/sites/{siteKey}/clients returns an error.  Has this been removed?
  • The path /api/v2/sites/{siteKey}/insight/clients works, but only returns 10 clients.  The JSON shows:
    "currentPage": 1,
    "currentSize": 10,
    • How can the size and page be updated?  It doesn't appear to be covered in the API document.

 

Is there a place that we can find the updated API documentation (this should be published on the site somewhere)?

 

Thanks, the API documentation you provided has been a real help.

0
0
#3
Options
Re:Omada V2 API
2021-07-08 02:44:39

Dear @OneFix,

 

OneFix wrote

  • The path /api/v2/sites/{siteKey}/clients returns an error.  Has this been removed?
  • The path /api/v2/sites/{siteKey}/insight/clients works, but only returns 10 clients.  The JSON shows:
    "currentPage": 1,
    "currentSize": 10,
    • How can the size and page be updated?  It doesn't appear to be covered in the API document.

 

Just confirmed the information for you, here is the answer:

 

No, both paths haven't been adjusted/removed, but paging queries are required.

 

"currentPage" refers to the current page number, it is populated with 1 by default;

"currentPageSize" refers to the number of clients displaying on each page, and it's populated with 10 by default.

 

The above fields are not populated by default on the interface /api/v2/sites/{siteKey}/clients, so it returns an error.

 

I think you can modify the currentPage and currentSize to check more clients.

Best Regards!
0
0
#4
Options
Re:Omada V2 API
2021-07-08 14:15:41

@Fae Thanks for the pointer to the API; excuse my ignorance, but where is the definition of the POST payloads?  For example for `login` API call?

0
0
#5
Options
Re:Omada V2 API
2021-07-12 03:12:52 - last edited 2021-07-12 03:13:51

 

Fae wrote

Dear @OneFix,

 

OneFix wrote

  • The path /api/v2/sites/{siteKey}/clients returns an error.  Has this been removed?
  • The path /api/v2/sites/{siteKey}/insight/clients works, but only returns 10 clients.  The JSON shows:
    "currentPage": 1,
    "currentSize": 10,
    • How can the size and page be updated?  It doesn't appear to be covered in the API document.

 

Just confirmed the information for you, here is the answer:

 

No, both paths haven't been adjusted/removed, but paging queries are required.

 

"currentPage" refers to the current page number, it is populated with 1 by default;

"currentPageSize" refers to the number of clients displaying on each page, and it's populated with 10 by default.

 

The above fields are not populated by default on the interface /api/v2/sites/{siteKey}/clients, so it returns an error.

 

I think you can modify the currentPage and currentSize to check more clients.

 

Thanks, the API document doesn't seem to mention the proper way to modify the currentPage and currentPageSize settings.

 

I seem to have gotten it working with the insights page.  For anyone interested, It is:

 

/api/v2/sites/{siteKey}/insight/clients?currentPageSize=999&currentPage=1 (there seems to be no upper limit on currentPageSize)

 

But, the interface /api/v2/sites/{siteKey}/clients still returns a "General Error" even when I add the currentPageSize and currentPage parameters.

 

Do you have any information on how to do this correctly?

0
0
#6
Options
Re:Omada V2 API
2021-07-14 06:40:55

Dear @OneFix,

 

OneFix wrote

But, the interface /api/v2/sites/{siteKey}/clients still returns a "General Error" even when I add the currentPageSize and currentPage parameters.

Do you have any information on how to do this correctly?

 

Sorry, there is another parameter to verify, that is "filters.active=true", which refers to check the online clients.

 

Note: the current controller doesn't support checking the offline clients.

Best Regards!
0
0
#7
Options
Re:Omada V2 API
2021-07-27 19:29:01 - last edited 2021-07-27 19:30:37

Do you have a complete/functional v2 API document? Preferably a Swagger/OpenAPI version? The v2 API document referenced above contains the HTTP verbs and URLs but doesn't provide any of the JSON request payloads or example JSON responses. Thanks!

0
0
#8
Options
Re:Omada V2 API
2021-07-28 06:10:44

A complete OpenAPI document would be ideal - one can then generate a client from it.

0
0
#9
Options
Re:Omada V2 API
2021-07-28 23:25:34

 

ZdenekM wrote

A complete OpenAPI document would be ideal - one can then generate a client from it.

 

 

Agreed, that is actually what I was working on building (a Python module to be specific).

0
0
#10
Options
Re:Omada V2 API
2021-08-23 14:16:56 - last edited 2021-08-23 14:17:33

@Fae any update on complete API documentation?

0
0
#11
Options