Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

v2/alerts/requests/ returning 404

Joel Bradley
Contributor
December 29, 2021

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
Atlassian Team members are employees working across the company in a wide variety of roles.
December 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, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events