# How to programmatically read the gateway version for a TagProvider

**URL:** <https://forum.inductiveautomation.com/t/how-to-programmatically-read-the-gateway-version-for-a-tagprovider/68539>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 12, 2023, 3:03pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-the-gateway-version-for-a-tagprovider/68539 "2023-01-12T15:03:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wtb](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@wtb](https://forum.inductiveautomation.com/u/wtb)\
**Post date:** [January 12, 2023, 3:03pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-the-gateway-version-for-a-tagprovider/68539/1 "2023-01-12T15:03:24Z")

</div>

Hello, I would like to know how to programmatically obtain the version e.g 8.1.2 of a TagProviders gateway.

Kindly let me know if I need to provide any other info

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 12, 2023, 6:42pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-the-gateway-version-for-a-tagprovider/68539/2 "2023-01-12T18:42:03Z")

</div>

You're missing a lot of context.

I assume since you don't _already_ know the version, what you're actually after is the version from a _remote gateway_?

If you just care about the local gateway where your code is running, just run:  
`com.inductiveautomation.ignition.common.BundleUtil.get().getPlatformVersion()`

---

<div class="post-metadata">

**Author:** ![wtb](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@wtb](https://forum.inductiveautomation.com/u/wtb)\
**Post date:** [January 12, 2023, 6:51pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-the-gateway-version-for-a-tagprovider/68539/3 "2023-01-12T18:51:23Z")

</div>

Exactly, I am interested in the version of the remote gateway.

To provide context, I have observed that there are interoperability issues between v8.0.x gateways and v.7.x remote gateways. I want to check the local and remote versions and if there is a mismatch, log a warning to that effect.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 12, 2023, 6:59pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-the-gateway-version-for-a-tagprovider/68539/4 "2023-01-12T18:59:40Z")

</div>

Assuming you have a `GatewayContext` and a `ServerId`, you invoke the `GanNodeDetailsService` to retrieve a remote version:

```java
                    var ganNodeDetailsService = context.getGatewayAreaNetworkManager()
                        .getServiceManager()
                        .getService(serverId, GanNodeDetailsService.class)
                        .get();
                    remoteVersion = Version.parse(ganNodeDetailsService.getPlatformVersion());

```
