Hi togehter,
i have a custom report that i get from personio. I want to count ne number of active users and the number of inactive users.
the output from Personio is like this:
[
{
"body": {
"success": true,
"metadata": {
"total_elements": 63,
"current_page": 1,
"total_pages": 1
},
"offset": 0,
"limit": 0,
"data": [
{
"type": "Report",
"attributes": {
"id": "f2abd3f1-70e2-4bc4-80e2-719812abbb00",
"name": "Fluctuation Rate",
"description": "",
"author_first_name": "Kay",
"author_last_name": "Dollt",
"type": "timeframe",
"status": "up_to_date",
"start_date": "2024-08-01",
"end_date": "2024-08-31",
"created_at": "2024-08-22T08:45:03Z",
"updated_at": "2024-08-22T08:47:21.918177Z",
"data_refreshed_at": "2024-08-22T08:47:22Z",
"columns": [
"first_name",
"last_name",
"dynamic_11044633",
"dynamic_11044636",
"status"
],
"filters": [],
"period_type": "this_month",
"items": [
{
"employee_id": 14943384,
"attributes": [
{
"attribute_id": "first_name",
"data_type": "TEXT",
"employee_id": 14943384,
"value": "Romina"
},
{
"attribute_id": "last_name",
"data_type": "TEXT",
"employee_id": 14943384,
"value": "Degin"
},
{
"attribute_id": "status",
"data_type": "TEXT",
"employee_id": 14943384,
"value": "inactive"
}
]
}
],
"archival_status": "live",
"archived_at": null
}
}
]
},
"headers": {
"date": "Thu, 22 Aug 2024 09:24:39 GMT",
"content-type": "application/json",
"transfer-encoding": "chunked",
"connection": "close",
"vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Accept-Encoding, Origin",
"x-ratelimit-remaining": "19, 59",
"x-ratelimit-requested-tokens": "1",
"x-ratelimit-burst-capacity": "20",
"x-ratelimit-replenish-rate": "5",
"server": "nginx",
"x-is-preview": "false",
"x-is-shadow": "false",
"cache-control": "no-cache, private",
"x-ratelimit-limit": "60",
"authorization": "Bearer papi-D0Q0eRazUThkZdWeRmni0AHP5GeBELWQeJ9Iu4FWJfLYQEl0Sj-Ye4y1yuwg2NKlNMf1Ve1YuIoWiTdgoPi5dQ",
"x-frame-options": "DENY",
"content-security-policy": "frame-ancestors 'none'",
"strict-transport-security": "max-age=31536000",
"set-cookie": [
"personio_session=eyJpdiI6IkJubSsxTmI1OE5iSE0xbjZYQmZSd1E9PSIsInZhbHVlIjoiM1phekpvYVFnam1vcGRqYmJJQXorMndiWWh0Wk91YXlyVGRaR29HUnVvZU5EcDNZcEhmNFpwbytHL0RESkIxUFZXcU1uc0phajV3Rk1JL1VMOFgyMjV1dkIwaDBNSjVpL1VTYllrZENSRm5WYktpTzFPYStha1A2Z2RtUFY3UXIiLCJtYWMiOiJiNWQwYTg5MjE2OGZiZWNjYjFkYzg2N2UwYThkNGNiNzJmOTcxNzI1Mjg4Mjk0YzNiMjgwYzY2NGM5ODViZjgyIiwidGFnIjoiIn0%3D; expires=Thu, 22 Aug 2024 19:24:39 GMT; Max-Age=36000; path=/; domain=.personio.de; secure; httponly; samesite=lax"
],
"x-xss-protection": "1; mode=block",
"x-content-type-options": "nosniff",
"report-to": "{\"group\":\"csp-endpoint\",\"max_age\":31536000,\"endpoints\":[{\"url\":\"/csp-reports\"}],\"include_subdomains\":true}"
},
"statusCode": 200
}
]