# Juniper Mist

> Run your Juniper Mist network: check access points, switches and gateways and restart them, find wireless and wired clients, search and acknowledge alarms, read the audit log, change WLANs, claim devices and let guests through the guest portal.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/juniper-mist

## Actions

### Acknowledge alarms

Mark alarms as acknowledged, so the team knows someone is on them, with an optional note.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Alarm IDs (`alarm_ids`, text, required): The alarms, from 'Search alarms': IDs one per line or separated by commas, or a list from an earlier step.
- Note (`note`, text): A note to keep with the alarms, such as what was done.

**Outputs**

- `acknowledged` (true/false): True once Mist has them
- `alarm_ids` (list): The alarms acknowledged
- `count` (number): How many

**Example output**

```json
{
  "acknowledged": true,
  "alarm_ids": [
    "489f6eca-6276-4993-bfeb-c3cbbbba1f08"
  ],
  "count": 1
}
```

### Authorize guest

Let a guest's device through a site's guest Wi-Fi portal without signing in, for a number of minutes.

**Inputs**

- Site (`site_id`, text, required): The Mist site. Pick one, or give its ID from an earlier step.
- Guest device MAC address (`guest_mac`, text, required): The guest's phone or laptop, by its MAC address, like 5c:5b:35:00:00:18.
- Guest WLAN (`wlan_id`, text, required): The guest WLAN to let the device on.
- Minutes (`minutes`, number): How long, up to 259,200 (180 days). Defaults to 1,440 (a day). From 1 to 259200.
- Guest name (`name`, text): The guest's name, for the record.
- Guest email (`email`, text): The guest's email, for the record.
- Guest company (`company`, text): The guest's company, for the record.

**Outputs**

- `guest` (object): The guest

**Example output**

```json
{
  "guest": {
    "auth_method": "passphrase",
    "authorized": true,
    "authorized_expiring_time": 1480704955,
    "authorized_time": 1480704355,
    "company": "abc",
    "email": "john@abc.com",
    "mac": "5684dae9ac8b",
    "minutes": 10,
    "name": "John Smith",
    "ssid": "Guest",
    "wlan_id": "e5d67b07-aae8-494b-8584-cbc20c8110aa"
  }
}
```

### Claim devices

Add devices to the organization's inventory with the claim codes on their labels or order. Each code says whether it was added.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Claim codes (`claim_codes`, text, required): Claim codes like 6JG8E-PTFV2-A9Z2N, one per line or separated by commas.

**Outputs**

- `added` (list): Codes added
- `devices_added` (list): The devices added
- `devices_duplicated` (list): The devices already in the inventory
- `duplicated` (list): Codes already in the inventory
- `errors` (list): Codes not claimed
- `reasons` (list): Why, for codes not claimed

**Example output**

```json
{
  "added": [
    "6JG8E-PTFV2-A9Z2N"
  ],
  "devices_added": [
    {
      "mac": "5c5b35000018",
      "model": "AP41",
      "serial": "FXLH2015150025",
      "type": "ap"
    }
  ],
  "devices_duplicated": [],
  "duplicated": [],
  "errors": [],
  "reasons": []
}
```

### Get API token details

See who the API token acts as and the organizations and sites it reaches, with its role in each.

**Inputs**: None.

**Outputs**

- `account` (object): Who the API token acts as

**Example output**

```json
{
  "account": {
    "email": "user@example.com",
    "first_name": "Jo",
    "last_name": "Bloggs",
    "name": "Jo Bloggs",
    "privileges": [
      {
        "name": "Example Corp",
        "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
        "org_name": "Example Corp",
        "role": "admin",
        "scope": "org",
        "site_id": ""
      }
    ]
  }
}
```

### Get device configuration

Get a device's configuration as Mist holds it: name, notes, ports, radios and the rest.

**Inputs**

- Site (`site_id`, text, required): The Mist site. Pick one, or give its ID from an earlier step.
- Device (`device_id`, text, required): The access point, switch or gateway at the site. Pick one, or give its ID.

**Outputs**

- `device` (object): The device's configuration

**Example output**

```json
{
  "device": {
    "config": {
      "height": 2.75,
      "id": "00000000-0000-0000-1000-5c5b35d0077b",
      "mac": "5c5b35d0077b",
      "model": "AP43",
      "name": "Phoenix",
      "notes": "slightly off center",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "serial": "A0703200709E6",
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "type": "ap"
    },
    "id": "00000000-0000-0000-1000-5c5b35d0077b",
    "mac": "5c5b35d0077b",
    "model": "AP43",
    "name": "Phoenix",
    "notes": "slightly off center",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
    "serial": "A0703200709E6",
    "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
    "type": "ap"
  }
}
```

### Get device status

Get a device's live status: connected or not, uptime, firmware, IP address, clients and everything else Mist reports.

**Inputs**

- Site (`site_id`, text, required): The Mist site. Pick one, or give its ID from an earlier step.
- Device (`device_id`, text, required): The access point, switch or gateway at the site. Pick one, or give its ID.

**Outputs**

- `device` (object): The device and its live status

**Example output**

```json
{
  "device": {
    "ext_ip": "66.129.234.28",
    "id": "00000000-0000-0000-1000-5c5b35d0077b",
    "ip": "192.168.95.3",
    "last_seen": 1720595866,
    "mac": "5c5b35d0077b",
    "model": "AP43",
    "name": "Phoenix",
    "num_clients": 1,
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
    "serial": "A0703200709E6",
    "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
    "stats": {
      "cpu_util": 5,
      "ext_ip": "66.129.234.28",
      "id": "00000000-0000-0000-1000-5c5b35d0077b",
      "ip": "192.168.95.3",
      "last_seen": 1720595866,
      "mac": "5c5b35d0077b",
      "model": "AP43",
      "name": "Phoenix",
      "num_clients": 1,
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "serial": "A0703200709E6",
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "status": "connected",
      "type": "ap",
      "uptime": 1593120,
      "version": "0.14.29313"
    },
    "status": "connected",
    "type": "ap",
    "uptime": 1593120,
    "version": "0.14.29313"
  }
}
```

### Get organization summary

Get an organization's headline numbers: sites, devices connected and disconnected, devices in inventory, and service levels.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.

**Outputs**

- `organization` (object): The organization's summary

**Example output**

```json
{
  "organization": {
    "id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
    "name": "Example Corp",
    "num_devices": 42,
    "num_devices_connected": 40,
    "num_devices_disconnected": 2,
    "num_inventory": 48,
    "num_sites": 3,
    "sle": [
      {
        "path": "coverage",
        "user_minutes": {
          "ok": 9500,
          "total": 10000
        }
      }
    ]
  }
}
```

### Get site summary

Get a site's numbers: access points, switches and gateways and how many are connected, and how many clients are on it.

**Inputs**

- Site (`site_id`, text, required): The Mist site. Pick one, or give its ID from an earlier step.

**Outputs**

- `site` (object): The site's summary

**Example output**

```json
{
  "site": {
    "address": "1601 S. Deanza Blvd., Cupertino, CA, 95014",
    "id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
    "name": "Mist Office",
    "num_ap": 8,
    "num_ap_connected": 8,
    "num_clients": 57,
    "num_devices": 12,
    "num_devices_connected": 11,
    "num_gateway": 1,
    "num_gateway_connected": 1,
    "num_switch": 3,
    "num_switch_connected": 2,
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
    "timezone": "America/Los_Angeles"
  }
}
```

### Get WLAN

Get one organization WLAN with all its settings. Its passphrase is never shown.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- WLAN (`wlan_id`, text, required): The organization WLAN. Pick one, or give its ID.

**Outputs**

- `wlan` (object): The WLAN

**Example output**

```json
{
  "wlan": {
    "auth_type": "psk",
    "bands": [
      "24",
      "5"
    ],
    "enabled": true,
    "hide_ssid": false,
    "id": "e5d67b07-aae8-494b-8584-cbc20c8110aa",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
    "settings": {
      "auth": {
        "pairwise": [
          "wpa2-ccmp"
        ],
        "type": "psk"
      },
      "bands": [
        "24",
        "5"
      ],
      "enabled": true,
      "hide_ssid": false,
      "id": "e5d67b07-aae8-494b-8584-cbc20c8110aa",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "ssid": "Corp",
      "template_id": "6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9",
      "vlan_enabled": true,
      "vlan_id": "10"
    },
    "site_id": "",
    "ssid": "Corp",
    "template_id": "6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9",
    "vlan_enabled": true,
    "vlan_id": "10"
  }
}
```

### List connected clients

List the clients connected to a site right now, with their IP address, Wi-Fi, access point and signal.

**Inputs**

- Site (`site_id`, text, required): The Mist site. Pick one, or give its ID from an earlier step.
- Connection (`connection`, text): Wireless or wired clients. Defaults to wireless. One of: `wireless`, `wired`.
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.

**Outputs**

- `clients` (list): The clients
- `count` (number): How many

**Example output**

```json
{
  "clients": [
    {
      "ap_mac": "5c5b358e6fea",
      "band": "5",
      "channel": 157,
      "hostname": "android-9b228dc33690",
      "ip": "10.100.0.47",
      "is_guest": false,
      "last_seen": 1741257505,
      "mac": "dadbfc123456",
      "manufacture": "Unknown",
      "os": "Android 10",
      "rssi": -39,
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "snr": 47,
      "ssid": "Live_demo_only",
      "uptime": 104600,
      "username": "",
      "vlan_id": "1"
    }
  ],
  "count": 1
}
```

### List devices

List an organization's access points, switches and gateways with whether each is connected, its model, firmware and IP address.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Site (`site_id`, text): Only this site. Leave blank for the whole organization.
- Device type (`device_type`, text): Which kind of device. Defaults to all devices. One of: `all` (All devices), `ap` (Access points), `switch` (Switches), `gateway` (Gateways).
- Status (`status`, text): Only connected or disconnected devices. Defaults to both. One of: `all` (Connected or not), `connected`, `disconnected`.
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Page (`page`, number): Which page to get, from 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `devices` (list): The devices
- `page` (number): Which page this is, from 1
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "devices": [
    {
      "ext_ip": "66.129.234.28",
      "id": "00000000-0000-0000-1000-5c5b35d0077b",
      "ip": "192.168.95.3",
      "last_seen": 1720595866,
      "mac": "5c5b35d0077b",
      "model": "AP43",
      "name": "Phoenix",
      "num_clients": 1,
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "serial": "A0703200709E6",
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "stats": {
        "cpu_util": 5,
        "ext_ip": "66.129.234.28",
        "id": "00000000-0000-0000-1000-5c5b35d0077b",
        "ip": "192.168.95.3",
        "last_seen": 1720595866,
        "mac": "5c5b35d0077b",
        "model": "AP43",
        "name": "Phoenix",
        "num_clients": 1,
        "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
        "serial": "A0703200709E6",
        "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
        "status": "connected",
        "type": "ap",
        "uptime": 1593120,
        "version": "0.14.29313"
      },
      "status": "connected",
      "type": "ap",
      "uptime": 1593120,
      "version": "0.14.29313"
    }
  ],
  "page": 1,
  "total": 1
}
```

### List guests

List the guests let through a site's guest Wi-Fi portal, with how long each may stay.

**Inputs**

- Site (`site_id`, text, required): The Mist site. Pick one, or give its ID from an earlier step.
- Guest WLAN (`wlan_id`, text): Only guests of this WLAN.

**Outputs**

- `count` (number): How many
- `guests` (list): The guests

**Example output**

```json
{
  "count": 1,
  "guests": [
    {
      "auth_method": "passphrase",
      "authorized": true,
      "authorized_expiring_time": 1480704955,
      "authorized_time": 1480704355,
      "company": "abc",
      "email": "john@abc.com",
      "mac": "5684dae9ac8b",
      "minutes": 10,
      "name": "John Smith",
      "ssid": "Guest",
      "wlan_id": "e5d67b07-aae8-494b-8584-cbc20c8110aa"
    }
  ]
}
```

### List inventory

List the devices in the organization's inventory, whether or not they are assigned to a site, with model, serial and MAC address.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Device type (`device_type`, text): Which kind of device. Defaults to all devices. One of: `all` (All devices), `ap` (Access points), `switch` (Switches), `gateway` (Gateways).
- Site (`site_id`, text): Only this site. Leave blank for the whole organization.
- Assigned (`assigned`, text): Only devices assigned to a site. Defaults to all. One of: `all` (Assigned to a site or not), `assigned` (Assigned to a site).
- Serial number (`serial`, text): Only this serial number.
- Model (`model`, text): Only this model, such as AP43.
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Page (`page`, number): Which page to get, from 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `devices` (list): The devices
- `page` (number): Which page this is, from 1
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "devices": [
    {
      "connected": true,
      "created_time": 1542328276,
      "id": "00000000-0000-0000-0000-5c5b35000018",
      "mac": "5c5b35000018",
      "model": "AP41",
      "modified_time": 1542829778,
      "name": "hallway",
      "serial": "FXLH2015150025",
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "type": "ap"
    }
  ],
  "page": 1,
  "total": 1
}
```

### List sites

List an organization's sites with their addresses and time zones.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Page (`page`, number): Which page to get, from 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `page` (number): Which page this is, from 1
- `sites` (list): The sites
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "page": 1,
  "sites": [
    {
      "address": "1601 S. Deanza Blvd., Cupertino, CA, 95014",
      "country_code": "US",
      "id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "lat": 37.295833,
      "lng": -122.032946,
      "name": "Mist Office",
      "notes": "",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "sitegroup_ids": [
        "497f6eca-6276-5008-bfeb-53cbbbba6f1a"
      ],
      "timezone": "America/Los_Angeles"
    }
  ],
  "total": 1
}
```

### List WLANs

List the organization's WLANs (Wi-Fi networks, kept in its WLAN templates) with their names, security and whether each is on.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Page (`page`, number): Which page to get, from 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `page` (number): Which page this is, from 1
- `total` (number): How many there are in all
- `wlans` (list): The WLANs

**Example output**

```json
{
  "count": 1,
  "page": 1,
  "total": 1,
  "wlans": [
    {
      "auth_type": "psk",
      "bands": [
        "24",
        "5"
      ],
      "enabled": true,
      "hide_ssid": false,
      "id": "e5d67b07-aae8-494b-8584-cbc20c8110aa",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "settings": {
        "auth": {
          "pairwise": [
            "wpa2-ccmp"
          ],
          "type": "psk"
        },
        "bands": [
          "24",
          "5"
        ],
        "enabled": true,
        "hide_ssid": false,
        "id": "e5d67b07-aae8-494b-8584-cbc20c8110aa",
        "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
        "ssid": "Corp",
        "template_id": "6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9",
        "vlan_enabled": true,
        "vlan_id": "10"
      },
      "site_id": "",
      "ssid": "Corp",
      "template_id": "6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9",
      "vlan_enabled": true,
      "vlan_id": "10"
    }
  ]
}
```

### Restart device

Restart an access point, switch or gateway. Everyone connected through it loses their connection until it is back.

**Inputs**

- Site (`site_id`, text, required): The Mist site. Pick one, or give its ID from an earlier step.
- Device (`device_id`, text, required): The access point, switch or gateway at the site. Pick one, or give its ID.
- Gateway cluster node (`node`, text): For a gateway cluster, only this node. Leave blank to restart both. One of: `node0` (Node 0), `node1` (Node 1).
- Virtual Chassis member (`member`, number): For a switch Virtual Chassis, only this member, 0 to 9. From 0 to 9.

**Outputs**

- `device_id` (text): The device restarted
- `restarted` (true/false): True once Mist has the restart
- `site_id` (text): Its site

**Example output**

```json
{
  "device_id": "00000000-0000-0000-1000-5c5b35d0077b",
  "restarted": true,
  "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b"
}
```

### Revoke guest

Stop letting a guest's device through a site's guest portal.

**Inputs**

- Site (`site_id`, text, required): The Mist site. Pick one, or give its ID from an earlier step.
- Guest device MAC address (`guest_mac`, text, required): The guest's phone or laptop, by its MAC address, like 5c:5b:35:00:00:18.

**Outputs**

- `guest_mac` (text): The guest device's MAC address
- `revoked` (true/false): True once removed
- `site_id` (text): The site

**Example output**

```json
{
  "guest_mac": "5684dae9ac8b",
  "revoked": true,
  "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b"
}
```

### Search alarms

Search the organization's alarms, such as a device offline or a rogue access point, by site, severity, group, type or acknowledgement, newest first.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Site (`site_id`, text): Only this site. Leave blank for the whole organization.
- Severity (`severity`, text): Only alarms this serious. One of: `critical`, `warn` (Warning), `info` (Information).
- Group (`group`, text): Only alarms in this group. One of: `infrastructure`, `marvis` (Marvis (AI-detected issues)), `security`, `certificate_expiry` (Certificate expiry).
- Alarm type (`alarm_type`, text): Only alarms of this type. Leave blank for all.
- Acknowledged (`acked`, text): Only acknowledged or unacknowledged alarms. Defaults to both. One of: `any` (Acknowledged or not), `acked` (Acknowledged), `unacked` (Not acknowledged).
- From (`start`, date and time): Only from this time on. Leave blank to use 'Within'.
- Until (`end`, date and time): Only up to this time. Defaults to now.
- Within (`duration`, text): How far back to look when no 'From' is given. Defaults to the last day. One of: `1h` (Last hour), `6h` (Last 6 hours), `1d` (Last day), `7d` (Last 7 days), `30d` (Last 30 days).
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Next page (`next_page`, text): The 'next_page' an earlier run of this search gave, to get the page after it.

**Outputs**

- `alarms` (list): The alarms
- `count` (number): How many are on this page
- `next_page` (text): Give it as 'Next page' to get the next page; empty on the last
- `total` (number): How many match in all

**Example output**

```json
{
  "alarms": [
    {
      "ack_admin_name": "",
      "acked": false,
      "aps": [
        "d420b02000fa"
      ],
      "count": 1,
      "gateways": [],
      "group": "infrastructure",
      "hostnames": [
        "Vendor_AP2"
      ],
      "id": "489f6eca-6276-4993-bfeb-c3cbbbba1f08",
      "last_seen": 1629753888,
      "note": "",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "severity": "warn",
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "ssids": [],
      "status": "open",
      "switches": [],
      "time": "2021-08-23T21:24:48Z",
      "timestamp": 1629753888,
      "type": "device_down"
    }
  ],
  "count": 1,
  "next_page": "",
  "total": 1
}
```

### Search audit log

Search the organization's audit log: who changed what in Mist, in the portal or through the API, newest first.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Site (`site_id`, text): Only this site. Leave blank for the whole organization.
- Admin (`admin_name`, text): Only changes by this admin, by name or email.
- Message (`message`, text): Only entries whose message has this text.
- From (`start`, date and time): Only from this time on. Leave blank to use 'Within'.
- Until (`end`, date and time): Only up to this time. Defaults to now.
- Within (`duration`, text): How far back to look when no 'From' is given. Defaults to the last day. One of: `1h` (Last hour), `6h` (Last 6 hours), `1d` (Last day), `7d` (Last 7 days), `30d` (Last 30 days).
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Page (`page`, number): Which page to get, from 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `entries` (list): The audit log entries
- `page` (number): Which page this is, from 1
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "entries": [
    {
      "admin_id": "72bfa2bd-e58a-4670-9d20-a1468f7a6f58",
      "admin_name": "test@mistsys.com",
      "id": "c6f9347b-b0a4-4a23-b927-fa9249f2ffb2",
      "message": "Update WLAN \"Corp\"",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "time": "2015-05-11T22:08:41Z",
      "timestamp": 1431382121
    }
  ],
  "page": 1,
  "total": 1
}
```

### Search client events

Search wireless client events across the organization, such as failed sign-ins, DHCP failures and roaming, newest first.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Event type (`event_type`, text): Only events of this type. Leave blank for all.
- Wi-Fi name (`ssid`, text): Only events on this SSID.
- Access point (`ap_mac`, text): Only this access point, by its MAC address.
- Band (`band`, text): Only this Wi-Fi band. One of: `24` (2.4 GHz), `5` (5 GHz), `6` (6 GHz).
- From (`start`, date and time): Only from this time on. Leave blank to use 'Within'.
- Until (`end`, date and time): Only up to this time. Defaults to now.
- Within (`duration`, text): How far back to look when no 'From' is given. Defaults to the last day. One of: `1h` (Last hour), `6h` (Last 6 hours), `1d` (Last day), `7d` (Last 7 days), `30d` (Last 30 days).
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Next page (`next_page`, text): The 'next_page' an earlier run of this search gave, to get the page after it.

**Outputs**

- `count` (number): How many are on this page
- `events` (list): The events
- `next_page` (text): Give it as 'Next page' to get the next page; empty on the last
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "events": [
    {
      "ap": "5c5b351e13b5",
      "band": "5",
      "channel": 36,
      "mac": "bcd074000000",
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "ssid": "Corp",
      "text": "Client failed 802.1X authentication",
      "time": "2024-04-26T09:45:22Z",
      "timestamp": 1714124722,
      "type": "CLIENT_AUTH_FAILURE",
      "wlan_id": "e5d67b07-aae8-494b-8584-cbc20c8110aa"
    }
  ],
  "next_page": "",
  "total": 1
}
```

### Search device events

Search the organization's device event log, such as access points restarting, ports going down or configuration changes, newest first.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Device type (`device_type`, text): Which kind of device. Defaults to all devices. One of: `all` (All devices), `ap` (Access points), `switch` (Switches), `gateway` (Gateways).
- Event type (`event_type`, text): Only events of this type. Leave blank for all.
- Device MAC address (`mac`, text): Only this device, by its MAC address.
- Text (`text`, text): Only events whose message has this text.
- From (`start`, date and time): Only from this time on. Leave blank to use 'Within'.
- Until (`end`, date and time): Only up to this time. Defaults to now.
- Within (`duration`, text): How far back to look when no 'From' is given. Defaults to the last day. One of: `1h` (Last hour), `6h` (Last 6 hours), `1d` (Last day), `7d` (Last 7 days), `30d` (Last 30 days).
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Next page (`next_page`, text): The 'next_page' an earlier run of this search gave, to get the page after it.

**Outputs**

- `count` (number): How many are on this page
- `events` (list): The events
- `next_page` (text): Give it as 'Next page' to get the next page; empty on the last
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "events": [
    {
      "device_type": "ap",
      "mac": "5c5b351e13b5",
      "model": "AP43",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "text": "AP restarted by user",
      "time": "2019-01-11T19:40:20.890000Z",
      "timestamp": 1547235620.89,
      "type": "AP_RESTARTED"
    }
  ],
  "next_page": "",
  "total": 1
}
```

### Search wired clients

Search the devices seen on the organization's switch and gateway ports, by MAC, host name or user, newest first.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Site (`site_id`, text): Only this site. Leave blank for the whole organization.
- Search (`text`, text): A MAC address, host name or user name. End it with * to match the start.
- Switch or gateway (`device_mac`, text): Only clients on this switch or gateway, by its MAC address.
- VLAN (`vlan`, number): Only clients on this VLAN, 0 to 4094. From 0 to 4094.
- From (`start`, date and time): Only from this time on. Leave blank to use 'Within'.
- Until (`end`, date and time): Only up to this time. Defaults to now.
- Within (`duration`, text): How far back to look when no 'From' is given. Defaults to the last day. One of: `1h` (Last hour), `6h` (Last 6 hours), `1d` (Last day), `7d` (Last 7 days), `30d` (Last 30 days).
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Next page (`next_page`, text): The 'next_page' an earlier run of this search gave, to get the page after it.

**Outputs**

- `clients` (list): The clients
- `count` (number): How many are on this page
- `next_page` (text): Give it as 'Next page' to get the next page; empty on the last
- `total` (number): How many match in all

**Example output**

```json
{
  "clients": [
    {
      "auth_method": "mac_auth",
      "auth_state": "authenticated",
      "device_mac": [
        "001122334455"
      ],
      "dhcp_hostname": "ITS-VMMT0-D1N02",
      "ip": [],
      "mac": "112233445566",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "port_id": [
        "et-0/0/1"
      ],
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "time": "2019-10-15T21:22:47.807000Z",
      "timestamp": 1571174567.807,
      "vlan": [
        0,
        1001
      ]
    }
  ],
  "count": 1,
  "next_page": "",
  "total": 1
}
```

### Search wireless clients

Search the phones, laptops and other devices seen on the organization's Wi-Fi, by name, MAC, IP or user, newest first.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Site (`site_id`, text): Only this site. Leave blank for the whole organization.
- Search (`text`, text): A MAC address, host name, user name or IP address. End it with * to match the start, such as 10.5.*
- Wi-Fi name (`ssid`, text): Only clients on this SSID.
- Access point (`ap_mac`, text): Only this access point, by its MAC address.
- Band (`band`, text): Only this Wi-Fi band. One of: `24` (2.4 GHz), `5` (5 GHz), `6` (6 GHz).
- From (`start`, date and time): Only from this time on. Leave blank to use 'Within'.
- Until (`end`, date and time): Only up to this time. Defaults to now.
- Within (`duration`, text): How far back to look when no 'From' is given. Defaults to the last day. One of: `1h` (Last hour), `6h` (Last 6 hours), `1d` (Last day), `7d` (Last 7 days), `30d` (Last 30 days).
- Page size (`limit`, number): How many to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Next page (`next_page`, text): The 'next_page' an earlier run of this search gave, to get the page after it.

**Outputs**

- `clients` (list): The clients
- `count` (number): How many are on this page
- `next_page` (text): Give it as 'Next page' to get the next page; empty on the last
- `total` (number): How many match in all

**Example output**

```json
{
  "clients": [
    {
      "band": "5",
      "last_ap": "a83a79a947ee",
      "last_device": "Mac",
      "last_hostname": "hostname-a",
      "last_ip": "10.5.23.43",
      "last_os": "Sonoma",
      "last_ssid": "IoT SSID",
      "last_username": "user@corp.com",
      "last_vlan": 10,
      "mac": "bcd074000000",
      "mfg": "Apple",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "protocol": "ax",
      "site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
      "time": "2024-04-26T09:45:22.113000Z",
      "timestamp": 1714124722.113
    }
  ],
  "count": 1,
  "next_page": "",
  "total": 1
}
```

### Unacknowledge alarms

Mark acknowledged alarms as not acknowledged again.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- Alarm IDs (`alarm_ids`, text, required): The alarms, from 'Search alarms': IDs one per line or separated by commas, or a list from an earlier step.
- Note (`note`, text): A note to keep with the alarms, such as what was done.

**Outputs**

- `alarm_ids` (list): The alarms changed
- `count` (number): How many
- `unacknowledged` (true/false): True once Mist has them

**Example output**

```json
{
  "alarm_ids": [
    "489f6eca-6276-4993-bfeb-c3cbbbba1f08"
  ],
  "count": 1,
  "unacknowledged": true
}
```

### Update WLAN

Rename an organization WLAN, turn it on or off, hide or show its name, or change its passphrase. Fields left blank stay as they are.

**Inputs**

- Organization (`org_id`, text, required): The Mist organization. Pick one, or give its ID from an earlier step.
- WLAN (`wlan_id`, text, required): The organization WLAN. Pick one, or give its ID.
- Wi-Fi name (`ssid`, text): A new name (SSID), up to 32 characters.
- On or off (`enabled`, text): Turn the WLAN on or off. One of: `on`, `off`.
- Name shown (`visibility`, text): Broadcast the Wi-Fi name, or hide it. One of: `visible` (Broadcast the name), `hidden` (Hide the name).
- Passphrase (`passphrase`, text): A new passphrase, 8 to 64 characters, for a WLAN secured with one.

**Outputs**

- `wlan` (object): The WLAN

**Example output**

```json
{
  "wlan": {
    "auth_type": "psk",
    "bands": [
      "24",
      "5"
    ],
    "enabled": true,
    "hide_ssid": false,
    "id": "e5d67b07-aae8-494b-8584-cbc20c8110aa",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
    "settings": {
      "auth": {
        "pairwise": [
          "wpa2-ccmp"
        ],
        "type": "psk"
      },
      "bands": [
        "24",
        "5"
      ],
      "enabled": true,
      "hide_ssid": false,
      "id": "e5d67b07-aae8-494b-8584-cbc20c8110aa",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "ssid": "Corp",
      "template_id": "6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9",
      "vlan_enabled": true,
      "vlan_id": "10"
    },
    "site_id": "",
    "ssid": "Corp",
    "template_id": "6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9",
    "vlan_enabled": true,
    "vlan_id": "10"
  }
}
```
