code: function (serverUrl, apiLocation) {
              // check if given partial ...
              var p = serverUrl.indexOf("/api");
              if (p === -1) {
                  if (serverUrl.lastIndexOf("/") !== (serverUrl.length - 1)) {
                      serverUrl += "/";
                  }
                  serverUrl += "api/" + apiLocation;
              }
              else {
                  // given another api, chop and replace with requested api
                  serverUrl = serverUrl.substr(0, p) + "/api/" + apiLocation;
              }
              return serverUrl;
          }
docs: Get the url to a ScriptX.Services api endpoint. If an enpoint is already present, it is replaced.
  
  @function makeApiEndPoint
  @memberof MeadCo
  @param {string} serverUrl url to the server
  @param {string} apiLocation the api, e.g. v1/printhtml
  @returns {string} url to the api