code: public static Map<String, String> newApp(String appid, String name, boolean sharedTable, boolean sharedIndex) {
  		Map<String, String> creds = new TreeMap<>();
  		creds.put("message", "All set!");
  		if (StringUtils.isBlank(appid)) {
  			return creds;
  		}
  		App app = new App(appid);
  		if (!app.exists()) {
  			app.setName(name);
  			app.setSharingTable(sharedTable);
  			app.setSharingIndex(sharedIndex);
  			app.setActive(true);
  			String id = app.create();
  			if (id != null) {
  				logger.info("Created {} app '{}', sharingTable = {}, sharingIndex = {}.",
  						app.isRootApp() ? "root" : "new", app.getAppIdentifier(), sharedTable, sharedIndex);
  				creds.putAll(app.getCredentials());
  				creds.put("message", "Save the secret key - it is shown only once!");
  			} else {
  				logger.error("Failed to create app '{}'!", appid);
  				creds.put("message", "Error - app was not created.");
  			}
  		}
  		return creds;
  	}
docs: Creates a new application and returns the credentials for it.
  @param appid the app identifier
  @param name the full name of the app
  @param sharedTable false if the app should have its own table
  @param sharedIndex false if the app should have its own index
  @return credentials for the root app