> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getprimo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get device reachability

> Return how reachable ONE device was over the last 7 days, from the Fleet online status recorded at each 30-minute sync: `reachabilityPercent` (share of the syncs that saw the device online, 0 to 100, null when no sync recorded it yet) and `samples` (one `{ slotStartedAt, isOnline }` per sync, oldest first; no sync runs from 02:00 to 05:59 UTC). Use it to tell a device that is rarely online from one that is always reachable. For the current online status and last check-in only, use `getDevice` (`mdmStatuses.online`, `lastSeenAt`).

<span className="badge-read">Key: Read</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json get /devices/{deviceId}/reachability
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /devices/{deviceId}/reachability:
    get:
      tags:
        - Devices
      summary: Get device reachability
      description: >-
        Return how reachable ONE device was over the last 7 days, from the Fleet
        online status recorded at each 30-minute sync: `reachabilityPercent`
        (share of the syncs that saw the device online, 0 to 100, null when no
        sync recorded it yet) and `samples` (one `{ slotStartedAt, isOnline }`
        per sync, oldest first; no sync runs from 02:00 to 05:59 UTC). Use it to
        tell a device that is rarely online from one that is always reachable.
        For the current online status and last check-in only, use `getDevice`
        (`mdmStatuses.online`, `lastSeenAt`).
      operationId: getDeviceReachability
      parameters:
        - name: deviceId
          required: true
          in: path
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDeviceReachability_Output'
components:
  schemas:
    GetDeviceReachability_Output:
      type: object
      properties:
        reachabilityPercent:
          description: >-
            Share of the syncs of the last 7 days that saw the device online, 0
            to 100. Null without a sample.
          anyOf:
            - type: number
            - type: 'null'
        samples:
          type: array
          description: >-
            One sample per 30-minute Fleet sync of the last 7 days, oldest
            first. No sync runs from 02:00 to 05:59 UTC.
          items:
            type: object
            properties:
              slotStartedAt:
                description: Start of the 30-minute slot the Fleet sync ran in.
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              isOnline:
                description: Whether Fleet saw the device online at that sync.
                type: boolean
            required:
              - slotStartedAt
              - isOnline
            additionalProperties: false
      required:
        - reachabilityPercent
        - samples
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.