Core API: Commands, Rate Limits & Device State
Answers to common questions about driving devices programmatically through the Core API — command execution, rate limits, reading device state, measuring device uptime, and how long state history is kept. For the command payload format, see Commands.
Is programmatic command execution included, and are there usage limits?
Running commands through the Core API is part of your org's standard access — there's no separate tier to enable. Commands count toward the general API limit of 960 requests per minute per source IP, one request per device. See Rate Limits and Efficient Syncing.
Short answerIncluded. Commands count toward the general limit of 960 requests per minute per source IP.
What are the API rate limits, per org and per device?
The API accepts up to 960 requests per minute from each source IP address, counted across all endpoints together, not per org or per device. Requests over the limit get HTTP 429. See Rate Limits and Efficient Syncing.
Short answer960 requests per minute per source IP, across all endpoints. Over the limit: HTTP 429.
Can I subscribe to device state changes, or do I have to poll?
Today, polling is the supported way to read device state — there is no webhook or push channel for state changes yet. If a push model matters for your use case, tell us what you're building; the right approach depends on what you need the state for.
Short answerPolling only, for now. No state-change webhooks/push yet.
Queued commands are picked up in ~10 seconds. Is that interval fixed?
No — command pickup latency is determined by the device, not by a fixed platform interval. It depends on how often the device sends telemetry, or whether it maintains an MQTT connection. Devices on a tighter telemetry cadence, or connected over MQTT, pick queued commands up faster. There is no single global setting that changes this.
Short answerDevice-dependent (telemetry cadence / MQTT) — not a global setting.
How long is device state history retained, and can I bulk export it?
Device state history is guaranteed for 3 months. Retrieve it programmatically with the Get Histories endpoint.
Get Histories doesn't have rows for every device, and it has no rows for the time a device is offline, so it can't tell you when a device was down. See How do I measure device uptime with the API? below.
Need a full one-time export?A complete historical download isn't a self-serve endpoint — contact Xyte and it can be produced manually.
How do I measure device uptime with the API?
status vs effective_status
status vs effective_statusGet Devices and Get Device return two status fields:
statusis the device's own state:online,offline,errororunavailable. It turnsofflinewhen the device stops reporting for longer than its model's offline detection time, or when the manufacturer's cloud reports it offline.effective_statusis the device's overall health (see Device statuses). For a merged device, the portal showsmerged_effective_status.effective_statusisn't a clean offline signal on its own:- It shows
disconnected, notoffline, when the Cloud Connector, Edge or parent device upstream is down or in error.statusthen doesn't show whether the device itself is up: it keeps the last value the Cloud Connector reported, or showsunavailablefor devices behind an Edge that is offline. - It shows
errororwarninginstead ofofflinewhen the device also has another open incident that isn't snoozed.
- It shows
Read both together.
When does offline open an incident?
offline open an incident?An incident opens when Xyte marks the device offline:
- Cloud Connector devices: when the manufacturer's cloud reports the device offline, on the Connector's next sync.
- Edge and direct devices: after the device model's offline detection time.
Why is a device offline with no incident of its own?
Get Incidents can return no incident of the device's own for an outage:
- Several devices in a room drop together. By default, when a second device in the same room goes offline within 15 minutes of the first, the first device's offline incident becomes the room incident (
space_incident: true, sameuuid), and devices that drop later join it while it's open. Get Incidents returns the room incident only. Itsdevice_idis the first device that dropped, and itsdescriptionlists the affected devices. See Room incident consolidation. - The device keeps dropping. By default, when a device drops again within an hour of its incident closing, Xyte opens one more incident and reopens that one for later drops. It stays in status
fixed, notclosed, for at least 90 minutes after the device recovers. See Incident flapping consolidation. - The device is suspended. A device whose incidents are suspended gets no incidents. See Suspend Incidents.
- The Cloud Connector or Edge is down. Its devices show
disconnectedand get no offline incident. When an Edge goes offline, the offline incidents already open for its devices stay open. They close once the Edge and the device are both back online. - The incident is older than the window. Get Incidents returns incidents created in the last 7 days unless you pass
fromandto.
Devices in a space under maintenance still get an incident. It is marked in_maintenance: true, and Get Incidents returns it unless you pass in_maintenance=false.
How do I get per-device offline windows?
Neither incidents nor history give a complete record of offline periods, and Get Histories skips devices while they're offline. To measure offline windows, poll Get Devices on a fixed schedule and record each device's status and effective_status changes on your side. Outages shorter than your polling interval are missed, so pick the interval to match the shortest outage you need to count, and keep the polling within the rate limit. Get Incidents has no closing time for an incident, so it can't give you when an outage ended.
Short answerPoll
statusandeffective_statusyourself and record the changes. Incidents are grouped and held open on purpose, so they don't map one to one to outages, and Get Histories doesn't cover every device or offline time.
Are there limits or a review step for commands with dynamic parameters?
There are no limits and no review step on model commands with dynamic parameters. The only caveat is presentation: very large parameter sets can render awkwardly in the UI — for example 10 or more parameters, or a select dropdown with thousands of options.
Heavy parameter setsIf your command has 10+ parameters or a dropdown with thousands of options, reach out so the UI handling can be worked through with you.
Updated 10 days ago
