Skip to main content
POST
/
device
/
sync
Python
from miru_agent_sdk import Miru

client = Miru()
response = client.device.sync()
print(response.code)
{
  "code": "success",
  "message": "Device is not connected to the backend.",
  "last_synced_at": "2021-01-01T00:00:00Z",
  "last_attempted_sync_at": "2021-01-01T00:00:00Z",
  "in_cooldown": true,
  "cooldown_ends_at": "2021-01-01T00:00:00Z"
}

Response

200 - application/json

Successfully synced the device.

code
enum<string>
required

The result of attempting to sync the device.

Available options:
success,
network_connection_error,
in_cooldown
message
string
required

The message of the result.

Example:

"Device is not connected to the backend."

last_synced_at
string<date-time>
required

Timestamp of when the device was last synced.

Example:

"2021-01-01T00:00:00Z"

last_attempted_sync_at
string<date-time>
required

Timestamp of when the last attempted sync occurred.

Example:

"2021-01-01T00:00:00Z"

in_cooldown
boolean
required

Whether the device is currently in cooldown.

Example:

true

cooldown_ends_at
string<date-time>
required

Timestamp of when the cooldown will end.

Example:

"2021-01-01T00:00:00Z"

I