Skip to main content
GET
/
coverage_requests
/
{coverage_request_id}
Get a coverage request
curl --request GET \
  --url https://api.shiftkeeper.io/coverage_requests/{coverage_request_id} \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.shiftkeeper.io/coverage_requests/{coverage_request_id}"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.shiftkeeper.io/coverage_requests/{coverage_request_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.shiftkeeper.io/coverage_requests/{coverage_request_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 => [
"x-api-key: <api-key>"
],
]);

$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.shiftkeeper.io/coverage_requests/{coverage_request_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

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.shiftkeeper.io/coverage_requests/{coverage_request_id}")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.shiftkeeper.io/coverage_requests/{coverage_request_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "coverage_request": {
    "id": "<string>",
    "reason": "<string>",
    "user": {
      "id": "<string>",
      "name": "<string>",
      "email": "jsmith@example.com",
      "time_zone": "<string>",
      "slack_id": "<string>"
    },
    "shifts": [
      {
        "start": "2023-11-07T05:31:56Z",
        "end": "2023-11-07T05:31:56Z",
        "schedule_reference": {
          "id": "<string>",
          "name": "<string>"
        }
      }
    ],
    "accepted_by": {
      "id": "<string>",
      "name": "<string>",
      "email": "jsmith@example.com",
      "time_zone": "<string>",
      "slack_id": "<string>"
    },
    "accepted_shifts": [
      {
        "start": "2023-11-07T05:31:56Z",
        "end": "2023-11-07T05:31:56Z",
        "schedule_reference": {
          "id": "<string>",
          "name": "<string>"
        }
      }
    ]
  }
}
{
"error": {
"code": "not_found",
"status": 404,
"message": "The requested resource was not found"
}
}

Authorizations

x-api-key
string
header
required

Enter your API key which starts with 'keeper_'

Path Parameters

coverage_request_id
string
required

The ID of the coverage request.

Response

Default Response

coverage_request
object
required
Example:
{
"id": "cov_RxQottluZ1oeM47nz4bVl",
"user": {
"id": "usr_bq7CmsOKLmkMeZkUUu1hy",
"name": "Rick",
"email": "rick@example.org",
"time_zone": "Europe/Paris",
"role": "owner",
"seat": "member",
"slack_id": "U082KENSEQ3"
},
"reason": "I will be out of office during this week. Could someone jump in to cover these shifts?",
"status": "pending",
"shifts": [
{
"start": "2024-12-02T09:00:00Z",
"end": "2024-12-02T17:00:00Z",
"schedule_reference": {
"id": "sch_KR5uoK0xD0rWQoKTDqwgu",
"name": "Portal support"
}
},
{
"start": "2024-12-03T09:00:00Z",
"end": "2024-12-03T17:00:00Z",
"schedule_reference": {
"id": "sch_KR5uoK0xD0rWQoKTDqwgu",
"name": "Portal support"
}
},
{
"start": "2024-12-04T09:00:00Z",
"end": "2024-12-04T17:00:00Z",
"schedule_reference": {
"id": "sch_KR5uoK0xD0rWQoKTDqwgu",
"name": "Portal support"
}
},
{
"start": "2024-12-05T09:00:00Z",
"end": "2024-12-05T17:00:00Z",
"schedule_reference": {
"id": "sch_KR5uoK0xD0rWQoKTDqwgu",
"name": "Portal support"
}
},
{
"start": "2024-12-06T09:00:00Z",
"end": "2024-12-06T17:00:00Z",
"schedule_reference": {
"id": "sch_KR5uoK0xD0rWQoKTDqwgu",
"name": "Portal support"
}
},
{
"start": "2024-12-01T00:00:00Z",
"end": "2024-12-08T00:00:00Z",
"schedule_reference": {
"id": "sch_ldYmnBVr5o2ikebwmRRZv",
"name": "Citadel"
}
}
]
}