アプリケーションを自動的にデプロイするために使用する jelastic API を使い始めています。API の呼び出しに関するすべてが簡単に思え、問題なく認証できます。
次に、展開に使用する ENV_APPID を取得したい環境のリストを取得しようとして問題に遭遇しました。
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);
コードは次の出力で完了します (機密情報は疑問符に置き換えられます)
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"}
これは明らかに私が期待するものではありません。コードは簡単です。定数に問題がありますか? (サンプル コードの PLATFORM_APPID を再利用します) 何か権限がありませんか?
ご意見ありがとうございます。