Mira Device Get Stats
AI-generatedOverview
The "Mira Device Get Stats" node retrieves device statistics from the Mira App Server. It is designed to fetch aggregated or real-time statistical data about devices managed by the Mira platform. This node is useful in scenarios where users want to monitor device performance, usage metrics, or health status programmatically within an n8n workflow.
Practical examples include:
- Automatically gathering device stats for reporting dashboards.
- Triggering alerts based on specific device metrics.
- Integrating device statistics into broader automation workflows for operational insights.
Properties
| Name | Meaning |
|---|---|
| Token Source | Choose where to get the access token from: either from stored credentials or from input data. Options: "From Credentials", "From Input Data". |
| Server URL | The URL of the Mira App Server to connect to (required if token source is "From Input Data"). Defaults to http://localhost:8081. |
| Access Token | The access token used for authentication with the Mira App Server. Can be provided directly or via expressions when token source is "From Input Data". |
Output
The node outputs JSON data containing the device statistics retrieved from the Mira App Server's /api/devices/stats endpoint. Each output item includes the original data enriched with:
operation: set to"get_stats"indicating the type of operation performed.timestamp: ISO string timestamp marking when the data was fetched.
No binary data output is produced by this node.
Dependencies
- Requires access to a Mira App Server instance reachable at the specified Server URL.
- Needs a valid access token for authenticating API requests, which can be supplied either via stored credentials or dynamically through input data.
- Relies on HTTP communication to the Mira API endpoint
/api/devices/stats.
Troubleshooting
- Invalid or missing access token: Ensure that the token is correctly provided either through credentials or input data. If using input data, verify the token expression resolves properly.
- Server URL unreachable: Confirm the Mira App Server URL is correct and accessible from the n8n environment.
- API errors or unexpected responses: Check the server logs and ensure the API endpoint
/api/devices/statsis available and functioning. - Timeouts or network issues: Verify network connectivity and firewall settings between n8n and the Mira App Server.
Links and References
- Mira App Server API documentation (if publicly available)
- n8n HTTP Request node documentation for understanding underlying HTTP calls
- General Mira platform user guides for device management and statistics