Snapdragon Guardian API Guide

Overview

The Snapdragon Guardian API is broken into two sections: The Main API and the Device Management (DM) API.

  • The Main API is used to send commands to the device and view their responses. Most API are asynchronous (as the device may be offline when the API is called) while others return cached responses from the device.
API Diagram
  • The Device Management (DM) API is used to store cached data about each device. All API calls are synchronous, as they do not go to the device.

Authentication: All endpoints require authentication headers (see Deployment Package for token setup).


Quick Start: Common API requests

  1. List DevicesGET {DM}/v1/devices
  2. Get details of a deviceGET {DM}/v1/devices/{deviceId}
  3. Send a command to the devicePOST {Main}/devices/{deviceId}/command
  4. Get the status of a commandGET {Main}/devices/{deviceId}/command/{sequence}
  5. Get command historyGET {Main}/devices/{deviceId}/commands
  6. Get event historyGET {Main}/events
  7. Get details of an eventGET {Main}/events/{eventId}

Full details of all API are available in the swagger


Endpoints

1. List Devices

Gets a paginated list of devices, allowing filtering or sorting

Request:

GET /dm/v1/devices?pageNum=0&pageSize=2

Response (200):

{
  "page": 0,
  "pageSize": 2,
  "total": 35,
  "results": [
    {
      "id": "eceb637f-821b-4bfd-9087-865d261155a7",
      "name": "Device_A",
      "serialNumber": "WVL25432705",
      "qwesId": "Device_A",
      "publicKeyId": "0ce6be32-1984-4991-add4-f6888b44109b",
      "model": {
        "id": 6,
        "mcn": "testQdragonX",
        "mcnRevision": "TBD",
        "manufacturer": "Qualcomm",
        "formFactor": "string"
      },
      "manufacturedDate": "2025-10-14",
      "inventoryState": "ONBOARDED",
      "serviceState": "READY",
      "lastHeartbeatTime": "2025-11-13T17:43:01.617Z",
      "deviceIdentifiers": [
        {
          "id": 816,
          "value": "DEVICE_A",
          "deviceIdentifierType": {
            "id": 9,
            "name": "assetTag"
          }
        }
      ],
      "externalIdentifier": "Device_A"
    },
    {
      "id": "3e3df1ba-afca-4312-abcd-bf6c55b64de7",
      "name": "QCOM-LVKLAN4NP4",
      "serialNumber": "WHS49747680",
      "qwesId": "DeviceId3",
      "publicKeyId": "0ce6be32-1984-4991-add4-f6888b44109b",
      "model": {
        "id": 6,
        "mcn": "testQdragonX",
        "mcnRevision": "TBD",
        "manufacturer": "Qualcomm",
        "formFactor": "string"
      },
      "manufacturedDate": "2025-10-10",
      "inventoryState": "ONBOARDED",
      "serviceState": "READY",
      "lastHeartbeatTime": "2025-11-24T08:50:47.143Z",
      "deviceIdentifiers": [
        {
          "id": 392,
          "value": "DEVICEID3",
          "deviceIdentifierType": {
            "id": 9,
            "name": "assetTag"
          }
        }
      ],
      "externalIdentifier": "DeviceId3"
    }
  ]
}

2. Get details of a device

Get the details of a specific device

Request:

GET /dm/v1/devices/eceb637f-821b-4bfd-9087-865d261155a7?expand=deviceMetricsInfo%2CdeviceConfigurationsInfo

Response (200):

{
  "id": "eceb637f-821b-4bfd-9087-865d261155a7",
  "name": "Device_G",
  "serialNumber": "WVL25432705",
  "qwesId": "Device_G",
  "publicKeyId": "0ce6be32-1984-4991-add4-f6888b44109b",
  "tenancyChangeTime": "2025-10-14T17:24:17.665697Z",
  "model": {
    "id": 6,
    "mcn": "testQdragonX",
    "mcnRevision": "TBD",
    "manufacturer": "Qualcomm",
    "formFactor": "string"
  },
  "configurations": [
    {
      "id": 8,
      "name": "isNativeMCN",
      "value": "true",
      "category": "MCN"
    },
    {
      "id": 1228,
      "name": "operatingSystem",
      "value": "Windows 11 Enterprise",
      "category": "device"
    },
    {
      "id": 30,
      "name": "processorModel",
      "value": "Pegasus",
      "category": "device"
    },
    {
      "id": 26,
      "name": "partNumber",
      "value": "89324",
      "category": "device"
    },
    {
      "id": 28,
      "name": "totalSystemMemoryGiB",
      "value": "32",
      "category": "device"
    },
    {
      "id": 27,
      "name": "sku",
      "value": "AA",
      "category": "device"
    },
    {
      "id": 29,
      "name": "processorCount",
      "value": "8",
      "category": "device"
    }
  ],
  "manufacturedDate": "2025-10-14",
  "inventoryState": "ONBOARDED",
  "serviceState": "READY",
  "lastHeartbeatTime": "2025-11-13T17:43:01.617Z",
  "deviceIdentifiers": [
    {
      "id": 816,
      "value": "DEVICE_G",
      "deviceIdentifierType": {
        "id": 9,
        "name": "assetTag"
      }
    }
  ],
  "metricsInfo": {
    "metrics": [
      {
        "name": "Location",
        "value": "{\"location\":{\"lat\":32.899292,\"lng\":-117.191772},\"accuracy\":204,\"source\":\"rfpm\",\"streetAddress\":{\"distanceToPoint\":63.238845,\"streetNumber\":\"10001\",\"addressLine\":\"Pacific Mesa Blvd\",\"metro1\":\"San Diego\",\"postalCode\":\"92121\",\"county\":\"San Diego\",\"stateCode\":\"CA\",\"stateName\":\"California\",\"countryCode\":\"US\",\"countryName\":\"United States\"}}",
        "lastUpdatedTime": "2025-11-05T09:08:41.101Z"
      },
      {
        "name": "City",
        "value": "San Diego",
        "lastUpdatedTime": "2025-11-05T09:08:41.101Z"
      },
      {
        "name": "lockState",
        "value": "Unlocked",
        "lastUpdatedTime": "2025-11-13T17:43:01.617Z"
      },
      {
        "name": "powerState",
        "value": "On",
        "lastUpdatedTime": "2025-11-13T17:43:01.617Z"
      },
      {
        "name": "systemState",
        "value": "Enabled",
        "lastUpdatedTime": "2025-11-13T17:43:01.617Z"
      },
      {
        "name": "systemHealth",
        "value": "OK",
        "lastUpdatedTime": "2025-11-13T17:43:01.617Z"
      }
    ],
    "serviceState": "READY",
    "heartbeatTime": "2025-11-13T17:43:01.617Z"
  },
  "externalIdentifier": "Device_G"
}

3. Send a command to the device

Send a command to the device. This request receives sequenceNumber as a response, which can be used to get the status of the command

Request:

POST /qrms/devices/Device_G/command/systemInfo

Response (200):

{
  "deviceId": "Device_G",
  "sequenceNumber": 8006,
  "requestType": "SYSTEM_INFO",
  "requestStatus": "PENDING",
  "message": "Command to perform SYSTEM_INFO initiated.",
  "createdAt": "2025-11-26T01:05:44.2493195+00:00"
}

4. Get the status of a command

Get the status of a command. If the command is COMPLETE, the response will also contain the resultBody.

Request:

GET /qrms/devices/Device_G/command/8006

Response (200):

{
  "deviceId": "Device_G",
  "sequenceNumber": 8006,
  "requestStatus": "COMPLETE",
  "completedAt": "2025-11-26T01:05:45.481521+00:00",
  "createdAt": "2025-11-26T01:05:44.249319+00:00",
  "requestType": "SYSTEM_INFO",
  "requestBody": null,
  "resultBody": {
    "Oem": {
      "Qualcomm": {
        "Locked": false,
        "@odata.type": "#Qualcomm.ComputerSystem"
      }
    },
    "SKU": "AA",
    "Model": "X2000094",
    "Status": {
      "State": "Enabled",
      "Health": "OK"
    },
    "Actions": {
      "Oem": {
        "#Qualcomm_ComputerSystem.Lock": {
          "target": "/redfish/v1/Systems/0/Actions/Oem/Qualcomm_ComputerSystem.Lock"
        },
        "#Qualcomm_ComputerSystem.Locate": {
          "target": "/redfish/v1/Systems/0/Actions/Oem/Qualcomm_ComputerSystem.Locate"
        }
      },
      "#ComputerSystem.Reset": {
        "target": "/redfish/v1/Systems/0/Actions/ComputeSystem.Reset"
      }
    },
    "AssetTag": "DEVICE_G",
    "HostName": "Device_G",
    "PartNumber": "89324",
    "PowerState": "On",
    "Manufacturer": "Qualcomm",
    "SerialNumber": "2302-1324-ab25",
    "MemorySummary": {
      "TotalSystemMemoryGiB": 32
    },
    "ProcessorSummary": {
      "Count": 8,
      "Model": "Pegasus"
    }
  }
}

5. Get command history

Get a recent history of all commands run on the device. This can be helpful if sequence number is lost, or to get the most recent result for a given command request type.

By default, Snapdragon Guardian will only retain the most recent 100 commands. This can be configured by updating the MAX_COMMANDS_PER_DEVICE in the infrastructure package.

Request:

GET /qrms/devices/Device_G/commands?sort=sequenceNumber%2Cdesc&page=0&pageSize=2

Response (200):

{
  "page": 0,
  "pageSize": 2,
  "total": 71,
  "results": [
    {
      "sequenceNumber": 8006,
      "deviceId": "Device_G",
      "requestStatus": "COMPLETE",
      "requestType": "SYSTEM_INFO",
      "statusCode": 0,
      "createdAt": "2025-11-26T01:05:44.249319+00:00",
      "acceptedAt": null,
      "completedAt": "2025-11-26T01:05:45.481521+00:00",
      "commandType": "REDFISH"
    },
    {
      "sequenceNumber": 8004,
      "deviceId": "Device_G",
      "requestStatus": "COMPLETE",
      "requestType": "BIOS",
      "statusCode": 0,
      "createdAt": "2025-11-26T01:03:57.84191+00:00",
      "acceptedAt": null,
      "completedAt": "2025-11-26T01:04:00.011442+00:00",
      "commandType": "REDFISH"
    }
  ]
}

6. Get event history

The device may generate events to notify the user on certain conditions. These are stored in a history log, and additional details can be retrieved for desired events.

Request:

GET /qrms/events?pageSize=2&page=0&deviceId=Device_G&sort=receivedAt,desc

Response (200):

{
  "page": 0,
  "pageSize": 2,
  "total": 26,
  "results": [
    {
      "id": 274,
      "eventId": 1,
      "deviceId": "Device_G",
      "messageId": "SensorEvent.1.0.ReadingAboveUpperCriticalThreshold",
      "name": "ReadingAboveUpperCriticalThreshold",
      "description": null,
      "registryPrefix": "SensorEvent",
      "registryVersion": "1.0",
      "severity": "Critical",
      "messages": null,
      "receivedAt": "2025-11-24T06:48:07.368245+00:00",
      "eventStatus": "SEEN"
    },
    {
      "id": 272,
      "eventId": 1,
      "deviceId": "Device_G",
      "messageId": "SensorEvent.1.0.ReadingAboveUpperCriticalThreshold",
      "name": "ReadingAboveUpperCriticalThreshold",
      "description": null,
      "registryPrefix": "SensorEvent",
      "registryVersion": "1.0",
      "severity": "Critical",
      "messages": null,
      "receivedAt": "2025-11-24T06:48:07.341182+00:00",
      "eventStatus": "SEEN"
    }
  ]
}

7. Get details of an event

Get additional details of a specific event

By default, Snapdragon Guardian will only retain the most recent 100 events. This can be configured by updating the MAX_EVENTS_PER_DEVICE in the infrastructure package.

Request:

GET /qrms/events/274

Response (200):

{
  "id": 274,
  "eventId": 1,
  "deviceId": "Device_G",
  "messageId": "SensorEvent.1.0.ReadingAboveUpperCriticalThreshold",
  "name": "ReadingAboveUpperCriticalThreshold",
  "description": "",
  "registryPrefix": "SensorEvent",
  "registryVersion": "1.0",
  "severity": "Critical",
  "messages": "{\"EventId\":\"1\",\"EventTimestamp\":\"2025-11-24T06:47:48.0174128Z\",\"MessageId\":\"SensorEvent.1.0.ReadingAboveUpperCriticalThreshold\",\"MessageArgs\":[\"battery\",\"85\",\"degree C\",\"80\"],\"MessageSeverity\":\"Critical\",\"OriginOfCondition\":{\"@odata.id\":\"/redfish/v1/Chassis/0/PowerSubsystem/Batteries/0\"}}",
  "receivedAt": "2025-11-24T06:48:07.368245+00:00",
  "eventStatus": "SEEN"
}

Error Handling

HTTP Status Codes

CodeMeaningCommon Causes
200SuccessRequest completed successfully
201CreatedAsync request was successfully created
400Bad RequestMissing or invalid request parameters
401UnauthorizedMissing or invalid authentication token
403ForbiddenSession belongs to different user
404Not FoundSession or turn ID not found
500Server ErrorInternal server error