Web API URL enhancements

You can specify the Web API URL in the following ways:

  1. Each client app now will contain an apprun.json configuration file. This file tells the client app where to download the launcher and runtime and where to connect with the Web APIs.

    {
        "deployment_urls": {
            "launcher": "CloudAppPublisher/CloudAppInstall 22.0",
            "runtime": "CloudAppPublisher/runtime/22.1.0.2670",
            "web_api": "http://localhost:5099"
        }
    }

    The launcher URL and the runtime URL can be a short address (without including the site URL) or a complete URL address (including the site URL).

    The Web API URL must be a complete URL address. If the Web APIs is published to the web root directly, then the site URL is used as the Web API URL. If the Web APIs is placed into a sub-folder and the sub-folder is converted to an IIS sub-app, then the Web API URL must include sub-folder name.

  2. The Web API URL can be set via the PowerBuilder SetPowerServerURL function at application runtime.

    After you set the URL (via SetPowerServerURL), you must manually create the session (via BeginSession). And after the session is created, the URL cannot be changed any more via SetPowerServerURL until the session is ended.

    Note: for BeginSession to take effect, you must select the "Dynamic session parameters" option in the Application Properties | PowerServer tab.

    String strURL
    strURL = string("http://172.16.5.175:5099")
    GetApplication().SetPowerServerURL(strURL)
    GetApplication().BeginSession()