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,556,452
Community Members
 
Community Events
184
Community Groups

Find all of the Service ID's for Opsgenie

I have an interesting question.  My team is kind of Service crazy for Opsgenie, we have over 20 of them and might create more in the future.  Even though I can apparently add as many Services as I want in Opsgenie itself, I also have a python script I use to requires the ID as part of the automation.  I've been able to use Reqbin to run a curl command utilizing the syntax for the List command found here (https://docs.opsgenie.com/docs/service-api) with our API key to view these.

My problem is that there appears to be a max number of services I can view now (20).  So I can see all the applicable information for Services that were existing, but anything new I can't.  The only workaround I have is to delete an existing Service and a new on appears.  The Services are definitely saved in Opsgenie and available in the drop down menu, but I also need the ID so I can just my scripts.  Does anyone have an idea what to do here?  Maybe a different API tool?  I don't see a way to change any settings in Reqbin and unless I'm missing something, there's no easy way to see what the ID is directly from Opsgenie > Settings or Services.

Thank you!

 

1 answer

1 accepted

0 votes
Answer accepted
John M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2023

Hi @Doug Garcia ,

The list services API does limit to 20 services by default but you can get up to 100 by changing the 'limit' parameter. Here is what that looks like:

https://api.opsgenie.com/v1/services?limit=100

You can also see the service ID in the URL bar from the service's page:

2023-05-22_17-03-57.png

Duh... thanks a ton John.  That did what I needed.  So appreciate the answer.

Like John M likes this
Wei Wung
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 23, 2023

just to add to what John shared, if you more than a page of responses, you can use pagination to view the next page of responses.

For example, this will give you the next set of 100 if there are more than 100 services:

https://api.opsgenie.com/v1/services?offset=100&limit=100

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events