Get Report on Identified Absences timeman.timecontrol.reports.get
Scope:
timemanWho can execute the method: any user with report viewing permission
The method timeman.timecontrol.reports.get retrieves a report on identified absences.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
USER_ID* |
User ID for whom the reports are requested. You can obtain the user ID using the user.get method. |
|
MONTH* |
Month number |
|
YEAR* |
Year |
|
IDLE_MINUTES |
Maximum time of absence at the workplace that is not counted as absence. This parameter is available to the manager and administrator. If not specified, the time from the module settings is used. |
|
WORKDAY_HOURS |
Duration of the workday in hours. Default is 8 hours. |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"USER_ID":3,"MONTH":5,"YEAR":2025,"IDLE_MINUTES":15,"WORKDAY_HOURS":8}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/timeman.timecontrol.reports.get
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"USER_ID":3,"MONTH":5,"YEAR":2025,"IDLE_MINUTES":15,"WORKDAY_HOURS":8,"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/timeman.timecontrol.reports.get
try
{
const response = await $b24.callMethod(
'timeman.timecontrol.reports.get',
{
'USER_ID': 3,
'MONTH': 5,
'YEAR': 2025,
'IDLE_MINUTES': 15,
'WORKDAY_HOURS': 8
}
);
const result = response.getData().result;
console.info(result);
}
catch( error )
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'timeman.timecontrol.reports.get',
[
'USER_ID' => 3,
'MONTH' => 5,
'YEAR' => 2025,
'IDLE_MINUTES' => 15,
'WORKDAY_HOURS' => 8
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
echo 'Info: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error getting time control reports: ' . $e->getMessage();
}
BX24.callMethod(
'timeman.timecontrol.reports.get',
{
'USER_ID': 3,
'MONTH': 5,
'YEAR': 2025,
'IDLE_MINUTES': 15,
'WORKDAY_HOURS': 8
},
function(result) {
if (result.error()) {
console.error(result.error());
} else {
console.info(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'timeman.timecontrol.reports.get',
[
'USER_ID' => 3,
'MONTH' => 5,
'YEAR' => 2025,
'IDLE_MINUTES' => 15,
'WORKDAY_HOURS' => 8
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP Status: 200
{
"result": {
"report": {
"month_title": "May",
"date_start": "2025-05-01T00:00:00+02:00",
"date_finish": "2025-05-31T23:59:59+02:00",
"days": [
{
"index": "20250526",
"day_title": "05/26/2025",
"workday_date_start": "2025-05-26T14:44:47+02:00",
"workday_date_finish": "2025-05-26T14:45:29+02:00",
"workday_complete": true,
"workday_time_leaks_user": 0,
"workday_time_leaks_final": 28758,
"workday_duration": 42,
"workday_duration_final": 42,
"workday_duration_config": 28800,
"reports": [
{
"id": "27",
"user_id": "503",
"type": "TM_START",
"date_start": "2025-05-26T14:44:47+02:00",
"date_finish": "2025-05-26T14:44:47+02:00",
"duration": 0,
"active": false,
"entry_id": "2237",
"report_type": "WORK",
"report_text": "Worked on the project",
"system_text": null,
"source_start": "TM_EVENT",
"source_finish": "TM_EVENT",
"ip_start": "83.219.151.30",
"ip_finish": "83.219.151.30",
"ip_start_network": false,
"ip_finish_network": false
},
{
"id": "29",
...
}
],
"workday_time_leaks_real": 0
}
]
},
"user": {
"id": 3,
"active": true,
"name": "Natalie Brooks",
"first_name": "Natalie",
"last_name": "Brooks",
"work_position": "IT Specialist",
"avatar": "http://test.bitrix24.com/upload/resize_cache/45749/7acf4ca766af5d8/main/c89/c89c6b73470635c/4R5A1256.png",
"personal_gender": "F",
"last_activity_date": "2025-05-29T17:15:56+02:00"
},
"time": {
"start": 1748528193.688745,
"finish": 1748528193.730104,
"duration": 0.04135894775390625,
"processing": 0.014277935028076172,
"date_start": "2025-05-29T17:16:33+02:00",
"date_finish": "2025-05-29T17:16:33+02:00",
"operating_reset_at": 1748528793,
"operating": 0
}
}
}
If the response has empty days
If the method returns an empty array days, configure the time control tool.
-
Execute the method timeman.timecontrol.settings.set under an administrator with the following parameters:
BX24.callMethod( 'timeman.timecontrol.settings.set', { active: true, REPORT_SIMPLE_TYPE: 'all', REPORT_FULL_TYPE: 'all', report_request_type: 'user', report_request_users: 3, }, function(result){ if(result.error()) { console.error(result.error().ex); } else { console.log(result.data()); } } ); -
Open or close the user's workday.
-
Execute the method
timeman.timecontrol.reports.get. The response will include data indays.
Returned Data
|
Name |
Description |
|
result |
Root element of the response |
|
report |
Report information |
|
month_title |
Month name |
|
date_start |
Start date of the sampling period in ATOM format |
|
date_finish |
End date of the sampling period in ATOM format |
|
days |
List of objects describing worked days |
|
user |
Object with information about the user |
|
time |
Information about the request execution time |
Objects days
|
Name |
Description |
|
index |
Weekday index in the format |
|
day_title |
Date in site format |
|
workday_date_start |
Start date of the workday in ATOM format |
|
workday_date_finish |
End date of the workday in ATOM format. If |
|
workday_complete |
Workday completed |
|
workday_time_leaks_user |
Duration of break in seconds |
|
workday_time_leaks_final |
Duration of time in seconds that the user underworked or overworked.
|
|
workday_duration |
Duration of the workday according to the schedule in seconds, including breaks |
|
workday_duration_final |
Duration of the workday according to actual output in seconds. Includes:
|
|
workday_duration_config |
Required duration of the workday in seconds |
|
reports |
List of objects with records of identified absences. Values are displayed in full detail of the report and for the manager. |
|
workday_time_leaks_real |
Duration of break established by the automatic recording system. Contains unconfirmed absences and absences for personal matters. |
Objects reports
|
Name |
Description |
|
id |
Record ID |
|
user_id |
User ID |
|
type |
Record type. Possible values:
|
|
date_start |
Start date of the recording in ATOM format |
|
date_finish |
End date of the recording in ATOM format. If |
|
duration |
Duration |
|
active |
Activity of the record |
|
entry_id |
Time record ID |
|
report_type |
Absence type. Possible values:
|
|
report_text |
Description of the reason for absence |
|
system_text |
System description of the reason for absence. For manager only |
|
source_start |
Data source for the start of the record. Possible values:
|
|
source_finish |
Data source for the end of the record. Possible values:
|
|
ip_start |
IP address at the start of the record. For manager only |
|
ip_finish |
IP address at the end of the record. For manager only |
|
Object with IP address decoding for the start of the record, if the IP address is not within the office network. For office network, it will return For manager only |
|
|
Object with IP address decoding for the end of the record, if the IP address is not within the office network. For office network, it will return For manager only |
Object ip_network
|
Name |
Description |
|
ip |
IP address |
|
range |
Range that includes the specified IP address |
|
name |
Name of the range that includes the specified IP address |
Object user
|
Name |
Description |
|
id |
User ID |
|
active |
Activity |
|
name |
User's full name |
|
first_name |
User's first name |
|
last_name |
User's last name |
|
work_position |
Position |
|
avatar |
User's avatar URL. If the value is empty, the user has no avatar. |
|
personal_gender |
User's gender |
|
last_activity_date |
Date of the user's last action in ATOM format |
Error Handling
HTTP Status: 400
{
"error": "USER_ACCESS_ERROR",
"error_description": "You don't have access to report for this user"
}
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Possible Error Codes
|
Code |
Description |
Value |
|
|
You don't have access to this method |
You do not have access to this method |
|
|
You don't have access to report for this user |
You do not have access to this user's reports |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not allowed to be called using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The methods must be called using the HTTPS protocol |
|
|
|
The REST API is blocked due to overload. This is a manual individual block, to remove it you need to contact Bitrix24 technical support |
|
|
|
The REST API is available only on commercial plans |
|
|
|
The user whose access token or webhook was used to call the method lacks permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the account administrator has allowed access to this application only for specific users |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the option "Temporary closure of the public part of the site". Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |
Continue Learning
- Time Tracking: Overview of Methods
- Add Absence Report timeman.timecontrol.report.add
- Get the list of users for the timeman.timecontrol.reports.users.get