Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

OpsGenieClient Object giving error.

Ali Raza October 4, 2022

I'm getting started with OpsGenie Api in Java, but I get the error attached below while creating the object.

Below is the code:

try
{
OpsGenieClient client = new OpsGenieClient();
AlertApi alertApi = client.alertV2();
alertApi.getApiClient().setApiKey(apiKey);
CreateAlertRequest request = new CreateAlertRequest();
request.setMessage("my testing alert is here");
SuccessResponse response = alertApi.createAlert(request);
System.out.println(response);
Float took = response.getTook();
String requestId = response.getRequestId();
String message = response.getResult();

}
catch (ApiException t)
{
t.printStackTrace();

}



error.PNG

1 answer

0 votes
Ali Raza October 5, 2022

@Nick H Kindly help me out.

Ali Raza October 5, 2022

Its fixed. 

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 5, 2022

Hi @Ali Raza ,

What was the problem / issue you were encountering?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events