How to get a URL to download Mid Server installer

Before London release, it was very easy to get that link. You had to go MidServer and Downloads and copy the link for the appropriate operating system. And you could use it as an address for your curl command.

But since London, you get a not very helpful address:

https://<YOUR_INSTANCE_NAME>.service-now.com/mid_server_download_ui.do#

As a workaround, you can use the below script to get a correct URI for your operating system. You can use one of the following attributes for the function getMidServerUri: ‘osx64’, ‘linux32’, ‘linux64’, ‘windows32’, ‘windows64’.

function getMidServerUri(osType) {
    var buildstamp = gs.getProperty('mid.buildstamp');
    var packages = {
        linux32: new MIDPackage('mid', buildstamp, 'linux', 'x86-32'),
        linux64: new MIDPackage('mid', buildstamp, 'linux', 'x86-64'),
        windows32: new MIDPackage('mid', buildstamp, 'windows', 'x86-32'),
        windows64: new MIDPackage('mid', buildstamp, 'windows', 'x86-64'),
        osx64: new MIDPackage('mid', buildstamp, 'osx', 'x86-64')
    };
    var pack = packages[osType];
    var uri = new MIDPackageUriFactory(pack, 'attachment_download').getUris(1)[0];
    gs.info(uri);
}
getMidServerUri('osx64')
*** Script: https://install.service-now.com/glide/distribution/builds/package/mid/2018/12/04/mid.london-06-27-2018__patch4-11-21-2018_12-04-2018_1527.osx.x86-64.zip

Leave a Reply

Your email address will not be published. Required fields are marked *