I am getting started with jelastic API which I intend to use to automatically deploy applications. Everyting about calling the api seems straight forward, and I am able to authenticate without problems.
Then I ran into problems trying to get list of environments from which I hope to get ENV_APPID to use for deployment:
String PLATFORM_APPID = "1dd8d191d38fff45e62564fcf67fdcd6";
String HOSTER_URL = "https://app.jelastic.dogado.eu";
String USER_EMAIL = "??";
String USER_PASSWORD = "??";
AuthenticationResponse authenticationResponse = authenticationService.signin(USER_EMAIL, USER_PASSWORD);
System.out.println("Signin response: " + authenticationResponse);
if (!authenticationResponse.isOK()) {
System.exit(authenticationResponse.getResult());
}
final String session = authenticationResponse.getSession();
System.out.println("Getting environments list...");
EnvironmentInfoResponses environmentInfoResponses = environmentService.getEnvs(PLATFORM_APPID, session);
System.out.println("GetEnvs response: " + environmentInfoResponses);
The code completes with following output (sensitive information is replaced with question mark)
Authenticate user...
Signin response: {"uid":??,"result":0,"session":"5935x8f7c158de1f65562015a09f1aa0c99fd","email":"??","data":{"lang":"en"}}
Getting environments list...
GetEnvs response: {"result":15,"source":"hx-core","error":"system application is not allowed"}
This is obviously not what I expect. The code is easy; Am I having problem with constants ? (I reuse PLATFORM_APPID from sample code) Am I missing some kind of permission?
Thanks for any input.