go-unifi

Execute Port Action

Perform an action on a specific device port. The request body must include the action name and any applicable input arguments.

POST
/v1/sites/{siteId}/devices/{deviceId}/interfaces/ports/{portIdx}/actions

Perform an action on a specific device port. The request body must include the action name and any applicable input arguments.

X-Api-Key<token>

UniFi API key. Create one under Control Plane → Admins & Users → your admin → Create API Key (requires controller 9.0.114+).

In: header

Path Parameters

portIdx*integer
siteId*string
deviceId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*Port action request

Response Body

curl -X POST "https://example.com/v1/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/devices/497f6eca-6276-4993-bfeb-53cbbbba6f08/interfaces/ports/0/actions" \  -H "Content-Type: application/json" \  -d '{    "action": "string"  }'
Empty