---
title: "Get Data"
method: GET
path: "/data"
tags: ["Device Data"]
---

# Get Data

`GET /data`

## Request

- Base URL: `https://api.us-e1.tago.io`
- URL: `https://api.us-e1.tago.io/data`
- Auth: API key in header `Device-Token`
- TypeScript: <https://skmtc.dev/tago/apis/tagoio-api/docs/data/get.ts> (a function with typed inputs; its response is checked against the schema)

Get data from the device.

## Query parameters

- `query` 'count' | 'min' | 'max' | 'avg' | 'sum' | 'last_item' | 'last_location' | 'aggregate' | 'conditional'
- `qty` integer
- `details` boolean
- `ordination` 'ascending' | 'descending'
- `skip` integer
- `variables` string
- `values` string
- `groups` string
- `start_date` string, date-time
- `end_date` string, date-time
- `function` 'avg' | 'sum' | 'min' | 'max' | 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne'

## Response `200`

Success Response

- object
  - `result` object[]
    - `created_at` string
    - `device` string
    - `group` string
    - `id` string
    - `location` object
      - `coordinates` number[]
      - `type` string
    - `time` string
    - `unit` string
    - `value` number
    - `variable` string
  - `status` boolean

---

[API](https://skmtc.dev/tago/apis/tagoio-api.md) - [All operations](https://skmtc.dev/tago/apis/tagoio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tago/apis/tagoio-api/revisions/1a281f04cdab?raw)
