bawsky
bawsky2d ago

Is there a reliable/supported way to tell the Zitadel version using the API?

Usecase: I'm building a tailored Ruby SDK (with domain models, sane defaults, etc - a bit opinionated and tailored to our needs but fairly generic overall. I'm not using the official auto-generated Ruby SDK). On this project, I must know what version the Zitadel server is running, so the SDK can use the appropriate endpoints/parameters. I found out that the metrics endpoint does return the Zitadel version:
GET "/debug/metrics"

response body:
# ...
target_info{service_name="ZITADEL",service_version="v3.4.2",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="1.35.0"} 1
GET "/debug/metrics"

response body:
# ...
target_info{service_name="ZITADEL",service_version="v3.4.2",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="1.35.0"} 1
So up until now I've been relying on that endpoint to get that information (using a simple regex). Is there any other reliable/supported way to tell the Zitadel version using the API? As I understand, that endpoint can be disabled if metrics are disabled, so I suppose it's not a good idea to rely on it 😕
5 Replies
Ask Inkeep
Ask Inkeep2d ago
Hi @bawsky, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question. Answer I wasn't able to find a direct answer about an alternative API endpoint for retrieving the ZITADEL version. You're correct that the /debug/metrics endpoint can be disabled through ZITADEL's configuration (1) , making it unreliable for your use case. The metrics are enabled by default but can be turned off . The available sources don't document a dedicated version endpoint in the ZITADEL APIs (2) . For building an SDK that needs version-aware behavior, you might want to reach out to the team for guidance on the recommended approach. Check out these potentially useful sources: ZITADEL API Reference Overview , ZITADEL Metrics Would you like me to provide a general answer based on common API patterns, or would you prefer to click the "Ask for help" button to tag a team member who can provide the official recommendation? ​ To learn more, see the sources I considered: [1] ZITADEL Metrics [2] ZITADEL API Reference Overview ​ Feel free to tag @Ask Inkeep with additional questions. Got it. Tagging @Rajat for additional help.
Rajat
Rajat2d ago
hey @bawsky as of now the only way we have is via the /metrics endpoint. But I think its q nice and important feature to have, would you like to open an [issue](https://github.com/zitadel/zitadel/issues) ? I think you described it here pretty well
bawsky
bawskyOP2d ago
Oh actually it seems that it's possible to get current Zitadel version from: - v1 (deprecated): Get My Instance - v2: GetInstance Just tested the v1 (see screenshot) and it definitely works for my needs 😁 I think we can consider this resolved ✅ thanks for the help @Rajat!
No description
Gigi the Giraffe (Zitadel)
🎉 Looks like you just helped out another community member! Thanks for being so helpful <@103274474106781696>! You're now one step closer to leveling up—keep up the amazing peer support! 🚀
Rajat
Rajat2d ago
hey @bawsky thanks for pointing that out, I discussed this internally too and we didnt think further before I suggested you to open an issue. Apologies for the oversight, there's soo many endpoints and I couldnt really think of this one. Glad it worked out for you 🙂

Did you find this page helpful?