# Get Migration ID programmatically?

**URL:** <https://forum.canton.network/t/get-migration-id-programmatically/8360>\
**Category:** App Development\
**Tags:** canton-network\
**Created:** [January 6, 2026, 8:42pm UTC](https://forum.canton.network/t/get-migration-id-programmatically/8360 "2026-01-06T20:42:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [January 6, 2026, 8:42pm UTC](https://forum.canton.network/t/get-migration-id-programmatically/8360/1 "2026-01-06T20:42:03Z")

</div>

How can I programmatically get the Migration ID from my validator node?

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [January 6, 2026, 8:42pm UTC](https://forum.canton.network/t/get-migration-id-programmatically/8360/2 "2026-01-06T20:42:08Z")

</div>

The Migration ID is included in the GET response of `/v0/scan-proxy/dso` of the Scan Proxy API:

```sh
curl --silent \
  http://wallet.localhost:2000/api/validator/v0/scan-proxy/dso \
  --header 'Authorization: Bearer eyJhbGciOi...' \
  | jq --raw-output '.sv_node_states[0].contract.payload.state.synchronizerNodes[0][1].sequencer.migrationId'

```

---

<div class="post-metadata">

**Author:** ![mitesh.mistry](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@mitesh.mistry](https://forum.canton.network/u/mitesh.mistry)\
**Post date:** [October 21, 2026, 10:02am UTC](https://forum.canton.network/t/get-migration-id-programmatically/8360/3 "2026-10-21T10:02:05Z")

</div>

Since major upgrades now happen through Logical Synchronizer Upgrades (LSUs) instead of hard migrations, the migration ID won’t change again. On MainNet it’s 4 and will stay 4, so the simplest and most stable approach is to hard-code it.

The value differs by network:

- **MainNet:** 4, permanently (MainNet is never reset).

- **DevNet and TestNet:** currently 1. It could go back to 0 if those networks are ever reset, but that hasn’t been decided.
