diff --git a/html/includes/api_functions.inc.php b/html/includes/api_functions.inc.php
index b50cca4a38..d85f4e0fbd 100644
--- a/html/includes/api_functions.inc.php
+++ b/html/includes/api_functions.inc.php
@@ -469,7 +469,7 @@ function get_vlans() {
if ($device) {
$vlans = dbFetchRows("SELECT vlan_vlan,vlan_domain,vlan_name,vlan_type,vlan_mtu FROM vlans WHERE `device_id` = ?", array($device_id));
$total_vlans = count($vlans);
- $output = array("status" => "ok", "count" => $total_vlans, "vlans" => array($vlans));
+ $output = array("status" => "ok", "count" => $total_vlans, "vlans" => $vlans);
} else {
$code = 404;
$output = array("status" => "error", "Device $hostname not found");