Get Example
get_exampleRetrieve code examples for any UniFi API endpoint in curl, Go, Node.js, Python, or Ansible. Specify endpoint slug and language to get ready-to-use sample code.
Instructions
Get a code example for a specific UniFi API endpoint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'local' (direct console access) or 'remote' (via cloud API). Defaults to 'local'; remote-only apps (site-manager, mobility, carrier-fabric) default to 'remote'. | |
| slug | Yes | Endpoint identifier (e.g. 'network/createnetwork'). | |
| language | No | Programming language — one of: curl, go, nodejs, python, ansible. | curl |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |