{"id":22859975,"url":"https://github.com/reelyactive/archive-tds","last_synced_at":"2026-01-30T22:39:36.667Z","repository":{"id":257815396,"uuid":"863557510","full_name":"reelyactive/archive-tds","owner":"reelyactive","description":"Retrieve historic IoT data from a SQL Server database using TDS.  We believe in an open Internet of Things.","archived":false,"fork":false,"pushed_at":"2024-10-08T19:17:46.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-19T09:42:49.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reelyactive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-26T13:55:14.000Z","updated_at":"2024-10-08T19:17:50.000Z","dependencies_parsed_at":"2024-10-14T01:16:58.083Z","dependency_job_id":null,"html_url":"https://github.com/reelyactive/archive-tds","commit_stats":null,"previous_names":["reelyactive/archive-tds"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/reelyactive/archive-tds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Farchive-tds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Farchive-tds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Farchive-tds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Farchive-tds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reelyactive","download_url":"https://codeload.github.com/reelyactive/archive-tds/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Farchive-tds/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28921479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"ssl_error","status_checked_at":"2026-01-30T22:32:31.927Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T09:08:35.196Z","updated_at":"2026-01-30T22:39:36.653Z","avatar_url":"https://github.com/reelyactive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"archive-tds\n===========\n\nThis script stand-alone from other `pareto-anywhere` related scripts.\n\nThis runs an Express server with an API for retrieving archived IoT data from a SQL Server database using TDS.\n\nGetting Started\n------------\n\nThe following environment variables can be set.\n\n| Environment Variable   | Description |\n:------------------------|:------------|\n| PORT                   | The port for this API |\n| ACCESS_TOKEN           | The authorization token |\n| TDS_SERVER             | The IP or domain to the MS SQL Server |\n| TDS_USER               | MS SQL username |\n| TDS_PASSWORD           | MS SQL password |\n\nRun the script with the following command.\n\n    npm start\n\n\nAPI Calls\n------------\n    /archive/dynamb\n\nThe following parameters can be used in the query string of the API call.\n| Query Parameter   | Description |\n:-------------------|:------------|\n| token             | The authorization token |\n| firstId           | The first `_storeId` to retrieve from the table |\n| lastId (optional) | The last `_storeId` to retrieve from the table |\n| maxRows (optional)      | The maximum number of rows to retrived |\n\nExample API call:\n\n    http://localhost:3001/archive/dynamb?firstId=10\u0026maxRows=25\n\nReturns: JSON with an array of the rows returned from the database.\n\nExample return:\n\n    [\n    {\n        \"_storeId\": 12,\n        \"dynamb\": \"{\"timestamp\":1726518575439,\"deviceId\":\"c300000ae8d8\",\"deviceIdType\":3,\"batteryPercentage\":100,\"isMotionDetected\":[true],\"illuminance\":465}\"\n    },\n    {\n        \"_storeId\": 13,\n        \"dynamb\": \"{\"timestamp\":1726518575767,\"deviceId\":\"ac233faf5b98\",\"deviceIdType\":2,\"batteryPercentage\":100,\"acceleration\":[0.19921875,0.1171875,1.0078125],\"isMotionDetected\":[true]}\"\n    },\n    {\n        \"_storeId\": 14,\n        \"dynamb\": \"{\"timestamp\":1726518579211,\"deviceId\":\"c300000ae8d8\",\"deviceIdType\":3,\"batteryPercentage\":100,\"temperature\":26.46875,\"relativeHumidity\":57.58984375,\"isMotionDetected\":[true],\"illuminance\":465}\"\n    }\n    ]\n\nContributing\n------------\n\nDiscover [how to contribute](CONTRIBUTING.md) to this open source project which upholds a standard [code of conduct](CODE_OF_CONDUCT.md).\n\n\nSecurity\n--------\n\nConsult our [security policy](SECURITY.md) for best practices using this open source software and to report vulnerabilities.\n\n\nLicense\n-------\n\nMIT License\n\nCopyright (c) 2024 [reelyActive](https://www.reelyactive.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Farchive-tds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freelyactive%2Farchive-tds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Farchive-tds/lists"}