get_post_filter
ReferenceAudience: API consumerUse: read back the reader's current post-filter rules
Overview
get_post_filter reads back the reader's current post-filters — the rules that include or exclude scanned RFID tag data before it is reported to a data endpoint. Each rule matches tag data by pattern (prefix, suffix, or regex) and either reports (INCLUDE) or drops (EXCLUDE) it, scoped to a data endpoint. It is read-only. It is a control-plane (CTRL) command; configure filters with set_post_filter.
This is a CTRL-endpoint command: it is published on the control endpoint (<tenantId>/CTRL/clients/cmnd/<serial>) and answered only there (not on the MGMT/MDM channel). Returning a response requires an active CTRL endpoint (config_endpoint, epType: CTRL, activate: true).
Details
| Property | Value |
|---|---|
| Interaction Pattern | Request / Response (app publishes a command; device publishes the correlated reply) |
| State Change | READ-ONLY |
| Required Request Fields | command, requestId (no other payload) |
| Applies To | Endpoint: Control (CTRL). Reader: RFD40 series, RFD90 series |
| API Version | V1.1 (API Version Reporting) |
| Related | set_post_filter, get_operating_mode, config_endpoint |
When to Use
Use get_post_filter to inspect the reader's post-filters:
- Audit filtering — see which patterns are included/excluded per data endpoint before relying on the tag-data stream.
- After
set_post_filter— verify a filter was applied (the setter's response carries no configuration echo). - Confirm none are set — an absent
postFilterPayloadmeans no filters are configured (see Response Semantics).
Topic Mapping
| Message | Direction | Topic | Note |
|---|---|---|---|
| Request | App → Reader | <tenantId>/CTRL/clients/cmnd/<serial> | On the control endpoint. Requires an active CTRL endpoint. |
| Response | Reader → App | <tenantId>/CTRL/clients/resp/<serial> | Correlated reply; the in-payload requestId links the twin topics. |
Topics follow the pattern <tenantId>/<topic>/<serial> — the tenant id assigned to you at provisioning (a slot you fill in, never a literal), the base topic you configure on the endpoint, and the reader's serial number, which the reader appends itself in its model-prefixed form (for example RFD40-212735201D0053). App → Reader means your app publishes and the reader subscribes; Reader → App means the reader publishes and your app subscribes.
Control commands are answered only on the CTRL endpoint — publishing get_post_filter to the MGMT/MDM command topic produces no reply.
Post-filters act on tag data (post-singulation), distinct from the Gen2 select pre-filters in set_operating_mode that act on the air interface. If control commands time out, confirm a CTRL endpoint is active and activate one with config_endpoint if needed.
See Topics and Channels.
Key Fields
postFilterPayload.postFilter[](response) — the configured rules; absent when none are set.dataEpType(response) — the data endpoint (DATA_EP1/DATA_EP2) each rule scopes to.DATA_EP2targets theDATA2endpoint, which is currently not supported.matchPattern+matchPatternMethod(response) — what to match and how (PREFIX/SUFFIX/REGEX).reportOperation(response) —INCLUDE(report matches) orEXCLUDE(drop matches).response.code(response) — read this to determine success vs failure. The contract requires it; note the reported success-path omission (see Success without a code). See Response Codes.
Request Payload
The request is a minimal envelope — just command and requestId. It returns all configured post-filters and takes no parameters.
- Example
- Schema
| Field | Type | Enum / Units | Example | Description |
|---|---|---|---|---|
command* | string | — | get_post_filter | Fixed command name. |
requestId* | string | — | abc123 | A unique identifier for the request; echoed back in the response. There is no other payload. |
Response Payload
On success the device returns the envelope (command, requestId, apiVersion, response) plus postFilterPayload when filters are configured. The Example tab shows one DATA_EP1 regex filter.
- Example
- Schema
| Field | Type | Enum / Units | Example | Description |
|---|---|---|---|---|
command* | string | — | get_post_filter | Echoes the executed command. |
requestId* | string | — | abc123 | Echoes the request's requestId — pairs reply to request. |
apiVersion* | enum | V1.0V1.1V1.2V1.21V1.22 | V1.1 | API version reported by this command. Emitted per-handler, not device-wide. |
postFilterPayload | object | — | — | The current post-filter configuration. Present only when at least one filter is configured — omitted entirely (not even an empty array) when none are set (see Response Semantics). |
postFilter, nesting level 2 | array | — | — | The configured post-filter rules (one per entry). |
dataEpType, nesting level 3 | enum | DATA_EP1DATA_EP2 | DATA_EP1 | The data endpoint this filter applies to. DATA_EP2 targets the DATA2 endpoint, which is currently not supported. |
matchPattern, nesting level 3 | string | — | FFFF | The pattern matched against scanned tag data. |
matchPatternMethod, nesting level 3 | enum | PREFIXSUFFIXREGEX | REGEX | How the pattern is applied — prefix, suffix, or regular expression. |
reportOperation, nesting level 3 | enum | INCLUDEEXCLUDE | INCLUDE | Reports (INCLUDE) or drops (EXCLUDE) matching tag data. |
response* | object | — | — | Status envelope for the read. |
code*, nesting level 2 | integer | 0–101 | 0 | 0 = Success; non-zero = error. Required by the contract. Readers have been reported to omit it on success — see Response Codes below. |
description*, nesting level 2 | string | — | Success | Human-readable status. |
When no filters are configured, the device omits postFilterPayload entirely:
Response Semantics
postFilterPayloadis absent when no filters are set. With no post-filters configured, the device omitspostFilterPayloadentirely — not even an emptypostFilter: []. Treat its absence as "no filters." When filters exist,postFilter[]lists them.
Response Codes
get_post_filter returns response.code. The codes applicable to this command are below; for the full table see the Response Codes and Correlation and Request/Response Pairing.
| Code | Description |
|---|---|
0 | Success — the post-filter configuration was retrieved (an empty configuration still succeeds). |
3 | Not able to retrieve information (IOT_ERROR_INFO_NOT_AVAILABLE) — the device could not gather the post-filters at this time. Retry after a short delay; if persistent, reboot. |
101 | Default error — generic catch-all. |
The contract requires response.code. Readers have been reported to omit it on a successful reply, returning just response: { "description": "Success" } — treat that as success too. See Success without a code.
Examples
Publish get_post_filter over the CTRL endpoint (with an active CTRL endpoint); the device replies with the current filters. The Response Payload shows a configured filter; the no-filter reply is shown above it. There are no request variants — the command takes no parameters.
Notes and Caveats
- Post-filters vs pre-filters.
get_post_filterreports post-filters — pattern rules applied to scanned tag data before it reaches a data endpoint (INCLUDE/EXCLUDE). These are separate from the Gen2selectpre-filters inset_operating_mode, which filter on the air interface during inventory. Configure post-filters withset_post_filter.
get_post_filter is a read-only, idempotent getter — safe to poll. Use it to verify a change applied by set_post_filter; it carries no credentials in request or response. For the concept-level view, see Tag Filtering.
Related: 📕 set_post_filter · 📕 get_operating_mode · 📕 config_endpoint · 📕 Tag Filtering · 📕 Response Codes