Get on call schedule by ID
curl --request GET \
--url https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e",
"third_party_provider": "PAGER_DUTY",
"remote_id": "P7OWH2R",
"name": "Customer Support On-Call"
}Get on call schedule by ID
Gets a OnCallSchedule object.
GET
/
on-call-schedules
/
{on_call_schedule_id}
Get on call schedule by ID
curl --request GET \
--url https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/on-call-schedules/{on_call_schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e",
"third_party_provider": "PAGER_DUTY",
"remote_id": "P7OWH2R",
"name": "Customer Support On-Call"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the on_call_schedule.
Response
200 - application/json
The requested on call schedule.
OnCallSchedule Object
Description
The OnCallSchedule object is used to represent an on call schedule.
Usage Example
Update a groups on call schedule from the UPDATE Groups endpoint.
The ID of the on-call schedule.
Example:
"50d5e9f6-f23f-4d5a-ae91-b2640cf3975e"
The third party provider of the on call schedule.
Available options:
OPSGENIE, PAGER_DUTY Example:
"PAGER_DUTY"
The remote ID of the on call schedule
Example:
"P7OWH2R"
The name of the on call schedule.
Example:
"Customer Support On-Call"
Last modified on August 27, 2026
Was this page helpful?