---
title: service query | Wartiva GraphQL API
description: Retrieves a Service by its graph object id: a network service identified on a discovered device, such as HTTP, TLS, SSH, SMB, SNMP, or DNS.
url: https://wartiva.com/api-docs/queries/service.html
updated: 2026-10-07
---

Networks, devices, and sensors · GraphQL query

# `service` query

Retrieves a [Service](https://wartiva.com/api-docs/types/service.html) by its graph object id: a network service identified on a discovered device, such as HTTP, TLS, SSH, SMB, SNMP, or DNS, in a client or server role, with a protocol-specific report and matching against known vulnerabilities (CPE and CVE). A [Device](https://wartiva.com/api-docs/types/device.html) lists its services through `services`; find them across the organization with [graphSearch](https://wartiva.com/api-docs/queries/graph-search.html) on the SERVICE 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 [`ServicePayload!`](https://wartiva.com/api-docs/types/service-payload.html)

## Arguments

| Name | Description |
|---|---|
| `id` - [`ID!`](https://wartiva.com/api-docs/types/id.html) | The [Service](https://wartiva.com/api-docs/types/service.html) identifier. |
| `mockOptions` - [`MockDataInput`](https://wartiva.com/api-docs/types/mock-data-input.html) | Options for mock data generation. Options supported: key: "SERVICE_TYPE", value: ServiceType example: "mockOptions": { "options": [ { "key": "SERVICE_TYPE", "value": "HTTPS" } ] } |

## Example

### Query

```graphql
query service(
  $id: ID!,
  $mockOptions: MockDataInput
) {
  service(
    id: $id,
    mockOptions: $mockOptions
  ) {
    node {
      id
      orgId
      objectType
      objectTypeLabel
      displayName
      firstSeen
      lastSeen
      seen {
        ...SeenOnlineFragment
      }
      createdAt
      updatedAt
      snapshotInfo {
        ...GraphObjectSnapshotInfoFragment
      }
      device {
        ...DeviceFragment
      }
      network {
        ...NetworkFragment
      }
      networkPrefix {
        ...NetworkPrefixFragment
      }
      openPort {
        ...OpenPortFragment
      }
      public
      addressFamily
      ip {
        ...IpAddressFragment
      }
      port
      protocol
      serviceType
      clientServer
      sensorId
      sensor {
        ...SensorFragment
      }
      sensorVersion
      seenUp {
        ...SeenUpFragment
      }
      seenUpPublic {
        ...SeenUpFragment
      }
      report {
        ... on AppSocket {
          ...AppSocketFragment
        }
        ... on DHCPv4 {
          ...DHCPv4Fragment
        }
        ... on DNS {
          ...DNSFragment
        }
        ... on FTP {
          ...FTPFragment
        }
        ... on HTTP {
          ...HTTPFragment
        }
        ... on IPP {
          ...IPPFragment
        }
        ... on IRC {
          ...IRCFragment
        }
        ... on MDNS {
          ...MDNSFragment
        }
        ... on MongoDB {
          ...MongoDBFragment
        }
        ... on NTP {
          ...NTPFragment
        }
        ... on NetBiosSmb {
          ...NetBiosSmbFragment
        }
        ... on SIP {
          ...SIPFragment
        }
        ... on SMB {
          ...SMBFragment
        }
        ... on SMTP {
          ...SMTPFragment
        }
        ... on SNMP {
          ...SNMPFragment
        }
        ... on SSDP {
          ...SSDPFragment
        }
        ... on SSH {
          ...SSHFragment
        }
        ... on TLS {
          ...TLSFragment
        }
        ... on Telnet {
          ...TelnetFragment
        }
        ... on UPnP {
          ...UPnPFragment
        }
      }
      canResubmitSensorRequests
      sensorRequestIds
      sensorRequests {
        ...SensorRequestFragment
      }
      vulnerabilities {
        ...PlatformVulnerabilitiesFragment
      }
      findings {
        ...FindingsPayloadFragment
      }
      issues {
        ...IssuesPayloadFragment
      }
      issuesSummary {
        ...IssuesSummaryFragment
      }
    }
  }
}

```

### Variables

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

```

### Response

```json
{"data": {"service": {"node": Service}}}

```

---

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