Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,962
Community Members
 
Community Events
168
Community Groups

v2/alerts/requests/ returning 404

Hi,

So recently my requests sent to https://api.opsgenie.com/v2/alerts/requests/ are returning 404 errors.

If I don't include the authorization header I get could not authenticate, requests I send to https://api.opsgenie.com/v2/alerts/ work fine, and it worked okay last week.

No valid request id is working.

{
var uri = $"https://api.opsgenie.com/v2/alerts/requests/{requestId}";
client.Headers.Add(HttpRequestHeader.Authorization, genieKey);
request = client.DownloadString(uri);
}

I'm not sure what I'm doing wrong.

1 answer

0 votes
Connor Eyles Atlassian Team Dec 30, 2021

Hi @Joel Bradley 

Thanks for reaching out!

So in relation to this REST call https://docs.opsgenie.com/docs/alert-api#get-request-status

The Get Request Status endpoint is used to track the status and alert details (if any) of the request whose identifier is given.

I would like to point out I am not a C# specialist but in best efforts provide some information that may help you with your troubleshooting here. What I can do is share an example for this request using C# - RestSharp

using RestSharp;

using RestSharp.Authenticators;

var client = new RestClient("https://api.opsgenie.com/v2/alerts/requests/913fb485-2a30-4b03-b9cb-6207599669d9");

client.Timeout = -1;

var request = new RestRequest(Method.GET);

request.AddHeader("Authorization", "GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889");

IRestResponse response = client.Execute(request);

Console.WriteLine(response.Content);

Something I have noticed from your code is that your genieKey is not enclosed with "" like it is in my example code. You could try that and see if it works on your end!

Let me know how you go with this one or have any follow up questions.

Thanks,

Connor

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events