Retrieving the latest snapshot

We publish maven artifacts to the release repository (for releases), and to the snapshot repository (for snapshots ie merge build)

I can get the latest version of a released artifact using something like

http://repository.sonatype.org/service/local/artifact/maven/redirect/?r\=central-proxy\&g\=org.odpi.egeria\&a\=egeria-connector-xtdb\&v\=LATEST\&c\=jar-with-dependencies

However I can’t seem to do this for snapshots - it does not work ie:

wget http://repository.sonatype.org/service/local/artifact/maven/redirect\?r\=snapshots\&g\=org.odpi.egeria\&a\=egeria-connector-xtdb\&v\=LATEST\&c\=jar-with-dependencies

I would like to retrieve the latest snapshot (I am aware of the limitations ie it could be older version etc)

The files look ok on the repo - for example right now the file I would expect the above to resolve to is

https://oss.sonatype.org/service/local/repositories/snapshots/content/org/odpi/egeria/egeria-connector-xtdb/4.0-SNAPSHOT/egeria-connector-xtdb-4.0-20230316.072650-4-jar-with-dependencies.jar

How do I correctly construct the query for this?

Any tips on this?