Configuring a Unified Doc URL

You can configure a unified documentation URL for all applications that use REST services that are running in a single AppSpace. Alternatively, the documentation URL can be configured for each AppNode in an AppSpace.

Documentation endpoint configuration properties can be specified at the AppSpace or the AppNode level. The details specified at the AppSpace level apply to all applications running on all AppNodes within the AppSpace. Properties set at the AppNode level only apply to applications running on that AppNode.

Properties are configured in the AppSpace or AppNode configuration file or configuration template file.

Procedure

  1. To set documentation endpoint properties at the AppSpace level:
    1. Copy the existing AppSpace configuration template file appspace_config.ini_template (located in BW_HOME/config/) to a temporary location.
    2. Uncomment and configure the following properties in the BW REST Swagger Configuration section of the file:
      # ------------------------------------------------------------------------------
      # Section:  BW REST Swagger Configuration.  The properties in this section
      # are applicable to the Swagger framework that is utilized by the BW REST 
      # Binding.
      #
      # Note: There are additional BW REST Swagger configuration properties that
      # can be specified in the BW AppNode configuration file "config.ini".  Refer to
      # the BW AppNode configuration file's section "BW REST Swagger configuration" 
      # for details. 
      # ------------------------------------------------------------------------------
      # Swagger framework reverse proxy host name.  This property is optional and 
      # it specifies the reverse proxy host name on which Swagger framework serves 
      # the API's, documentation  endpoint, api-docs, etc.. 
      #bw.rest.docApi.reverseProxy.hostName=localhost
      
      # Swagger framework port.  This property is optional and it specifies the 
      # reverse proxy port on which Swagger framework serves the API's, documentation
      # endpoint, api-docs, etc.
      #bw.rest.docApi.reverseProxy.port=0000
  2. To set documentation endpoint properties at the AppNode level:
    1. Copy the existing AppNode config.ini file (located in the root of the AppNode folder), or the appnode_config.ini_template (located in BW_HOME/config/) file, to a temporary location.
    2. Configure the following properties in the BW REST Swagger Configuration section of the file (note that the port property is uncommented by default):
      # ------------------------------------------------------------------------------
      # Section:  BW REST Swagger configuration.  The properties in this section
      # are applicable to the Swagger framework that is utilized by the BW REST 
      # Binding.
      #
      # Note: There are additional BW REST Swagger configuration properties that
      # can be specified in the BW AppSpace configuration file "config.ini".  
      # Refer to the BW AppSpace configuration file's section 
      # "BW REST Swagger configuration" for details. 
      # ------------------------------------------------------------------------------
      # Swagger framework host name.  This property is optional and it specifies the 
      # host name on which Swagger framework serves the API's, documentation endpoint, 
      # api-docs, etc..  The default value is the host name on which the BW AppNode 
      # is executed. 
      #bw.rest.docApi.hostName=localhost
      
      # Swagger framework port.  This property is required and it specifies the port
      # on which Swagger framework serves the API's, documentation endpoint, 
      # api-docs, etc.. 
      bw.rest.docApi.port=7777
      
  3. Use one of the following config admin commands to push the configuration to the AppSpace or the AppNode:
    • AppSpace:
      bwadmin[admin] > config -d myDomain -a myAppSpace -cf 
      				<temporaryLocation>/config.ini
    • AppNode:
      bwadmin[admin]> config –d myDomain –a myAppSpace –n myAppNode –cf <temporaryLocation>/config.ini

Result

Documentation for all applications in the AppSpace that use REST services is available at the given URL. You can open the documentation URL by clicking the REST Doc URL link for the running application in the Admin UI or by opening the URL at the specified host name and port. The application must contain REST services and must be running. If you configured the documentation URL just for the AppNode, the documentation for applications running in the specified AppSpace will be available at the given URL.