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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,559,735
Community Members
 
Community Events
185
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
Atlassian Team members are employees working across the company in a wide variety of roles.
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
AUG Leaders

Atlassian Community Events