api.setEndpoint(new Random().nextLong()+"");
api.setStatus(Status.ACTIVE);
ProvisionAuthentication pauth = new ProvisionAuthentication();
Authkey authKey = new Authkey(); authKey.setKeyName("key");
pauth.setAuthKey(authKey);
api.setAuthentication(pauth);
pauth.getAuths().add(AuthType.AUTHKEY);
pauth.getAuths().add(AuthType.BASIC);
pauth.getAuths().add(AuthType.IP_WHITE_LIST);
TargetHost th = new TargetHost();
th.setUrl("http://www.yahoo.com");