From dcc042c4fb6d76a8d6c63ce0926bfd95258680f7 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Thu, 9 Mar 2023 18:33:58 -0500 Subject: [PATCH] [Documentation] Initial api documentation (#464) --- README.md | 4 ++ ...Speedtest Tracker.postman_collection.json" | 62 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 "\360\237\220\207 Speedtest Tracker.postman_collection.json" diff --git a/README.md b/README.md index b202753d4..410abdfb5 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Speedtest Tracker is containerized so you can run it anywhere you run your Docke [FAQs](https://docs.speedtest-tracker.dev/faqs) and a full list of planned and completed [features](https://docs.speedtest-tracker.dev/getting-started/features) can be found in the [documentation](https://docs.speedtest-tracker.dev). +## API + +A robust API is planned for a later release but `v0.11.8` includes a legacy endpoint `/api/speedtest/latest` which is used by home lab dashboards like [Homepage](https://github.com/benphelps/homepage) and [Organizr](https://github.com/causefx/Organizr/tree/v2-master). + ## Screenshots ![Dashboard](.github/screenshots/dashboard_screenshot.png) diff --git "a/\360\237\220\207 Speedtest Tracker.postman_collection.json" "b/\360\237\220\207 Speedtest Tracker.postman_collection.json" new file mode 100644 index 000000000..cd94f602d --- /dev/null +++ "b/\360\237\220\207 Speedtest Tracker.postman_collection.json" @@ -0,0 +1,62 @@ +{ + "info": { + "_postman_id": "cec84a4a-2422-4c13-bc49-3a2ee2729f62", + "name": "🐇 Speedtest Tracker", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "13492307" + }, + "item": [ + { + "name": "Speedtest (legacy)", + "item": [ + { + "name": "Get latest", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{APP_URL}}/api/speedtest/latest", + "host": [ + "{{APP_URL}}" + ], + "path": [ + "api", + "speedtest", + "latest" + ] + } + }, + "response": [] + } + ], + "description": "The `/speedtest` route is to provide legacy support for dashboards like Homepage and Organizr.\n\nThe endpoint should be considered deprecated and will be replaced in a future release." + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "APP_URL", + "value": "", + "type": "string" + } + ] +} \ No newline at end of file