urlFromKey(key) {
          // e.g., https://zz.domain.com/api/static/dddddddd/models/customer.json
          let apiHost = ctx.app.$api.host;
          let apiPort = ctx.app.$api.port;
          let apiProtocol = 'http://';
          let basePath = ctx.app.$api.baseModelPath;

          if (['443', '80'].includes(apiPort)) {
            apiProtocol = apiPort === '443' ? 'https://' : 'http://';
            apiPort = ''; // no need to specify port in final URL in this case
          }

          return `${apiProtocol}${apiHost}${apiPort ? `:${apiPort}` : ''}${basePath}/${key}.json`;
        }
/**
         * Given a model key return the corresponding API URL for the model
         * @param {string} key Model key
         */
Given a model key return the corresponding API URL for the model
@param {string} key Model key
Given a model key return the corresponding API URL for the model @param { string } key Model key
urlFromKey(key) {
          let apiHost = ctx.app.$api.host;
          let apiPort = ctx.app.$api.port;
          let apiProtocol = 'http://';
          let basePath = ctx.app.$api.baseModelPath;
          if (['443', '80'].includes(apiPort)) {
            apiProtocol = apiPort === '443' ? 'https://' : 'http://';
            apiPort = ''; 
          }
          return `${apiProtocol}${apiHost}${apiPort ? `:${apiPort}` : ''}${basePath}/${key}.json`;
        }
urlFromKey ( key ) { let apiHost = ctx . app . $api . host ; let apiPort = ctx . app . $api . port ; let apiProtocol = 'http://' ; let basePath = ctx . app . $api . baseModelPath ; if ( [ '443' , '80' ] . includes ( apiPort ) ) { apiProtocol = apiPort === '443' ? 'https://' : 'http://' ; apiPort = '' ; } return ` ${ apiProtocol } ${ apiHost } ${ apiPort ? ` ${ apiPort } ` : '' } ${ basePath } ${ key } ` ; }
Given a model key return the corresponding API URL for the model
 @param {string} key Model key
Given a model key return the corresponding API URL for the model @param { string } key Model key
// e.g., https://zz.domain.com/api/static/dddddddd/models/customer.json // no need to specify port in final URL in this case