---
title: device query | Wartiva GraphQL API
description: Retrieves a Device by its graph object id: an unmanaged device, such as a printer, camera, phone, or IoT appliance.
url: https://wartiva.com/api-docs/queries/device.html
updated: 2026-10-07
---

Networks, devices, and sensors · GraphQL query

# `device` query

Retrieves a [Device](https://wartiva.com/api-docs/types/device.html) by its graph object id: an unmanaged device, such as a printer, camera, phone, or IoT appliance, that managed endpoints see on the network. Devices are discovered from neighbor tables, mDNS, SSDP, DHCP, and port scans, then fingerprinted by type, manufacturer, and model. A device links to the networks it was seen on, its open ports and services, and the positions where it was observed. An [Endpoint](https://wartiva.com/api-docs/types/endpoint.html) lists the devices it reached through `devicesSeen`; find them across the organization with [graphSearch](https://wartiva.com/api-docs/queries/graph-search.html) on the DEVICE object type. Returns a not-found error when no object has the id, and an error when the id belongs to another object type.

## Response

Returns a [`DevicePayload!`](https://wartiva.com/api-docs/types/device-payload.html)

## Arguments

| Name | Description |
|---|---|
| `id` - [`ID!`](https://wartiva.com/api-docs/types/id.html) | The [Device](https://wartiva.com/api-docs/types/device.html) identifier. |
| `mockOptions` - [`MockDataInput`](https://wartiva.com/api-docs/types/mock-data-input.html) | Options for mock data generation. Options supported: none. |

## Example

### Query

```graphql
query device(
  $id: ID!,
  $mockOptions: MockDataInput
) {
  device(
    id: $id,
    mockOptions: $mockOptions
  ) {
    node {
      id
      orgId
      objectType
      objectTypeLabel
      displayName
      firstSeen
      lastSeen
      seen {
        ...SeenOnlineFragment
      }
      createdAt
      updatedAt
      snapshotInfo {
        ...GraphObjectSnapshotInfoFragment
      }
      mac
      ipNetworks {
        ...DeviceIpNetworkFragment
      }
      natIps {
        ...DeviceNatIpFragment
      }
      ip {
        ...IpAddressFragment
      }
      ips {
        ...IpAddressFragment
      }
      hostname
      allHostnames {
        ...DeviceHostnameFragment
      }
      isGateway
      type
      fingerprints {
        ...DeviceFingerprintFragment
      }
      portsSummary {
        ...DeviceOpenPortsFragment
      }
      arpTableEntries {
        ...ArpTableEntryConnectionFragment
      }
      endpoints {
        ...EndpointConnectionFragment
      }
      gatewayForNetworks {
        ...NetworkConnectionFragment
      }
      lastPosition {
        ...PositionSeenFragment
      }
      manufacturer {
        ...DeviceManufacturerFragment
      }
      model {
        ...DeviceModelFragment
      }
      networks {
        ...NetworkConnectionFragment
      }
      ports {
        ...OpenPortConnectionFragment
      }
      positions {
        ...PositionSeenConnectionFragment
      }
      primaryPosition {
        ...PositionSeenFragment
      }
      seenNetworkPrefixes {
        ...NetworkPrefixConnectionFragment
      }
      services {
        ...ServiceConnectionFragment
      }
      sensorRequestIds
      sensorRequests {
        ...SensorRequestFragment
      }
      sensorRequestRunIds
      sensorRequestRuns {
        ...SensorRequestRunFragment
      }
      findings {
        ...FindingsPayloadFragment
      }
      issues {
        ...IssuesPayloadFragment
      }
      issuesSummary {
        ...IssuesSummaryFragment
      }
    }
  }
}

```

### Variables

```json
{"id": 4, "mockOptions": MockDataInput}

```

### Response

```json
{"data": {"device": {"node": Device}}}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
