code: private String addTenantParam(String uri) {
          if (m_credentials != null && m_credentials.getTenant() != null) {
              if (uri.indexOf("?") > 0) {
                  return uri + "&tenant=" + m_credentials.getTenant();
              } else {
                  return uri + "?tenant=" + m_credentials.getTenant();
              }
          }
          return uri;
      }
docs: "?tenant={tenant}" or "&tenant={tenant}" to the given URI.