# Get Last Activated

## Get Last Activated Devices

<mark style="color:blue;">`GET`</mark> `https://{server_address}/api/v1/organization/device/last-activated`

Return devices, that was activated for the last N minutes. Does not include devices of sub-organizations.

#### Query Parameters

| Name    | Type | Description                                                           |
| ------- | ---- | --------------------------------------------------------------------- |
| orgId   | 1    | Identifier organization, that hold devices.                           |
| minutes | 5    | 5 minutes is used by default. Should be a valid integer from 1 to 60. |

#### Headers

| Name                                            | Type                   | Description |
| ----------------------------------------------- | ---------------------- | ----------- |
| Authorization<mark style="color:red;">\*</mark> | Bearer {access\_token} |             |

{% tabs %}
{% tab title="200: OK Devices info" %}

```json
{
   "id": 1,
   "templateId": 353,
   "orgId": 578,
   "ownerUserId": 879,
   "activationTime": 1702480430139
}
```

{% endtab %}
{% endtabs %}

Request examples:

```bash
# curl command example:
$ curl -H "Authorization: Bearer {accessToken}" https://fra1.blynk.cloud/api/v1/organization/device/last-activated
$ curl -H "Authorization: Bearer eIdWHQqRfFmvP5LDDh-IGxPUzi7I27HthzCPAVmS" https://fra1.blynk.cloud/api/v1/organization/device/last-activated
```
