openAPI endpoints for application control

openAPI endpoints for application control

openAPI endpoints for application control
openAPI endpoints for application control
2024-07-08 02:24:25 - last edited 2024-08-14 01:02:54

Hello,

Could somebody tell me what are the endpoints for openAPIs for application control? 

I can use successfully other openapi APIs but it looks like the document is incorrect. 

 

For example: 

https://use1-omada-northbound.tplinkcloud.com/doc.html#/00%20All/Application%20Control/getApplicationControlStatus

 

 I receive a 404 error.

 

 

try {
>>  $appControlStatusUrl = "$OMADA_URL/openapi/v1/$OMADA_ID/sites/$SITE_ID/applicationControl/status"
>>     $appControlStatusHeaders = @{
>>         "Content-Type" = "application/json"
>>         "Authorization" = "AccessToken=$ACCESSTOKEN"
>>     }
>>     $appControlStatusResponse = Invoke-RestMethod -Uri $appControlStatusUrl -Method Get -Headers $appControlStatusHeaders -WebSession $session -UseBasicParsing
>>     Write-Output ($appControlStatusResponse | ConvertTo-Json -Depth 10)
>> } catch {
>>     Write-Error "Failed to get application Control status: $_"
>> }
try {
 $appControlStatusUrl = "$OMADA_URL/openapi/v1/$OMADA_ID/sites/$SITE_ID/applicationControl/status"
    $appControlStatusHeaders = @{
        "Content-Type" = "application/json"
        "Authorization" = "AccessToken=$ACCESSTOKEN"
    }
    $appControlStatusResponse = Invoke-RestMethod -Uri $appControlStatusUrl -Method Get -Headers $appControlStatusHeaders -WebSession $session -UseBasicParsing
    Write-Output ($appControlStatusResponse | ConvertTo-Json -Depth 10)
} catch {
    Write-Error "Failed to get application Control status: $_"
} : Failed to get application Control status: The remote server returned an error: (404) Not Found.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException

 

  1      
  1      
#1
Options
6 Reply
Re:openAPI endpoints for application control
2024-07-08 03:36:30 - last edited 2024-08-14 01:02:53

For example here other openAPI api call that works OK, but application control APIs don't work.

 

try {
>>  $appControlStatusUrl = "$OMADA_URL/openapi/v1/$OMADA_ID/sites/$SITE_ID/port-schedules?page=1&pageSize=1000"
>>     $appControlStatusHeaders = @{
>>         "Content-Type" = "application/json"
>>         "Authorization" = "AccessToken=$ACCESSTOKEN"
>>     }
>>     $appControlStatusResponse = Invoke-RestMethod -Uri $appControlStatusUrl -Method Get -Headers $appControlStatusHeaders -WebSession $session -UseBasicParsing
>>     Write-Output ($appControlStatusResponse | ConvertTo-Json -Depth 10)
>> } catch {
>>     Write-Error "Failed to get application Control status: $_"
>> }
{
    "errorCode":  0,
    "msg":  "Success.",
    "result":  {
                   "totalRows":  0,
                   "currentPage":  1,
                   "currentSize":  1000,
                   "data":  [

                            ]
               }
}

 

  0  
  0  
#2
Options
Re:openAPI endpoints for application control
2024-07-09 07:22:25 - last edited 2024-08-14 01:02:53

Hi  @Efraindeloa 

 

OC200 doesn't support application control.

  0  
  0  
#3
Options
Re:openAPI endpoints for application control
2024-07-09 15:44:29 - last edited 2024-08-14 01:02:53

thanks for reply,,,, does OC300 support Application control OpenAPI apis?

 

Best regards.

  0  
  0  
#4
Options
RE:openAPI endpoints for application control
2024-08-13 12:52:05 - last edited 2024-08-14 01:02:53
Keep openapi for OC200
  0  
  0  
#5
Options
RE:openAPI endpoints for application control
2024-08-13 15:50:00 - last edited 2024-08-14 01:02:53

  @RBL good news, thanks for let me know.

 

Best regards.

  0  
  0  
#6
Options
RE:openAPI endpoints for application control
2024-08-15 12:53:08

Efraindeloa wrote

  @RBL good news, thanks for let me know.

 

Best regards.

  @Efraindeloa Ehmmm, I have asked to keep openapi in the OC200. As far as I know they tend to keep it in OC300 and OC400, but NOT in the OC200.... See the topic in "Requests and Suggestions".

  0  
  0  
#7
Options

Information

Helpful: 1

Views: 348

Replies: 6

Related Articles