The Digital IoT Services REST API provides endpoints for provisioning, configuring, and managing cellular and WiFi connected IoT devices in the field.
For information about MQTT topics, device shadows, and other platform capabilities, see the Remote Comms documentation.
Operations for creating and managing X.509 certificates for IoT device provisioning. These endpoints enable secure device identity establishment using Certificate Signing Requests (CSRs) generated on the device itself without the private keys ever leaving the device.
These certificates enable direct-to-cloud communication with AWS IoT Core and are not to be confused with so-called MLS (multi-layer security) certificates which are used for encrypted BLE communication with the ONE-KEY mobile app.
Creates and issues an X.509 bootstrap certificate for device provisioning using a Certificate Signing Request (CSR).
This HTTP endpoint is used at the time of manufacturing to create a unique "boostrap" certificate for a single device. The bootstrap certificate is then used by the device to self-provision an operational certificate via MQTT.
This CSR-based approach ensures that private keys never leave the device. The device maintains full control of its private key throughout the provisioning process.
The request body must contain:
mpbid: 10-character hexadecimal string uniquely identifying the devicedeviceType: Type of device ("gateway" or, perhaps in the future, "tool")certificateSigningRequest: PEM-encoded CSR generated on the deviceThe response includes a single CreateCsrCertificateResponse object containing the certificate ID
(64-character hex string), PEM-encoded certificate, and metadata needed for device authentication
with AWS IoT Core.
Note: this bootstrap certificate grants the device only a limited set of permissions to AWS IoT Core. The device will need to self-provision an operational certificate via MQTT to gain access to all the AWS IoT Core resources it will need to interact wiht.
| mpbid required | string (MPBID) = 10 characters ^[0-9A-Fa-f]{10}$ Unique 10-character hexadecimal string used as the device identifier. MPBID stands for "Milwaukee Product Binary Identifier" and serves as the primary identifier for devices across Milwaukee Tool's connected product ecosystem. This identifier is assigned during manufacturing and is used to associate certificates, device shadows, and other device metadata. Encoding: The first 4 hex characters encode the product ID (0x0000–0xFFFF) and the last 6 hex characters encode the sequence/serial number (0x000000–0xFFFFFF). Case: Always send uppercase. The Certificate subject: This value is embedded as the | ||||||||||||||||||||||||
| deviceType required | string (DeviceType) Enum: "gateway" "tool" Type of device for which the certificate is being issued. This field helps categorize devices and may influence certificate policies or device permissions in AWS IoT Core.
| ||||||||||||||||||||||||
| certificateSigningRequest required | string (CertificateSigningRequest) [ 500 .. 2000 ] characters ^-----BEGIN CERTIFICATE REQUEST-----\r?\n
(?:... PEM-encoded Certificate Signing Request (CSR) generated on the device. The CSR contains the device's public key and subject fields, and is signed with the device's private key. The private key must never leave the device — only the CSR should be transmitted. The CSR must be generated using RSA 2048-bit keys with SHA-256 signing, and must include the following X.509 subject fields exactly:
If the Organization field does not equal |
Example request payload to create a device certificate for a tool device. The CSR should be generated on the device using the device's private key.
{- "mpbid": "FFFFE00000",
- "deviceType": "tool",
- "certificateSigningRequest": "-----BEGIN CERTIFICATE REQUEST-----\nMIICVjCCAT4CAQAwRTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUx\nITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAK8vq5k5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5\nr5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5\nr5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5\nr5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5\nr5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5\nIDAQABoAAwDQYJKoZIhvcNAQEFBQADggEBADswd6y1ZOrt5H0Hcuhc1J2hUV1AI2H6\n-----END CERTIFICATE REQUEST-----\n"
}Example response payload for creating a certificate using device-generated CSR. This is the standard response format when a single certificate is issued.
{- "certificateId": "3a5f7e0b18c94d2e9bfa8d7c9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b",
- "certificatePem": "-----BEGIN CERTIFICATE-----\nMIIDXTCCAkWgAwIBAgIJAKL7wQ8O3uN3MA0GCSqGSIb3DQEBCQUAMEUxCzAJBgNV\nBAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMjMwMTAxMDAwMDAwWhcNMjQwMTAxMDAwMDAwWjBF\nMQswCQYDVQQGEwJVUzETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAK8vq5k5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r\n5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r\n5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r\n5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r\n5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r5K5r\nIDAQABMA0GCSqGSIb3DQEBCQUAA4IBAQCK8vq5k5r5K5r5K5r5K5r5K5r5K5r5K5\n-----END CERTIFICATE-----\n"
}What is an Asset Scan? Bridge devices periodically scan for nearby BLE-enabled products (e.g., OneKey tools). An asset scan payload contains a set of scanned advertisements plus the gateway's location at the time of the scan. This data is processed and then passed along to the Tool Location Service (TLS) system.
Submit BLE advertisement data collected by a bridge device along with location info about the bridge.
This endpoint uses AWS IoT Core HTTPS publish,
to provide devices an alternate protocol for uploading this data. Posting to this endpoint is functionally
equivalent to sending messages to the dt/{mpbid}/asset_scan topic over MQTT (more details).
Key things to note:
https://mqtt.{env}.iot.digital.milwaukeetool.com:8443/)dt/{mpbid}/asset_scan topic (more details).This endpoint supports two URL patterns that both deliver the payload to the same downstream pipeline:
| Mode | URL path |
|---|---|
| Basic Ingest (recommended) | /topics/$aws/rules/dt_asset_scan_ingest/dt/{mpbid}/asset_scan |
| Standard publish | /topics/dt/{mpbid}/asset_scan |
Use Basic Ingest unless you have a specific reason not to. Basic Ingest routes the message directly to the IoT rule engine, bypassing the MQTT broker entirely. This avoids the per-message broker fee and is the pattern all production devices use.
The standard publish path routes through the MQTT broker first, which means the message is also visible to any broker subscribers (e.g. the IoT Core MQTT test client). This can be useful during development or debugging, but should not be used in production.
Set dryRun: true in your payload if you'd like to test uploading data without passing it along to the downstream, Tool Location Service
system.
If not provided, dryRun is set to false and data is passed along to Tool Location Service by default.
| mpbid required | string (MPBID) = 10 characters ^[0-9A-Fa-f]{10}$ Example: FFFF000001 The 10-character hexadecimal MPBID of the reporting device.
Must match the |
| qos | integer Default: 1 Enum: 0 1 Quality of Service. Use |
| timestamp required | integer <int64> Unix epoch seconds when payload was uploaded. |
| mpbid required | string (MPBID) = 10 characters ^[0-9A-Fa-f]{10}$ Unique 10-character hexadecimal string used as the device identifier. MPBID stands for "Milwaukee Product Binary Identifier" and serves as the primary identifier for devices across Milwaukee Tool's connected product ecosystem. This identifier is assigned during manufacturing and is used to associate certificates, device shadows, and other device metadata. Encoding: The first 4 hex characters encode the product ID (0x0000–0xFFFF) and the last 6 hex characters encode the sequence/serial number (0x000000–0xFFFFFF). Case: Always send uppercase. The Certificate subject: This value is embedded as the |
| sessionId | integer or null Scan session identifier (optional). |
| dryRun | boolean Default: false If true, process payload but skip TLS API submission. Useful for testing. |
required | object (LocationSources) non-empty Location data from the device. At least one of |
required | object (XAds) Aggregated BLE advertisement data block from the device. Contains an array of extended advertisement entries captured during a scan session. |
Example payload containing both GNSS fix and LTE cell tower data. This provides the most accurate location by combining satellite positioning with cell tower triangulation. Multiple xAd entries show tools at varying distances (indicated by RSSI).
{- "timestamp": 1704067200,
- "mpbid": "FFFFE00003",
- "sessionId": 12347,
- "dryRun": false,
- "location": {
- "gnssFix": {
- "lat": 37.7749,
- "latDir": "N",
- "lon": 122.4194,
- "lonDir": "W",
- "fixQuality": 2,
- "satellites": 9,
- "hDop": 1.8,
- "altitudeMsl": 16,
- "altitudeUnits": "M",
- "geoidSep": -32.5,
- "geoidUnits": "M"
}, - "lteInfo": {
- "lte": [
- {
- "mcc": 310,
- "mnc": 260,
- "eutranCid": 52847391,
- "tac": 6100,
- "lteLocalId": {
- "pci": 203,
- "earfcn": 2050
}, - "rsrp": -78,
- "rsrq": -7
}, - {
- "mcc": 310,
- "mnc": 120,
- "eutranCid": 98765432,
- "tac": 6100,
- "rsrp": -91,
- "rsrq": -11
}
]
}
}, - "xAds": {
- "data": [
- {
- "xAd": "0201061AFF4C000215FFFFE0000500000000000000000000000000",
- "timeSeen": 1704067190,
- "rssi": -45,
- "mac": "00:1A:7D:DA:71:15"
}, - {
- "xAd": "0201061AFF4C000215FFFFE0000600000000000000000000000000",
- "timeSeen": 1704067192,
- "rssi": -62,
- "mac": "00:1A:7D:DA:71:16"
}, - {
- "xAd": "0201061AFF4C000215FFFFE0000700000000000000000000000000",
- "timeSeen": 1704067194,
- "rssi": -78
}, - {
- "xAd": "0201061AFF4C000215FFFFE0000800000000000000000000000000",
- "timeSeen": 1704067196,
- "rssi": -89
}
]
}
}{- "message": "OK"
}Device shadows are JSON documents that store device state in the cloud. They enable synchronizing state between the cloud and device, even when the device is offline.
Each shadow has desired state (what the cloud wants) and reported state (what the device has). When you update desired state via this API, AWS IoT Core sends the changes to the device via MQTT. The device applies the changes and updates its reported state.
All shadow endpoints return CORS headers to enable cross-origin requests from web browsers:
Access-Control-Allow-Origin: * - Allows requests from any originContent-Type: application/json - Response content typePreflight OPTIONS requests are handled automatically by API Gateway for cross-origin requests.
Retrieves a list of all named shadows that exist for a specific device. This endpoint is useful for discovering what shadows are available before attempting to retrieve or update a specific shadow.
Software teams and firmware engineers who need to discover what shadows exist for a device, debug shadow configurations, or build dynamic UIs that work with arbitrary shadows.
| mpbid required | string (MPBID) = 10 characters ^[0-9A-Fa-f]{10}$ Example: FFFF000001 Unique 10-character hexadecimal string used as the device identifier. MPBID stands for "Milwaukee Product Binary Identifier" and serves as the primary identifier for devices across Milwaukee Tool's connected product ecosystem. This identifier is assigned during manufacturing and is used to associate certificates, device shadows, and other device metadata. Encoding: The first 4 hex characters encode the product ID (0x0000–0xFFFF) and the last 6 hex characters encode the sequence/serial number (0x000000–0xFFFFFF). Case: Always send uppercase. The Certificate subject: This value is embedded as the |
Example response showing all named shadows that exist for a device.
{- "shadows": [
- "identity",
- "status",
- "config",
- "location"
]
}Retrieves the complete shadow document for a named shadow on a specific device.
This endpoint is used by software teams and firmware engineers to read the current state of a device shadow, including both desired state (what the cloud wants) and reported state (what the device currently has).
Devices can have multiple named shadows. For example: identity, status, config, location, etc.
Each named shadow maintains its own independent state document. Use the shadowName path parameter to specify which shadow to retrieve.
| mpbid required | string (MPBID) = 10 characters ^[0-9A-Fa-f]{10}$ Example: FFFF000001 Unique 10-character hexadecimal string used as the device identifier. MPBID stands for "Milwaukee Product Binary Identifier" and serves as the primary identifier for devices across Milwaukee Tool's connected product ecosystem. This identifier is assigned during manufacturing and is used to associate certificates, device shadows, and other device metadata. Encoding: The first 4 hex characters encode the product ID (0x0000–0xFFFF) and the last 6 hex characters encode the sequence/serial number (0x000000–0xFFFFFF). Case: Always send uppercase. The Certificate subject: This value is embedded as the |
| shadowName required | string (ShadowName) Enum: "identity" "status" "config" "location" Example: status The name of a device shadow. Each shadow stores different types of device state:
Write Access Control:
|
| includeMetadata | boolean Default: false When true, includes per-field shadow metadata timestamps and the shadow document version in the response. Useful for debugging sync issues or understanding when specific fields were last updated. |
Example response for retrieving a status shadow. This shows device health and
connectivity-related state values. Note: Status is a read-only shadow, so desired is null.
{- "state": {
- "desired": null,
- "reported": {
- "faults": "NO_FAULT",
- "last_scan": 1704067200,
- "mqtt_disconnect_ctr": 0,
- "net_disconnect_ctr": 0,
- "power_health": "GOOD",
- "power_source": "battery",
- "session": "sess-abc123",
- "sim_disconnect_ctr": 0
}
}, - "timestamp": 1704067200
}Replaces the entire desired state of a writable shadow. Any fields not included will be removed. Only works for writable shadows.
Write Access Control:
identity, status, location) returns HTTP 403 ForbiddenOperation Behavior:
| mpbid required | string (MPBID) = 10 characters ^[0-9A-Fa-f]{10}$ Example: FFFF000001 The 10-character hexadecimal MPBID (Milwaukee Product Binary Identifier) that uniquely identifies the device. |
| shadowName required | string (ShadowName) Enum: "identity" "status" "config" "location" Example: status The name of the shadow to update. |
required | ConfigShadow (object) (WritableShadow) Shadow content for writable shadows. Currently only Only shadows that can be safely modified by external systems are included here. Device identity, status, and location must be controlled exclusively by the device to maintain data integrity | ||||||||||||
One of
| |||||||||||||
Example request for fully replacing the desired state of a config shadow using PUT. This replaces all desired state values with the provided values. This is the only writable shadow.
{- "desired": {
- "enabled": true,
- "ble_scan": {
- "rssi_threshold": -80,
- "duration_sec": 60,
- "max_xads_to_collect": 1000,
- "service_uuids": [
- "F5FD"
], - "company_codes": [
- "6501",
- "0165"
], - "schedule": {
- "start_hour": 6,
- "frequency_sec": 14400
}
}, - "mqtt": {
- "broker_endpoint": "mqtt.dev.iot.digital.milwaukeetool.com",
- "keep_alive_sec": 60,
- "session_type": "PERSISTENT",
- "packet_timeout_sec": 60,
- "last_will_enabled": false
}, - "antennas": {
- "ble": "BOTH"
}, - "reporting": {
- "cellular_checkin": {
- "start_hour": 0,
- "frequency_sec": 14400
}, - "asset_scan_upload": {
- "start_hour": 9,
- "frequency_sec": 14400
}, - "gnss": {
- "start_hour": 0,
- "frequency_sec": 7200
}
}, - "location_override": {
- "enabled": false
}
}
}Example response after successfully updating a config shadow. The response includes the updated shadow document with a new timestamp.
{- "state": {
- "desired": {
- "enabled": true,
- "ble_scan": {
- "rssi_threshold": -80,
- "duration_sec": 60,
- "max_xads_to_collect": 1000,
- "service_uuids": [
- "F5FD"
], - "company_codes": [
- "6501",
- "0165"
], - "schedule": {
- "start_hour": 6,
- "frequency_sec": 14400
}
}, - "mqtt": {
- "broker_endpoint": "mqtt.dev.iot.digital.milwaukeetool.com",
- "keep_alive_sec": 60,
- "session_type": "PERSISTENT",
- "packet_timeout_sec": 60,
- "last_will_enabled": false
}, - "antennas": {
- "ble": "BOTH"
}, - "reporting": {
- "cellular_checkin": {
- "start_hour": 0,
- "frequency_sec": 14400
}, - "asset_scan_upload": {
- "start_hour": 9,
- "frequency_sec": 14400
}, - "gnss": {
- "start_hour": 0,
- "frequency_sec": 7200
}
}, - "location_override": {
- "enabled": false
}
}, - "reported": {
- "schema_version": 1,
- "enabled": true,
- "ble_scan": {
- "rssi_threshold": -80,
- "duration_sec": 60,
- "max_xads_to_collect": 1000,
- "service_uuids": [
- "F5FD"
], - "company_codes": [
- "6501",
- "0165"
], - "schedule": {
- "start_hour": 6,
- "frequency_sec": 14400
}
}, - "mqtt": {
- "broker_endpoint": "mqtt.dev.iot.digital.milwaukeetool.com",
- "keep_alive_sec": 60,
- "session_type": "PERSISTENT",
- "packet_timeout_sec": 60,
- "last_will_enabled": false
}, - "antennas": {
- "ble": "BOTH"
}, - "reporting": {
- "cellular_checkin": {
- "start_hour": 0,
- "frequency_sec": 14400
}, - "asset_scan_upload": {
- "start_hour": 9,
- "frequency_sec": 14400
}, - "gnss": {
- "start_hour": 0,
- "frequency_sec": 7200
}
}, - "location_override": {
- "enabled": false
}
}
}, - "timestamp": 1704067300
}Partially updates the desired state by merging provided values. Fields not included remain unchanged. Only works for writable shadows.
Write Access Control:
identity, status, location) returns HTTP 403 ForbiddenOperation Behavior:
| mpbid required | string (MPBID) = 10 characters ^[0-9A-Fa-f]{10}$ Example: FFFF000001 The 10-character hexadecimal MPBID (Milwaukee Product Binary Identifier) that uniquely identifies the device. |
| shadowName required | string (ShadowName) Enum: "identity" "status" "config" "location" Example: status The name of the shadow to update. |
ConfigShadow (object) (WritableShadow) Shadow content for writable shadows. Currently only Only shadows that can be safely modified by external systems are included here. Device identity, status, and location must be controlled exclusively by the device to maintain data integrity | |||||||||||||
One of
| |||||||||||||
Example request for partially updating the desired state of a config shadow using PATCH. Only the provided fields will be updated; other desired state fields remain unchanged. PATCH performs deep merge, so patching nested objects like ble_scan will preserve existing nested fields not included in the request.
{- "desired": {
- "ble_scan": {
- "schedule": {
- "frequency_sec": 7200
}
}
}
}Example response after successfully updating a config shadow. The response includes the updated shadow document with a new timestamp.
{- "state": {
- "desired": {
- "enabled": true,
- "ble_scan": {
- "rssi_threshold": -80,
- "duration_sec": 60,
- "max_xads_to_collect": 1000,
- "service_uuids": [
- "F5FD"
], - "company_codes": [
- "6501",
- "0165"
], - "schedule": {
- "start_hour": 6,
- "frequency_sec": 14400
}
}, - "mqtt": {
- "broker_endpoint": "mqtt.dev.iot.digital.milwaukeetool.com",
- "keep_alive_sec": 60,
- "session_type": "PERSISTENT",
- "packet_timeout_sec": 60,
- "last_will_enabled": false
}, - "antennas": {
- "ble": "BOTH"
}, - "reporting": {
- "cellular_checkin": {
- "start_hour": 0,
- "frequency_sec": 14400
}, - "asset_scan_upload": {
- "start_hour": 9,
- "frequency_sec": 14400
}, - "gnss": {
- "start_hour": 0,
- "frequency_sec": 7200
}
}, - "location_override": {
- "enabled": false
}
}, - "reported": {
- "schema_version": 1,
- "enabled": true,
- "ble_scan": {
- "rssi_threshold": -80,
- "duration_sec": 60,
- "max_xads_to_collect": 1000,
- "service_uuids": [
- "F5FD"
], - "company_codes": [
- "6501",
- "0165"
], - "schedule": {
- "start_hour": 6,
- "frequency_sec": 14400
}
}, - "mqtt": {
- "broker_endpoint": "mqtt.dev.iot.digital.milwaukeetool.com",
- "keep_alive_sec": 60,
- "session_type": "PERSISTENT",
- "packet_timeout_sec": 60,
- "last_will_enabled": false
}, - "antennas": {
- "ble": "BOTH"
}, - "reporting": {
- "cellular_checkin": {
- "start_hour": 0,
- "frequency_sec": 14400
}, - "asset_scan_upload": {
- "start_hour": 9,
- "frequency_sec": 14400
}, - "gnss": {
- "start_hour": 0,
- "frequency_sec": 7200
}
}, - "location_override": {
- "enabled": false
}
}
}, - "timestamp": 1704067300
}Retrieves the specified shadow type for multiple devices in a single request. This is more efficient than making individual GET requests when you need to fetch the same shadow for many devices.
Software teams building dashboards, fleet management tools, or any application that needs to display shadow data for multiple devices at once.
The request body contains an array of MPBIDs (1-100 devices). All devices will have the same shadow type retrieved (specified in the path parameter).
The response always contains a results array with one entry per requested device
(in the same order as the request) and a summary with counts.
POST is used instead of GET to support large arrays of MPBIDs in the request body, which would exceed URL length limits if passed as query parameters.
| shadowName required | string (ShadowName) Enum: "identity" "status" "config" "location" Example: status The name of the shadow to retrieve for all devices. |
| includeMetadata | boolean Default: false When true, includes per-field shadow metadata timestamps and the shadow document version in each device's response. Useful for debugging sync issues. |
| mpbids required | Array of strings (MPBID) [ 1 .. 100 ] items [ items = 10 characters ^[0-9A-Fa-f]{10}$ ] Array of device MPBIDs to retrieve shadows for (1-100 items). |
Example request for retrieving the same shadow type for multiple devices.
{- "mpbids": [
- "FFFFE00001",
- "FFFFE00002",
- "FFFFE00003"
]
}Example response when all devices are successfully retrieved.
{- "results": [
- {
- "mpbid": "FFFFE00001",
- "status": "success",
- "shadow": {
- "state": {
- "desired": null,
- "reported": {
- "faults": "NO_FAULT",
- "power_health": "GOOD"
}
}, - "timestamp": 1704067200
}
}, - {
- "mpbid": "FFFFE00002",
- "status": "success",
- "shadow": {
- "state": {
- "desired": null,
- "reported": {
- "faults": "NO_FAULT",
- "power_health": "GOOD"
}
}, - "timestamp": 1704067200
}
}, - {
- "mpbid": "FFFFE00003",
- "status": "success",
- "shadow": {
- "state": {
- "desired": null,
- "reported": {
- "faults": "NO_FAULT",
- "power_health": "GOOD"
}
}, - "timestamp": 1704067200
}
}
], - "summary": {
- "total": 3,
- "successful": 3,
- "failed": 0
}
}Partially updates (patches) the desired state of device shadows for multiple devices in a single request. Each device can have its own patch payload, enabling efficient fleet-wide configuration updates.
Software teams building fleet management tools, configuration deployment systems, or any application that needs to update device configurations in bulk.
The request body contains an array of patches (1-100 items). Each patch specifies:
mpbid: The device to updatedesired: The partial desired state to merge with existing statePatch payloads are deep-merged with existing desired state:
config shadow can be patchedidentity, status, location)
returns HTTP 403 ForbiddenThe response always contains a results array with one entry per requested patch
(in the same order as the request) and a summary with counts.
Duplicate MPBIDs are not allowed in a single request. If the same MPBID appears multiple times, the request will be rejected with HTTP 400 and error code ERR0001. Merge your patches for each device before sending the request.
| shadowName required | string (ShadowName) Enum: "identity" "status" "config" "location" Example: status The name of the shadow to patch (must be 'config'). |
required | Array of objects (DevicePatch) [ 1 .. 100 ] items Array of device patches (1-100 items). | ||||
Array ([ 1 .. 100 ] items)
| |||||
Example request for patching config shadows for multiple devices. Each device can have its own patch payload.
{- "patches": [
- {
- "mpbid": "FFFFE00001",
- "desired": {
- "enabled": true,
- "ble_scan": {
- "rssi_threshold": -75
}
}
}, - {
- "mpbid": "FFFFE00002",
- "desired": {
- "ble_scan": {
- "schedule": {
- "frequency_sec": 21600
}
}
}
}
]
}Example response when all patches are successfully applied.
{- "results": [
- {
- "mpbid": "FFFFE00001",
- "status": "success",
- "shadow": {
- "state": {
- "desired": {
- "enabled": true,
- "ble_scan": {
- "rssi_threshold": -75,
- "schedule": {
- "start_hour": 6,
- "frequency_sec": 14400
}
}
}, - "reported": {
- "enabled": true,
- "schema_version": 1
}
}, - "timestamp": 1704067200
}
}, - {
- "mpbid": "FFFFE00002",
- "status": "success",
- "shadow": {
- "state": {
- "desired": {
- "enabled": true,
- "ble_scan": {
- "schedule": {
- "start_hour": 6,
- "frequency_sec": 21600
}
}
}, - "reported": {
- "enabled": false,
- "schema_version": 1
}
}, - "timestamp": 1704067200
}
}
], - "summary": {
- "total": 2,
- "successful": 2,
- "failed": 0
}
}