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 Hace 3 semanas

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 Hace 3 semanas

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 Hace 3 semanas

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 Hace 3 semanas

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

 

Best regards.

  0  
  0  
#4
Options
RE:openAPI endpoints for application control
Hace 3 semanas - last edited Hace 3 semanas
Keep openapi for OC200
  0  
  0  
#5
Options
RE:openAPI endpoints for application control
Hace 3 semanas - last edited Hace 3 semanas

  @RBL good news, thanks for let me know.

 

Best regards.

  0  
  0  
#6
Options
RE:openAPI endpoints for application control
Hace 3 semanas

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: 239

Replies: 6

Related Articles