Get Migration ID programmatically?

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

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

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'
2 Likes