跳至主要内容

Recover buffered device data

POST 

/api/v1/devices/{deviceId}/commands:resync

Requests manual recovery of cloud data lost while the device was online and still holds it in its local buffer. Issues the edge command report.historical for one device and one time range; the device re-uploads the whole range and the cloud overwrites it (full replace, no gap detection). startedAt must be strictly before endedAt and no older than the 7-day recovery horizon (else 422). Runs asynchronously. 202 returns a command-result object; then GET commands/results and match the returned reqSeqId in the items to follow pending -> ack -> progress -> result.

Request​

Responses​

Accepted. Returns the initial command-result envelope (reqSeqId, phase, status, message) with resultData echoing the accepted range, effective horizon and timeoutSeconds; track it via GET commands/results until it reaches result, or times out (data.status = 1, error timedOut).