OpsGenie - List Schedules using REST API

by
Jeremy Canfield |
Updated: October 21 2024
| OpsGenie articles
Here is an example of how to submit a GET request to api.opsgenie.com using curl for Schedules.
curl --request GET --header 'Authorization: GenieKey 6760afa9-5a94-4b45-bd77-54752d4d5292' --url https://api.opsgenie.com/v2/schedules
If you know the UUID of the schedule you want to return, you can include the UUID in the GET request.
curl --request GET --header 'Authorization: GenieKey 6760afa9-5a94-4b45-bd77-54752d4d5292' --url https://api.opsgenie.com/v2/schedules/0847efce-c378-48cb-8b74-f5bb514090e7
Which should return JSON that looks something like this.
{
"data": [
{
"description": "My Schedule",
"enabled": true,
"id": "0847efce-c378-48cb-8b74-f5bb514090e7",
"name": "My Schedule",
"ownerTeam": {
id": "29eb4194-7a9f-4b3a-87b3-4949707ddc01",
"name": "Parent Schedule",
},
"rotations": [],
"timezone": "America/Chicago"
}
]
}
Did you find this article helpful?
If so, consider buying me a coffee over at