curl --request GET \
--url https://api.absentify.com/api/v1/requests/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.absentify.com/api/v1/requests/{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.absentify.com/api/v1/requests/{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.absentify.com/api/v1/requests/{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.absentify.com/api/v1/requests/{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.absentify.com/api/v1/requests/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.absentify.com/api/v1/requests/{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{
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"end": "<string>",
"start": "<string>",
"start_at": "morning",
"end_at": "lunchtime",
"leave_unit": "days",
"revision": 0,
"last_changed_at": "<string>",
"pending_change": {
"id": 0,
"revision": 0,
"kind": "reason",
"status": "pending",
"previous": {
"start": "<string>",
"end": "<string>",
"start_at": "morning",
"end_at": "lunchtime",
"leave_type": {
"id": "<string>",
"name": "<string>"
},
"duration": 123,
"workday_absence_duration": 123,
"reason": "<string>"
},
"proposed": {
"start": "<string>",
"end": "<string>",
"start_at": "morning",
"end_at": "lunchtime",
"leave_type": {
"id": "<string>",
"name": "<string>"
},
"duration": 123,
"workday_absence_duration": 123,
"reason": "<string>"
},
"changed_by": {
"id": "<string>",
"name": "<string>"
},
"decided_by": {
"id": "<string>",
"name": "<string>"
},
"created_at": "<string>",
"decided_at": "<string>",
"decision_reason": "<string>",
"cancel_reason": "<string>",
"allowance_delta": 123
},
"request_creator_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"leave_type": {
"name": "<string>",
"default_name": "<string>",
"id": "<string>",
"leave_unit": "days"
},
"details_hidden": true,
"approval_process": "Linear_all_have_to_agree",
"needs_approval": true,
"cancel_reason": "<string>",
"canceld_by_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"requester_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"take_from_allowance": true,
"allowance_type": {
"id": "<string>",
"name": "<string>",
"default_name": "<string>",
"ignore_allowance_limit": true,
"allowance_unit": "days"
},
"reason": "<string>",
"workday_absence_duration": 123,
"duration": 123,
"status": "<string>",
"canceld_date": "<string>",
"request_approvers": [
{
"reason": "<string>",
"status": "PENDING",
"status_changed_by_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"status_changed_date": "<string>",
"approver_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"predecessor_request_member_approver_id": "<string>"
}
],
"request_representative_approvers": [
{
"uuid": "<string>",
"reason": "<string>",
"status": "PENDING",
"status_changed_by_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"status_changed_date": "<string>",
"approver_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"replaced_to_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"replaced_after_decline": true
}
]
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Read a request by id
Read a request by id. Answers null when the caller may not see it.
Admins see every request. Any other caller, such as a Power Automate user, sees what the web shows them: their own requests and those of colleagues they may see (the department rules, the workspace setting for other departments and for past absences). A colleague’s request with a private leave type comes back as the placeholder Absent without its details (details_hidden is true), and a colleague gets only approved and pending requests, not declined or canceled ones.
duration and workday_absence_duration are computed at the time of the call, from the member’s current schedule and holiday calendar. Both are 0 on a row with details_hidden.
curl --request GET \
--url https://api.absentify.com/api/v1/requests/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.absentify.com/api/v1/requests/{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.absentify.com/api/v1/requests/{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.absentify.com/api/v1/requests/{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.absentify.com/api/v1/requests/{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.absentify.com/api/v1/requests/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.absentify.com/api/v1/requests/{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{
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"end": "<string>",
"start": "<string>",
"start_at": "morning",
"end_at": "lunchtime",
"leave_unit": "days",
"revision": 0,
"last_changed_at": "<string>",
"pending_change": {
"id": 0,
"revision": 0,
"kind": "reason",
"status": "pending",
"previous": {
"start": "<string>",
"end": "<string>",
"start_at": "morning",
"end_at": "lunchtime",
"leave_type": {
"id": "<string>",
"name": "<string>"
},
"duration": 123,
"workday_absence_duration": 123,
"reason": "<string>"
},
"proposed": {
"start": "<string>",
"end": "<string>",
"start_at": "morning",
"end_at": "lunchtime",
"leave_type": {
"id": "<string>",
"name": "<string>"
},
"duration": 123,
"workday_absence_duration": 123,
"reason": "<string>"
},
"changed_by": {
"id": "<string>",
"name": "<string>"
},
"decided_by": {
"id": "<string>",
"name": "<string>"
},
"created_at": "<string>",
"decided_at": "<string>",
"decision_reason": "<string>",
"cancel_reason": "<string>",
"allowance_delta": 123
},
"request_creator_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"leave_type": {
"name": "<string>",
"default_name": "<string>",
"id": "<string>",
"leave_unit": "days"
},
"details_hidden": true,
"approval_process": "Linear_all_have_to_agree",
"needs_approval": true,
"cancel_reason": "<string>",
"canceld_by_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"requester_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"take_from_allowance": true,
"allowance_type": {
"id": "<string>",
"name": "<string>",
"default_name": "<string>",
"ignore_allowance_limit": true,
"allowance_unit": "days"
},
"reason": "<string>",
"workday_absence_duration": 123,
"duration": 123,
"status": "<string>",
"canceld_date": "<string>",
"request_approvers": [
{
"reason": "<string>",
"status": "PENDING",
"status_changed_by_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"status_changed_date": "<string>",
"approver_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"predecessor_request_member_approver_id": "<string>"
}
],
"request_representative_approvers": [
{
"uuid": "<string>",
"reason": "<string>",
"status": "PENDING",
"status_changed_by_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"status_changed_date": "<string>",
"approver_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"replaced_to_member": {
"id": "<string>",
"custom_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"replaced_after_decline": true
}
]
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Pfadparameter
Antwort
Successful response
The unit stored on this request. It governs duration and workday_absence_duration: day and half-day units use days; hour and minute units use minutes. It may differ from leave_type.leave_unit after the leave type changes.
days, half_days, hours, minutes_30, minutes_15, minutes_10, minutes_5, minutes_1 Null when the caller may not see it. Admins, the requester, the one who cancelled, the approvers, the representatives and the department manager of the requester always see it, and nobody sees it on a private leave type unless they may see its details. Webhooks always carry it.
Null when the caller may not see it. Admins always see it, and so do the requester, the creator, the approvers, representatives who may see the request and the department manager of the requester; everybody else only when the leave type makes reasons public and is not private. Webhooks always carry it.
Counted duration, the value absentify shows: the working time the absence takes, based on the work schedule and public holidays, unless the leave type also counts days off or public holidays. Days for day and half-day leave units, minutes for hour and minute units. If the leave type deducts from an allowance, this is the amount the absence takes from it, or for a proposed change, would take once the change applies. Canceled and declined requests keep the value but take nothing from the allowance.
War diese Seite hilfreich?