REST API
Smartreader Embedded REST API Documentation
Overview
This document describes the REST API endpoints available in the Smartreader Embedded application. The API provides functionality for managing reader settings, monitoring tag data, controlling inventory operations, and handling various system configurations.
Authentication
All endpoints are protected with Basic Authentication. Include the following header in your requests:
Authorization: Basic <base64-encoded-credentials>Default credentials are admin/admin.
Base URL
All API endpoints are relative to the base URL: https://<reader-ip>:8443
Endpoints
Streaming Endpoints
Get Volume Stream
GET /api/stream/volumesStreams volume data in Server-Sent Events (SSE) format. Returns array of JSON documents containing volume information.
Success response:
200 OKwith an endless SSE stream of JSON payloads. Idle intervals emit{}keep-alive events every ~10 seconds so the connection stays open.Error responses:
401 Unauthorizedwhen the Basic credentials are wrong; transport errors close the stream.Side effects: None—events are read-only and do not mutate state.
Clear Stream Summaries
Resets all cached stream summary data before starting a new inventory cycle or when preparing to replay SSE output. Use this endpoint when you need the next stream to emit only fresh summary data so dashboards and downstream processors do not blend results from previous runs.
Success Response:
204 No Contentindicates the summary buffers were cleared successfully and the reader is ready to accumulate new metrics.Error Responses:
401 Unauthorizedif the request lacks valid credentials, and500 Internal Server Errorif the reader cannot clear the cached summaries.
Clearing summaries ensures the next inventory cycle begins with a clean state. Until new data is collected, subsequent GET /api/stream/volumes and GET /api/stream/tags calls will not include previously aggregated summaries.
Get Tags Stream
Streams tag read data in Server-Sent Events (SSE) format. Returns array of JSON documents containing tag information.
Success response:
200 OKSSE stream. Each event removes the emitted tag record from the runtime database, so replays require a fresh accumulation cycle.Error responses:
401 Unauthorizedfor bad credentials.Side effects: Delivered events are deleted from
SmartReaderTagReadModels, preventing duplicate delivery.
Get Task Events Stream
Streams task progress updates in Server-Sent Events (SSE) format without requiring the deprecated logical point segment. The stream ends when the task completes or is removed. Always prefer this convenience route; legacy clients that still rely on logical-point-prefixed paths should migrate as those endpoints are scheduled for removal.
Guidance: Always reset stream summaries with
DELETE /api/stream/clear-summariesbefore restarting an inventory or replaying a stream so that consumers receive only data from the new session.
Task Management
SmartReader exposes task lifecycle operations under /api/v1/tasks. The Basic Auth credential is required for every call.
List Tasks
Success response:
200 OKwith an array ofTaskDefinitionobjects that includetaskId,logicalPointId,state, and any embedded documents.Error response:
401 Unauthorizedwhen credentials are invalid.Side effects: None.
Create Task
Success response:
201 Createdwith the persisted task echoing back in the body.Validation failure: Missing
logicalPointIdreturns400 Bad Requestand the plain-text messageLogicalPointId is requiredfrom the controller.Side effects: The controller calls
ITaskService.CreateTaskAsync, causing the task to be stored and tracked for progress events.
Get Task by ID
Success response:
200 OKwith aTaskDefinitionresolved from persisted metadata.Error response:
404 Not Foundwhen the ID does not exist.Side effects: None.
Update Task by ID
Success response:
200 OKwith the merged task payload after the service updates it with the stored logical point.Error response:
404 Not Foundwhen the task cannot be resolved to a logical point.Side effects: Updates the task persisted by
ITaskService.UpdateTaskAsync, which may trigger downstream progress events.
Delete Task by ID
Success response:
204 No Contentonce the task is removed from the service.Error response:
404 Not Foundif the controller cannot resolve the task/logical point pair.Side effects: Deletes the task and raises a
TaskRemovedevent, which closes any connected SSE streams.
Task Progress Snapshot
Success response:
200 OKwith aTaskProgressDTO containingstate,percentage, and EPC collections.Error response:
404 Not Foundwhen no task or progress exists for the ID.
Task Progress Stream (SSE)
Success response:
200 OKstreamingdata: {...}events until the task completes or is removed. The controller listens forTaskProgressUpdatedandTaskRemovednotifications and tears down the stream afterward.Error response:
404 Not Foundif the task cannot be resolved before the stream starts.Side effects: None on invocation; consumers simply tap into existing task lifecycle events.
Manage Task Documents
Success response:
201 Createdwith the storedDocumentDefinitionwhen the task exists.Error response:
404 Not Foundif the task ID cannot be mapped to a logical point.Update:
PUT /api/v1/tasks/task/{taskId}/documents/{documentId}accepts the same JSON and returns200 OKwith the revised document.Delete:
DELETE /api/v1/tasks/task/{taskId}/documents/{documentId}responds with204 No Contentafter removal.Side effects: Document calls mutate the task’s stored document set inside
ITaskService, immediately affecting subsequent task executions and SSE payloads.
Legacy logical-point-prefixed routes (for example, POST /api/v1/tasks/{logicalPointId}) are still available but deprecated; they call the same service methods and return identical DTOs.
System Configuration
Get Settings
Retrieves current reader configuration settings.
Success response:
200 OKwith an array containing theStandaloneConfigDTOpulled from the runtime database or config file (for example[{ "readerName": "R700-01", "antennaPorts": "1,2,3,4", ... }]).Error response:
404 Not Foundif no configuration is persisted.
Update Settings
Updates reader configuration settings. Accepts a StandaloneConfigDTO object containing the configuration parameters.
Success response:
200 OKwith{ "message": "Settings saved successfully." }. The controller persists the JSON intoReaderConfigs, stores any supplied license inREADER_LICENSE, and notifies_grpcPublisherService.UpdateConfigso running jobs pick up the change.Error response:
400 Bad Requestwith{ "message": "Error saving settings." }when the update fails (for example, serialization issues).Side effects: Overwrites the reader configuration in the database and can enable dependent services such as advanced GPO or HTTP integrations on the next inventory cycle.
Restore Default Settings
Resets all settings to their default values.
Success response:
200 OKreturning the factoryStandaloneConfigDTOand resetting Basic Auth toadmin/adminwhencustomsettings.jsonis present.Error response:
404 Not Foundif the default template cannot be loaded.Side effects:
SaveConfigDtoToDbwrites the defaults back to storage, wiping any customizations.
Device Information
Get Serial Number
Retrieves the reader's serial number.
Success response:
200 OKcontaining a list of serial DTOs pulled fromReaderStatus(for example[ { "serialNumber": "370123456789" } ]).Error response:
404 Not Foundif the serial cache is empty.
Get Device ID
Retrieves the reader's device identifier.
Success response:
200 OKwith{ "readerName": "R700-01" }sourced fromStandaloneConfigDTO.Error response:
404 Not Foundif no name is configured.
Get Status
Retrieves the current operational status of the reader.
Success response:
200 OKwith the JSON previously persisted inReaderStatus(running inventory status snapshots).Error response:
404 Not Foundwhen no status entry exists.
Get Capabilities
Retrieves the reader's capabilities including supported features and limitations.
Success response:
200 OKwith aSmartReaderCapabilitiespayload describing antennas, search modes, and RF tables.Error response:
500 Internal Server Errorwhen capability discovery fails; the body contains{ "message": "..." }.
Get RFID Status
Retrieves the current RFID subsystem status.
Success response:
200 OKwith key/value pairs parsed from the RShellshow rfid statoutput.Error response: Always
200 OKwith whatever data could be gathered; failures log internally.
Get Image Status
Retrieves information about the current system image.
Success response:
200 OKwith a dictionary of RShell image summary fields (for example{"version":"7.0.0.0","build":"2024-09-15"}).Error response: Returns
200 OKwith partial data if parsing fails; the controller logs any exceptions.
Inventory Control
Start Preset
Starts the preset inventory operation.
Success response:
200 OKwith{ "message": "Command START_PRESET queued." }. The optionalbarcodeis cached for validation and the controller enqueuesReaderCommandsentrySTART_PRESET/STARTbefore persisting it.Error response:
200 OKwith{ "message": "Error queueing START_PRESET." }if an exception occurs; the log records the failure.Side effects: Adds a command row that downstream jobs poll to launch the preset workflow.
Stop Preset
Stops the preset inventory operation.
Success response:
200 OKwith{ "message": "Command STOP_PRESET queued." }after persisting a stop command.Side effects: Cancels the preset workflow by enqueuing
STOP_PRESET/STOP.
Start Inventory
Starts a new inventory operation.
Success response:
200 OKwith{ "message": "Command START_INVENTORY queued." }. The barcode is cached andReaderCommandsreceives theSTART_INVENTORY/STARTrow for the inventory service.Side effects: Launches the configured job pipeline once the command processor consumes the queued record.
Stop Inventory
Stops the current inventory operation.
Success response:
200 OKwith{ "message": "Command STOP_INVENTORY queued." }after persisting the stop command.Side effects: Terminates the running job via the command queue.
GPIO Control
Set GPO Status
Controls the General Purpose Output (GPO) pins.
Success response:
200 OKwith{ "message": "GPO 1 set to High", "timestamp": "..." }when the port number is between 1 and 3 and the status ison/off(case insensitive).Error response:
400 Bad Requestwith a descriptive message if the port is outside the supported range or the status string is invalid.Side effects: Invokes
_gpoService.SetGpoStateAsyncto immediately drive the hardware output line.
Parameters:
port: Integer value specifying the GPO port numberstatus: String value ("ON"/"OFF" or "1"/"0") specifying the desired state
Get GPO Configuration
Returns the current configuration for all ports.
Success response:
200 OKwith anExtendedGpoConfigurationRequestlisting the three supported ports, control modes, and states.Error response:
500 Internal Server Errorwith anErrorResponsebody if the configuration cannot be retrieved.Side effects: None; this is a read-only query.
Update GPO Configuration
Updates the configuration for all GPO ports.
Success response:
200 OKwith aSuccessResponsesummarising the updated ports.Validation errors:
400 Bad Requestwith aValidationErrorResponsewhen the payload is missing, ports are out of range, or control/state combinations are invalid.Error response:
500 Internal Server Errorwith anErrorResponsefor unexpected failures.Side effects: Persists the configuration via
_gpoService.UpdateConfigurationAsync, immediately affecting subsequent inventory jobs.
Set GPO State
Sets a static state for an individual port.
Success response:
200 OKwith{ "message": "GPO 1 set to High", ... }when the payload passes validation.Validation failure:
400 Bad Requestif the port is outside 1-3 or thestateproperty is missing/invalid.Error response:
500 Internal Server Errorwhen the service throws.Side effects: Calls
_gpoService.SetGpoStateAsyncto toggle the hardware line immediately.
Pulse GPO
Generates a pulse on the specified port.
Success response:
200 OKwith{ "message": "GPO 2 pulsed for 750ms", ... }when the duration is within the configured bounds.Validation failure:
400 Bad Requestif the port is invalid or the duration falls outside 100–MaxPulseDurationMs.Error response:
500 Internal Server Errorwhen the pulse command fails.Side effects:
_gpoService.PulseGpoAsyncdrives the output high for the requested interval, then returns it to the previous state.
Set GPO Network Control
Puts the port into network control mode.
Success response:
200 OKwith{ "message": "GPO 3 set to network control mode", ... }when the feature is allowed in configuration.Validation failure:
400 Bad Requestif network control is disabled or the port is outside 1-3.Error response:
500 Internal Server Errorwhen the service fails to update the port.Side effects: Switches the port to network-controlled mode so external systems can drive it over TCP/IP.
Reset GPO Configuration
Resets all GPOs to their default configuration.
Success response:
200 OKwith{ "message": "All 3 GPOs reset to default configuration", ... }.Error response:
500 Internal Server Errorwith anErrorResponsewhen the reset fails.Side effects: Calls
_gpoService.ResetToDefaultAsync, reverting each port to static low output.
Get GPO Status
Success response:
200 OKwith aGpoStatusResponsethat lists each port’s control mode, state, pulse duration, and health flag.Error response:
500 Internal Server Errorwith anErrorResponseif the status cannot be retrieved.Side effects: None; this endpoint reflects current configuration and runtime status only.
Get Supported GPO Modes
Lists all supported control modes and port limits.
Success response:
200 OKwith aControlModesResponsecontaining supported control modes, port ranges, and pulse duration limits.Side effects: None—this is a static capability query driven by configuration values.
System Management
Operation Type Management
GET /api/operation-type
Loads the workflow mode from the standalone configuration file and returns it as an OperationTypeDto.
Request parameters: None. The controller simply calls
ConfigFileHelper.ReadFile()to deserialize/customer/config/smartreader.jsonand inspectStandaloneConfigDTO.operationType.Success response:
Returned with 200 OK when the persisted configuration contains a non-empty workflow mode.
404 Not Found: Returned when the configuration file is missing or the value is blank.
POST /api/operation-type
Accepts an OperationTypeDto payload to update the reader's workflow mode.
operationType
string
Yes
New workflow identifier to store in StandaloneConfigDTO.operationType.
Validation: Requests without a body or with an empty
operationTypeproperty receive 400 Bad Request with{ "message": "Invalid operation type." }.Success workflow:
A valid request results in 200 OK with the updated value echoed back to the caller.
Workflow update flow
StatusController.SetOperationTypemerges the incoming value with the existing configuration (creating a newStandaloneConfigDTOwhen needed).The controller persists the updated DTO via
ConfigFileHelper.SaveFile, overwriting/customer/config/smartreader.jsonso the new workflow survives device restarts and is reloaded by any service that reads the config during the workflow update pipeline.Subsequent
GET /api/operation-typecalls and downstream workflow automation features (for example, the workflow update jobs described in this guide) surface the newly stored mode without additional client action.
Reminder: Legacy logical-point-prefixed task endpoints remain deprecated. Use the
/api/v1/tasksroutes for all task lifecycle operations.
Clean Filter
Cleans the EPC software history filters.
Success response:
200 OKwith{ "message": "Software filter history cleaned." }after queuingCLEAN_EPC_SOFTWARE_HISTORY_FILTERSin theReaderCommandstable.Error response:
500 Internal Server Errorwith{ "message": "Error cleaning filter." }when the command cannot be recorded.Side effects: Downstream jobs purge cached EPC reads as soon as the queued command is processed.
Clear Validation Cache
Flushes any cached SKU validation results maintained by the background validation service. Use this endpoint when validation rules are updated, new product data is loaded, or the cache TTL has been temporarily extended and stale reads must be removed immediately. Returns 200 OK with a confirmation message when the cache is successfully cleared or 500 Internal Server Error if the cache could not be purged.
Success response:
200 OKwith{ "message": "Validation cache cleared." }after invoking_validationService.ClearValidation().Error response:
500 Internal Server Errorwith{ "message": "Error clearing validation cache." }when the service throws.Side effects: Forces the next validation cycle to fetch fresh catalog data instead of relying on cached entries.
Validation Cache TTL Configuration
The validation cache lifetime defaults to 300 seconds, as defined by ValidationCacheOptions.CacheTtlSeconds in the application service configuration. The same value appears in reader settings as validationCacheTtlInSec, allowing operators to override the TTL via /api/settings updates, the Reader Settings UI, or the /customer/appsettings.json file. When a custom TTL is applied, the validation background service reloads the value at runtime and enforces the updated expiration policy. For broader context on how the validation background service manages cached reads, see the Validation feature documentation.
Reload System
Reloads the reader application.
Success response:
200 OKwith{ "message": "Application is restarting." }after enqueuingSTART_INVENTORY/STARTand callingEnvironment.Exit(0)to trigger a restart.Error response:
200 OKwith{ "message": "Error during reload." }if the restart fails.Side effects: Terminates the process, so issue the command only when the reader can safely reboot.
Upgrade Firmware
Initiates a firmware upgrade process.
Success response:
200 OKwith{ "message": "Upgrade firmware command queued." }when a firmware URL is configured, otherwise{ "message": "Upgrade firmware URL not configured." }.Error response:
200 OKwith{ "message": "Error queueing upgrade command." }if queuing fails.Side effects: Adds
UPGRADE_SYSTEM_IMAGEtoReaderCommands, prompting the firmware worker to download and install the image.
Verify License Key
Verifies a license key.
Success response:
200 OKwith[ { "isValid": "pass" | "fail" } ]depending on the MD5 hash comparison between the supplied key and the reader serial.Error handling: Exceptions are swallowed; the controller still returns
[ { "isValid": "fail" } ].Side effects: None—this is a read-only validation check.
Restore Configuration
Restores the reader configuration from backup.
Success response:
200 OKwith{ "message": "Restore initiated." }after copyingsmartreader_backup.jsonover the active config and exiting with code 1.Error response:
200 OKwith{ "message": "Error during restore." }if the operation fails.Side effects: Forces an application restart using the restored configuration file.
Clean USB Files
Removes files from the USB storage. Optional query parameter filename to delete a specific file.
Success response:
200 OKwith either{ "message": "All files cleaned successfully" }or{ "message": "File 'export.json' deleted successfully" }depending on the query string.Error responses:
404 Not Foundwhen the directory or file is missing,500 Internal Server Errorfor IO failures.Side effects: Permanently deletes files from
/customer/wwwroot/files. Use cautiously in production workflows.
Metrics
Returns current reader metrics in Prometheus text format.
Success response:
200 OKwith Prometheus-formatted text aggregated from all registered metric providers.Error response:
200 OKwith# Metrics unavailableif an exception occurs while collecting samples.Side effects: None; the endpoint is read-only but can be polled frequently for monitoring dashboards.
The exporter surfaces operational health data for the reader and every registered integration service. Metric names are generated by concatenating the provider’s .NET type with the original key reported by that provider, lower-casing the result, and replacing any non-alphanumeric characters with underscores. For example, MetricsMonitoringService contributes samples such as metricsmonitoringservice_system_cpu_usage____, and the TCP socket provider publishes entries like tcpsocketservice_connected_clients. Boolean values are normalised to 0 or 1 so they can be scraped as numeric gauges by Prometheus-compatible collectors.
Example scrape showing gauges from each provider:
Refer to the forthcoming observability playbook (tracked in documentation-gap-analysis.md) for guidance on interpreting each provider’s gauges and mapping them to operational alerts.
Debug Routes
Lists all registered API routes (useful for troubleshooting).
Success response:
200 OKwith an array of{ "displayName": "...", "routePattern": "..." }describing every endpoint registered in ASP.NET Core.Side effects: None; the route simply enumerates endpoint metadata for debugging.
External Integration
Test Bearer Token
Performs a credential exchange against an external OAuth/token endpoint using the supplied BearerDTO payload.
Success response:
200 OKwith the raw token string (or empty string if the remote service omits atokenproperty).Error response:
400 Bad Requestwith an empty body when the HTTP exchange fails or throws an exception.Side effects: Issues an outbound HTTPS POST (with certificate validation disabled) to the configured URL and logs the result for auditing.
Product GTIN Lookup
Success response:
200 OKwith the catalog JSON returned by the upstream service whenenableExternalApiVerification == "1"; otherwise the controller returns an empty string.Error response: Propagates the upstream HTTP status code (for example
404,409,502) along with the body content.Side effects: Every call records an
ExternalApiCallEventin the event queue, capturing payloads, URLs, and responses for downstream telemetry.
Order Search (POST payload)
Success response:
200 OKwith the upstream order payload when external verification is enabled; otherwise "External Integration Disabled." is returned.Error response: Mirrors the upstream HTTP status code and body content.
Side effects: Logs and enqueues an event detailing the outbound request/response, aiding traceability.
Order Lookup by Code
Success response:
200 OKwith the order JSON from the upstream API when enabled; otherwise an empty string is returned.Error response: Forwards the remote status code and content body.
Side effects: Same telemetry event publishing as other external calls.
Publish External Payload (POST)
Success response:
200 OKwith the upstream response body, or{ "message": "Published" }when the remote service returns204 No Content. If integration is disabled the reader returns an empty string.Error response: Propagated upstream status code/body (for example
400validation errors).Side effects: Logs and enqueues an external-call event including the remote URL, payload, and response metadata.
Publish External Payload (PUT)
Success response:
200 OKwith upstream content or{ "message": "Published" }on204 No Content. Disabled integrations return an empty string.Error response: Mirrors the upstream HTTP status code and response text.
Side effects: Adds an external call event for monitoring and auditing just like the POST variant.
Reader Mode Control
Set Reader Mode
Changes the active operating mode of the reader. The request body must contain a JSON payload that identifies the desired mode:
Accepted values for mode align with the reader's firmware capabilities. When the request is accepted, the service enqueues a MODE_COMMAND entry for the connected reader. This follows the same internal command queue that powers the MQTT /command/mode workflow, allowing deployments that already automate mode changes over MQTT to reuse the same processing pipeline through the REST API.
MQTT Management
Configure MQTT
Manages MQTT broker configuration and connection settings.
MQTT Command Control
Sends control commands via MQTT.
MQTT Management Commands
Sends management commands via MQTT.
MQTT Mode Commands
Sends mode control commands via MQTT.
Certificate Management
Upload CA Certificate
Uploads a CA certificate for MQTT SSL/TLS connection.
Upload constraints:
File validation: Requests must include a file whose size does not exceed the configured
UploadLimits:MaxFileSizeBytesvalue. Missing files or files that exceed the limit return400 Bad Requestwith a validation message explaining the problem.Retention: The reader keeps at most the number of files defined by
UploadLimits:MaxFilesPerDirectoryfor each endpoint. When a new upload would exceed that count, the oldest file is deleted first-in-first-out.Failure handling: IO or storage errors surface as
500 Internal Server Error.Configuration: Administrators can tune the
UploadLimitsblock (for example incustomsettings.jsonor the deployedappsettings.*.json) to raise or lower both the size (MaxFileSizeBytes) and retention (MaxFilesPerDirectory) limits. The factory configuration sets these to 5 MB and five files respectively, but any restart with new values applies the updated limits.
See also: Upload limit configuration overrides for step-by-step instructions on editing
UploadLimits:MaxFileSizeBytesandUploadLimits:MaxFilesPerDirectoryinappsettings.jsonor/customer/appsettings.jsonbefore retrying the upload.
Upload Client Certificate
Uploads a client certificate for MQTT SSL/TLS connection.
Upload constraints:
File validation: Requests must include a file that satisfies the
UploadLimits:MaxFileSizeByteslimit; violations return400 Bad Requestwith the validation feedback.Retention: Upload pruning follows the configured
UploadLimits:MaxFilesPerDirectorycap, removing the oldest file when a new one would exceed it.Failure handling: IO exceptions during upload return
500 Internal Server Error.Configuration: Override
UploadLimitssettings in deployment configuration to adjust the defaults before restarting the service.Form requirements: Submit both the certificate file and a
passwordform field. Provide an empty string (password=) only when the PFX is not password protected—omitting the field leaves the previous password in place and will cause MQTT mutual TLS failures during the next connection attempt.
The reader stores the uploaded password alongside the certificate (mqttSslClientCertificatePassword) so that future MQTT TLS handshakes can decrypt the private key. Always set the password explicitly—even if unchanged—to avoid connection issues immediately after upload.
Upload HTTP Client Certificate
Uploads a client certificate for HTTP mutual TLS connections.
Upload constraints:
File validation: The controller requires a file within the
UploadLimits:MaxFileSizeByteslimit and returns400 Bad Requestwith a descriptive message when validation fails.Retention: The number of stored files is bounded by
UploadLimits:MaxFilesPerDirectory, with FIFO pruning when the threshold is exceeded.Failure handling: IO issues encountered during upload trigger
500 Internal Server Errorresponses.Configuration: Customize the limit values through the
UploadLimitsconfiguration (for example incustomsettings.json) to suit your deployment.Form requirements: Include both the certificate file and a
passwordform value. Use an explicit empty value only for passwordless PFX bundles; otherwise the prior password remains active and HTTP mTLS requests will be rejected once the new certificate is in place.
The HTTP password is persisted with the certificate (httpClientCertificatePassword) so outbound HTTPS calls can present the client identity. Always set the field intentionally to prevent lingering credentials from breaking connectivity after deployment.
Troubleshooting
Upload rejected immediately? Review the
400 Bad Requestresponse for the validation message (typically missing file or limit exceeded) and adjust the upload or configuration accordingly.Expecting older certificates but they are missing? Check the
UploadLimits:MaxFilesPerDirectoryvalue; the reader prunes the oldest entries when the retention cap is exceeded.Repeated pruning events can indicate automated upload jobs. Audit scheduling to ensure only required certificates are pushed to the device.
Logging Control
Get Current Log Level
Retrieves the current logging level.
Set Log Level
Updates the logging level.
Request body:
Log Directory Quota Monitoring
SmartReader runs a background quota monitor that watches the /customer/wwwroot/logs directory and raises a warning when the aggregate size of retained log files grows beyond the configured allowance. The quota is computed as FileSizeLimitBytes × RetainedFileCountLimit, and the monitor evaluates the directory on the schedule defined by QuotaCheckIntervalMinutes. When the directory size exceeds the calculated quota, the service emits a warning entry so administrators can archive or delete logs before storage fills.
Default thresholds
FileSizeLimitBytes:102400bytes (100 KB per log file)RetainedFileCountLimit:1retained file (resulting in a 100 KB effective quota by default)QuotaCheckIntervalMinutes:5minutes between directory size checks
Configuration
Adjust the thresholds in the LogFileOptions section of appsettings.json (or the environment-specific appsettings.<Environment>.json that your deployment uses). Changes take effect after the reader reloads configuration.
Data Types
StandaloneConfigDTO
Comprehensive configuration object containing all reader settings. Key properties include:
Reader identification and network settings
Antenna configuration
Trigger settings
Filter configuration
MQTT settings
External API integration settings
GPIO configuration
Logging and debugging options
BearerDTO
Authentication token configuration containing:
httpAuthenticationTokenApiUrl: URL for token authenticationhttpAuthenticationTokenApiBody: Request body for authenticationhttpAuthenticationTokenApiValue: Token value
LogLevelRequest
Logging level configuration containing:
level: Desired logging level (DEBUG|INFORMATION|WARNING|ERROR)
Error Handling
API responses use standard HTTP status codes:
200: Success
400: Bad Request
401: Unauthorized
404: Not Found
500: Internal Server Error
Error responses include a message describing the error condition.
Security Considerations
All endpoints require Basic Authentication
HTTPS is used for all communications
Sensitive operations should be restricted to authorized users
Certificate validation for MQTT SSL/TLS connections
Proper handling of authentication tokens and credentials
Rate Limiting
No specific rate limiting is implemented, but clients should implement reasonable delays between requests to avoid overwhelming the reader.
Best Practices
Always verify SSL/TLS certificates in production
Implement proper error handling in clients
Use appropriate logging levels for different environments
Regularly back up reader configuration
Monitor reader status and implement health checks
Clean up resources (files, connections) when no longer needed
Last updated