Skip to main content

Data Mode

Authentication: every request needs an IdToken — see Authentication. Errors follow the shared error format.

Data mode controls how a reader filters tag reads before reporting them: the strategy decides when a tag is reported, and its filter settings tune it.

MethodPathPurpose
GET/devices/{deviceId}/details/data-modeCurrent strategy and filter settings
GET/devices/{deviceId}/details/data-mode/supportsStrategies and settings the reader supports
POST/devices/{deviceId}/operations/data-modeChange the strategy and filter settings

Strategies​

StrategyRequired filter settings
simplemaxAge
near-inventorymaxAge, reportInRange
enter-n-exitmaxAge
antenna-as-zonemaxAge, transitionCommitTicks, transitionIdleExitSecs

Call Get Data Mode Supports for the strategies a specific reader supports and a description of each setting.

Get Data Mode​

Endpoint Details​

  • URL: https://rest.api.xemelgo.com/edge/devices/{deviceId}/details/data-mode
  • Method: GET

Query Parameters​

ParameterTypeDescriptionRequired
refreshStringtrue to ask the reader now. Omit to return the cached valueNo

StatusCode — 200 on success

Response Body​

{
"commandVersion": "2.1.0",
"filterSettings": {
"near-inventory": {
"confidentEnterCount": 0,
"confidentEnterRssi": 0,
"agingRate": 5,
"maxAge": 60,
"confidentEnterDurationSecs": 0,
"reportInRange": 300
}
},
"strategy": "near-inventory"
}
PropertyTypeDescription
strategyStringActive strategy
commandVersionStringCommand protocol version
filterSettingsObjectSettings per strategy, keyed by strategy name. Readers may include additional settings

Get Data Mode Supports​

Returns the strategies the reader supports and a description of each filter setting.

Endpoint Details​

  • URL: https://rest.api.xemelgo.com/edge/devices/{deviceId}/details/data-mode/supports
  • Method: GET

Query Parameters​

ParameterTypeDescriptionRequired
refreshStringtrue to ask the reader now. Omit to return the cached valueNo

StatusCode — 200 on success

Response Body​

{
"strategies": ["simple", "enter-n-exit", "near-inventory", "antenna-as-zone"],
"filterSettings": {
"simple": {
"maxAge": { "description": "Maximum age in seconds for a tag to be considered exited", "valueType": "number" }
},
"enter-n-exit": {
"maxAge": { "description": "Maximum age in seconds for a tag to be considered exited", "valueType": "number" }
},
"near-inventory": {
"maxAge": { "description": "Maximum age in seconds for a tag to be considered exited", "valueType": "number" },
"inRangeReportInterval": { "description": "Interval in seconds to report tags that are in range", "valueType": "number" }
},
"antenna-as-zone": {
"maxAge": { "description": "Maximum age in seconds for a tag to be considered exited", "valueType": "number" },
"transitionMaxAge": { "description": "Maximum age in seconds for a tag to be considered exited during a zone transition", "valueType": "number" },
"transitionTicks": { "description": "Number of ticks required to confirm a zone transition", "valueType": "number" }
}
}
}
PropertyTypeDescription
strategiesString[]Strategies the reader supports
filterSettingsObjectFor each strategy, its settings with a description and a valueType (number, string, or boolean)

Some settings are listed here under a different name than Set Data Mode and Get Data Mode use. Send them to Set Data Mode as:

Listed in supportsUse in Set Data Mode
inRangeReportIntervalreportInRange
transitionTickstransitionCommitTicks
transitionMaxAgetransitionIdleExitSecs

Set Data Mode​

Changes the reader's strategy and filter settings, then returns the settings now on the reader.

Endpoint Details​

  • URL: https://rest.api.xemelgo.com/edge/devices/{deviceId}/operations/data-mode
  • Method: POST

Properties​

PropertyTypeDescriptionRequired
strategyStringsimple, near-inventory, enter-n-exit, or antenna-as-zoneYes
filterSettingsObjectSettings keyed by strategy name. Must include an entry for strategy with its required settings (see Strategies)Yes
commandVersionStringCommand protocol version. Default 2.0.0No

agingRate is set to 5 on every strategy's settings automatically.

Request Body​

{
"strategy": "near-inventory",
"filterSettings": {
"near-inventory": {
"maxAge": 60,
"reportInRange": 300
}
}
}

StatusCode — 200 on success

Response Body​

The data mode now on the reader, in the same shape as Get Data Mode.

Errors​

ReasonCause
Payload validation failed on field strategy due to: contains unexpected value.strategy is not one of the four strategies
Payload validation failed on field filterSettings.<strategy>.<setting> due to: field is requiredA required setting for the chosen strategy is missing