Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ChannaK
Contributor III
Contributor III

Personio REST API Offset pagination not loading all records

Hi All  can you help me with pagination I am trying to download data from Personio 

here is my rest URL:https://api.personio.de/v1/company/time-offs?start_date=2023-01-01&end_date=2024-12-31

document says to use offset pagination

here is my REST pagination details :

ChannaK_0-1721302554085.png

 

 

it is bringing only 200 records not sure why it is not loading all data

 

Script

LIB CONNECT TO 'Downloads:PersonioListTimeOffs';
 
RestConnectorMasterTable:
SQL SELECT 
"success",
"__KEY_root",
(SELECT 
"total_elements",
"current_page",
"total_pages",
"__FK_metadata"
FROM "metadata" FK "__FK_metadata"),
(SELECT 
"type" AS "type_u5",
"__KEY_data",
"__FK_data",
(SELECT 
"id" AS "id_u0",
"status" AS "status_u0",
"comment",
"start_date",
"end_date",
"days_count",
"half_day_start",
"half_day_end",
"created_by",
"created_at",
"updated_at",
"__KEY_attributes",
"__FK_attributes",
(SELECT 
"type",
"__KEY_time_off_type",
"__FK_time_off_type",
(SELECT 
"id",
"name",
"category",
"__FK_attributes_u0"
FROM "attributes" FK "__FK_attributes_u0")
FROM "time_off_type" PK "__KEY_time_off_type" FK "__FK_time_off_type"),
(SELECT 
"type" AS "type_u4",
"__KEY_employee",
"__FK_employee",
(SELECT 
"__KEY_attributes_u0",
"__FK_attributes_u1",
(SELECT 
"label",
"value",
"type" AS "type_u0",
"universal_id",
"__FK_id"
FROM "id" FK "__FK_id"),
(SELECT 
"label" AS "label_u0",
"value" AS "value_u0",
"type" AS "type_u1",
"universal_id" AS "universal_id_u0",
"__FK_first_name"
FROM "first_name" FK "__FK_first_name"),
(SELECT 
"label" AS "label_u1",
"value" AS "value_u1",
"type" AS "type_u2",
"universal_id" AS "universal_id_u1",
"__FK_last_name"
FROM "last_name" FK "__FK_last_name"),
(SELECT 
"label" AS "label_u2",
"value" AS "value_u2",
"type" AS "type_u3",
"universal_id" AS "universal_id_u2",
"__FK_email"
FROM "email" FK "__FK_email")
FROM "attributes" PK "__KEY_attributes_u0" FK "__FK_attributes_u1")
FROM "employee" PK "__KEY_employee" FK "__FK_employee"),
(SELECT 
"status",
"__FK_certificate"
FROM "certificate" FK "__FK_certificate")
FROM "attributes" PK "__KEY_attributes" FK "__FK_attributes")
FROM "data" PK "__KEY_data" FK "__FK_data")
FROM JSON (wrap on) "root" PK "__KEY_root";
 
[metadata]:
LOAD [total_elements],
[current_page],
[total_pages],
[__FK_metadata] AS [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_metadata]);
 
 
[attributes]:
LOAD [id],
[name],
[category],
[__FK_attributes_u0] AS [__KEY_time_off_type]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_attributes_u0]);
 
 
[time_off_type]:
LOAD [type],
[__KEY_time_off_type],
[__FK_time_off_type] AS [__KEY_attributes]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_time_off_type]);
 
 
AbsentEmployeeDetails:
LOAD [label],
[value] as [EmployeeID],
[type_u0] AS [type_u0],
[universal_id],
[__FK_id] AS [__KEY_attributes_u0]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_id]);
 
 
 
[first_name]:
LOAD [label_u0] AS [label_u0],
[value_u0] AS FirstName,
[type_u1] AS [type_u1],
[universal_id_u0] AS [universal_id_u0],
[__FK_first_name] AS [__KEY_attributes_u0]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_first_name]);
 
 
 
[last_name]:
LOAD [label_u1] AS [label_u1],
[value_u1] AS LastName,
[type_u2] AS [type_u2],
[universal_id_u1] AS [universal_id_u1],
[__FK_last_name] AS [__KEY_attributes_u0]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_last_name]);
 
 
 
[email]:
LOAD [label_u2] AS [label_u2],
[value_u2] AS Email,
[type_u3] AS [type_u3],
[universal_id_u2] AS [universal_id_u2],
[__FK_email] AS [__KEY_attributes_u0]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_email]);
 
 
 
[attributes_u0]:
LOAD [__KEY_attributes_u0],
[__FK_attributes_u1] AS [__KEY_employee]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_attributes_u1]);
 
 
 
[employee]:
LOAD [type_u4] AS [type_u4],
[__KEY_employee],
[__FK_employee] AS [__KEY_attributes]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_employee]);
 
 
[certificate]:
LOAD [status],
[__FK_certificate] AS [__KEY_attributes]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_certificate]);
 
 
[attributes_u1]:
LOAD [id_u0] AS [id_u0],
[status_u0] AS [status_u0],
[comment],
date(floor([start_date])) as StartDate,
date(floor([end_date])) as EndDate,
[days_count],
[half_day_start],
[half_day_end],
[created_by],
[created_at],
[updated_at],
[__KEY_attributes],
[__FK_attributes] AS [__KEY_data]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_attributes]);
 
 
[data]:
LOAD [type_u5] AS [type_u5],
[__KEY_data],
[__FK_data] AS [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_data]);
 
 
[root]:
LOAD [success],
[__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__KEY_root]);
 
 
DROP TABLE RestConnectorMasterTable;
Labels (5)
0 Replies