Preferred way to get C3 server version

#1

What is the preferred way to get the current, running c3-server version from the Type System? Is it via
Cluster.hosts()[0].serverInfo.buildCITag
which returns something like "7.7.4-SNAPSHOT-1"
and I would have to trim off the suffix? This seems ugly and probably wrong.

0 Likes

#2

MetadataStore.tag().repository(“server”).version

will return something like: “7.7.4”

1 Like

#3

Depending on your use case, it might also be easier to hit the REST endpoint: https://my-environment.c3iot.com/version/1/

0 Likes

#4

Thanks. I tried that out (without the https, e.g. http://localhost:8080/version/1/) and got a response:
v7.7.4-SNAPSHOT-1

0 Likes