Get Version from API #597

Closed
opened 2025-12-29 02:20:58 +01:00 by adam · 2 comments
Owner

Originally created by @GoodiesHQ on GitHub (Dec 15, 2023).

There should be some RESTful way to return the version of headscale running (ideally identical to the github tag) of the server. Since there are versions which use different endpoints (e.g. /api/v1/machines vs /api/v1/nodes), it would be nice to detect the version and know what the layout should be.

Why

Clients which interact with the API may want to support multiple versions and having some way to detect this reliably through the API. This could be an HTTP endpoint (GET /api/version), or a response header (X-Api-Version) or something similar.

Description

The only other way I have found is to get /swagger/v1/openapiv2.json and search for the endpoint's existence in there, but I'm not sure how reliable this is.

Originally created by @GoodiesHQ on GitHub (Dec 15, 2023). There should be some RESTful way to return the version of headscale running (ideally identical to the github tag) of the server. Since there are versions which use different endpoints (e.g. /api/v1/machines vs /api/v1/nodes), it would be nice to detect the version and know what the layout should be. ## Why Clients which interact with the API may want to support multiple versions and having some way to detect this reliably through the API. This could be an HTTP endpoint (GET /api/version), or a response header (X-Api-Version) or something similar. ## Description The only other way I have found is to get `/swagger/v1/openapiv2.json` and search for the endpoint's existence in there, but I'm not sure how reliable this is.
adam added the enhancementstale labels 2025-12-29 02:20:58 +01:00
adam closed this issue 2025-12-29 02:20:58 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 14, 2024):

This issue is stale because it has been open for 90 days with no activity.

@github-actions[bot] commented on GitHub (Mar 14, 2024): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 21, 2024):

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions[bot] commented on GitHub (Mar 21, 2024): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#597