Skip to main content
GET
/
api
/
v3
/
workcycleExceptions
List WorkCycleExceptions.
curl --request GET \
  --url https://{host}/api/v3/workcycleExceptions \
  --header 'Authorization: <authorization>'
import requests

url = "https://{host}/api/v3/workcycleExceptions"

headers = {"Authorization": "<authorization>"}

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<authorization>'}};

fetch('https://{host}/api/v3/workcycleExceptions', 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://{host}/api/v3/workcycleExceptions",
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: <authorization>"
],
]);

$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://{host}/api/v3/workcycleExceptions"

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

req.Header.Add("Authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{host}/api/v3/workcycleExceptions")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{host}/api/v3/workcycleExceptions")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "count": 1,
    "items": [
      {
        "id": 2,
        "ownerId": 2,
        "isAm": true,
        "startsAt": "2023-11-07T05:31:56Z",
        "duration": "<string>",
        "name": "<string>",
        "url": "<string>",
        "owner": {
          "id": 2,
          "name": "<string>",
          "url": "<string>",
          "firstName": "<string>",
          "lastName": "<string>"
        },
        "endsAt": "2023-11-07T05:31:56Z",
        "durationInMinutes": 1,
        "authorId": 1,
        "createdAt": "2023-11-07T05:31:56Z",
        "modifierId": 1,
        "modifiedAt": "2023-11-07T05:31:56Z",
        "deletedById": 1,
        "deletedAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}
{
"Status": 401,
"Message": "Unauthorized"
}
{
"Status": 401,
"Message": "Unauthorized"
}
{
"Status": 401,
"Message": "Unauthorized"
}
{
"Status": 401,
"Message": "Unauthorized"
}

Headers

Authorization
string
required

API key. Value must be formatted like so: lucca application={api_key}.

Query Parameters

fields
enum<string>[]

List the properties you want included in the response. Example: ?fields=id,ownerId,isAm,startsAt,duration,unit,createdAt,modifiedAt,deletedAt,collection.count

The collection.count field indicates the total number of items across all pages.

Available options:
id,
name,
url,
ownerId,
owner.id,
owner.name,
owner.url,
owner.firstName,
owner.lastName,
isAm,
unit,
startsAt,
endsAt,
durationInMinutes,
duration,
authorId,
createdAt,
modifierId,
modifiedAt,
deletedById,
deletedAt,
collection.count
Example:
[
"id",
"ownerId",
"isAm",
"startsAt",
"duration",
"unit",
"createdAt",
"modifiedAt",
"deletedAt"
]
id
integer<int32>[]

Retrieve WorkCycleExceptions that match one of the given IDs (comma separated list).

Required range: x >= 1
ownerId
integer<int32>[]

Only retrieve WorkCycleExceptions that apply to one of the given employees, identified by their ID (comma separated list of int).

Required range: x >= 1
isAm
boolean

Filter on the isAm property.

  • true: the workcycleException applies to the first half-day.
  • false: the workcycleException applies to the second half-day. Omit this query parameter in order to retrieve all workcycleExceptions, whether they apply to the first or the second half-day.
startsAt
string

Only retrieve items that match the given date condition.

  • ?startsAt=between,{date1},{date2}: items that intersect the {date1}- {date2} period.
  • ?startsAt=since,{date}: items that occur after (non-strict) the given {date}.
  • ?startsAt=until,{date}: items that occur before (non-strict) the given {date}.
Examples:

"between,2023-01-01,2023-12-31"

"since,2023-01-01"

"until,2023-12-31"

deletedAt
enum<string>
  • null (default): do no include deleted WorkCycleExceptions.
  • notequal,null: only retrieve deleted WorkCycleExceptions.
  • no param: retrieve both deleted and non-deleted WorkCycleExceptions.
Available options:
notequal,null,
null
unit
enum<integer>

Only retrieve WorkCycleExceptions whose unit match one of the given.

A (work) event can be defined in one of 3 units. The unit must conform to the one defined by the applicable work-cycle of the given employee for the given date.

  • 0: "days", the event duration is defined as a fraction of a (work) day.
  • 1: "hours", the event duration is defined as a number of hours.
  • 2: "time", the event duration is defined as a number of hours, at the time component of the startsAt property indicates the starting time.
Available options:
0,
1,
2
paging
string

Syntax: {index},{pageSize} Index is the position of the first item to retrieve. PageSize is the number of items per page. Note: Page size cannot exceed 1,000. For example, to retrieve the first 100 items: ?paging=0,100, then to retrieve the 100 next: ?paging:100,100

orderBy
enum<string>[]

Sort items by ascending or descending property value. Syntax is: {propertyName},{direction} where direction can either be asc (ascending) or desc (descending).

Available options:
id,asc,
id,desc,
startsAt,asc,
startsAt,desc

Response

OK

data
object