5
Endpoints
Jordon Brooks edited this page 2023-06-26 21:14:37 +01:00
Table of Contents
Are You There
A simple endpoint that checks if the server is up and running.
- URL:
/v1/are_you_there
- Method:
GET
- Response: A simple "yes" response.
All Info
Returns a JSON object containing information about various aspects of the system, including OS, battery, dock, and version information.
- URL:
/v1/all_info
- Method:
GET
- Response Description:
os
: A JSON object containing the operating system informationbattery
: A JSON object containing the battery status informationdock
: A JSON object containing the dock informationversion
: A JSON object containing the version information of the server application
- Sample Response:
{ "os": { "platform": "WINDOWS", "name": "Windows 11 Core", "version": "10.0.22621", "bits": "X86_64" }, "battery": { "has_battery": false, "battery_percent": 0, "charging_status": "UNKNOWN" }, "dock": { "dock_info": { "brand": "", "model": "", "usb_ids": [] }, "is_docked": true, "fallback_detection": false }, "version": { "build_timestamp": "2023-06-25T22:42:16.697662700Z", "git_branch": "feature/Versioned_API", "git_describe": "release_1.0.0-11-gba6bde2", "git_commit_timestamp": "2023-06-25T12:38:11.000000000+01:00", "debug": true, "version": "0.1.0", "version_major": 0, "version_minor": 1, "version_patch": 0, "version_pre": "", "supported_api_versions": ["v1"] } }
OS Info
Returns a JSON object containing information about the operating system.
- URL:
/v1/os_info
- Method:
GET
- Response Description:
platform
: The type of operating system, e.g., "WINDOWS"name
: The name of the operating system, e.g., "Windows 11 Core"version
: The version of the operating systembits
: The bit architecture of the operating system, e.g., "X86_64"
- Sample Response:
{ "platform": "WINDOWS", "name": "Windows 11 Core", "version": "10.0.22621", "bits": "X86_64" }
Battery Info
Returns a JSON object containing information about the battery status.
- URL:
/v1/battery_info
- Method:
GET
- Response Description:
has_battery
: A boolean indicating whether the device has a batterybattery_percent
: The percentage of battery remainingcharging_status
: The charging status of the battery, can be "UNKNOWN", "BATTERY", "CHARGING"
- Sample Response:
{ "has_battery": false, "battery_percent": 0, "charging_status": "UNKNOWN" }
Version Info
Returns a JSON object containing information about the version of the server application.
- URL:
/v1/version_info
- Method:
GET
- Response Description:
build_timestamp
: The timestamp when the current server build was createdgit_branch
: The git branch name associated with the current buildgit_describe
: Description provided through git for the current buildgit_commit_timestamp
: The timestamp when the current git commit was madedebug
: A boolean indicating whether the current build is a debug versionversion
: The version number of the server applicationversion_major
: The major version numberversion_minor
: The minor version numberversion_patch
: The patch version numberversion_pre
: Any pre-release version informationsupported_api_versions
: An array containing the versions of the API that are currently supported
- Sample Response:
{ "build_timestamp": "2023-06-25T22:42:16.697662700Z", "git_branch": "feature/Versioned_API", "git_describe": "release_1.0.0-11-gba6bde2", "git_commit_timestamp": "2023-06-25T12:38:11.000000000+01:00", "debug": true, "version": "0.1.0", "version_major": 0, "version_minor": 1, "version_patch": 0, "version_pre": "", "supported_api_versions": ["v1"] }
Dock Info
Returns a JSON object containing information about the dock.
- URL:
/v1/dock_info
- Method:
GET
- Response Description:
dock_info
: A JSON object containing information about the dockbrand
: The brand of the dockmodel
: The model of the dockusb_ids
: An array containing the USB IDs associated with the dock
is_docked
: A boolean indicating whether the device is currently dockedfallback_detection
: A boolean indicating whether fallback detection is being used for the dock
- Sample Response:
{ "dock_info": { "brand": "", "model": "", "usb_ids": [] }, "is_docked": true, "fallback_detection": false }
Supported Versions
Returns an array containing the versions of the API that are currently supported.
- URL:
/api/supported_versions
- Method:
GET
- Sample Response:
["v1"]