Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Community showcase
Published in Opsgenie

Leveraging Atlassian’s Opsgenie and AWS Cloudformation Registry to stay ahead of incidents

In the past, managing IT infrastructure was a hard job. It required a lot of manual effort and it was hard to keep track of all the necessary information (monitoring, scalability etc). Thankfully, as...

2,386 views 0 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you