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

# Org device status snapshot

> **Required permission:** `read`.

Returns a current per-org device snapshot: totals and online counts by
device type, plus low-battery and last-checkin rollups across all types.



## OpenAPI

````yaml https://api.rescue-serverless.dev.back2back.team/api/public/v1/openapi.json get /orgs/{org_id}/devices/status
openapi: 3.1.0
info:
  title: Rescue Public API v1
  description: >-
    Stable public API for partner integrations.


    **Authentication:** `Authorization: Bearer rk_live_<8 hex><64 hex>`. Tokens
    are minted via `POST /api/v1/api-keys` (internal admin) and shown exactly
    once at creation. The same plaintext is required for every public-v1 request
    — store it securely.


    **Permissions:** v1 vocabulary is `read` | `write`. Future versions may
    introduce granular `<resource>:<action>` permissions additively.


    **Idempotency:** retries on a 5xx must be assumed to have unknown outcomes —
    check `GET /emergencies/{id}` (optionally via `externalId`) before retrying.
    An `Idempotency-Key` header will be supported in a future revision.


    **Webhook delivery:** payloads may be duplicated and out-of-order. Dedup on
    `eventId`; order events per emergency on `(emergencyId, sequence)`.
  version: 1.0.0
servers:
  - url: https://api.punchrescue.com/api/public/v1
security:
  - BearerAuth: []
paths:
  /orgs/{org_id}/devices/status:
    get:
      tags:
        - Devices
      summary: Org device status snapshot
      description: |-
        **Required permission:** `read`.

        Returns a current per-org device snapshot: totals and online counts by
        device type, plus low-battery and last-checkin rollups across all types.
      operationId: devices.status
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            description: Target organization id (from the route path)
            title: Org Id
          description: Target organization id (from the route path)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgDeviceStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OrgDeviceStatusResponse:
      properties:
        orgId:
          type: string
          title: Orgid
        generatedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Generatedat
        devicesByType:
          additionalProperties:
            $ref: '#/components/schemas/DeviceTypeCount'
          type: object
          title: Devicesbytype
        totalDevices:
          type: integer
          title: Totaldevices
        onlineDevices:
          type: integer
          title: Onlinedevices
        lowBatteryCount:
          type: integer
          title: Lowbatterycount
        minBatteryPct:
          anyOf:
            - type: integer
            - type: 'null'
          title: Minbatterypct
        lastCheckinAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastcheckinat
      type: object
      required:
        - orgId
        - generatedAt
        - devicesByType
        - totalDevices
        - onlineDevices
        - lowBatteryCount
      title: OrgDeviceStatusResponse
      description: Current per-org device snapshot for GET /orgs/{org_id}/devices/status.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DeviceTypeCount:
      properties:
        total:
          type: integer
          title: Total
        online:
          type: integer
          title: Online
      type: object
      required:
        - total
        - online
      title: DeviceTypeCount
      description: Per-device-type tally embedded in the org device status snapshot.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: rk_live_<8hex><64hex>

````