Documentation

timeman.timecontrol.settings.get

The method gets time control settings.

Parameters

No.

Call example

JavaScript

BX24.callMethod('timeman.timecontrol.settings.get', {}, function(result){
	if(result.error())
	{
		console.error(result.error().ex);
	}
	else
	{
		console.log(result.data());
	}
});

PHP

$result = restCommand('timeman.timecontrol.settings.get', Array(), $_REQUEST["auth"]);	

Response example

{    
	"result":{
		"active":true,
		"minimum_idle_for_report":1,
		"register_offline":true,
		"register_idle":true,
		"register_desktop":true,
		"report_request_type":"all",
		"report_request_users":[],
		"report_simple_type":"all",
		"report_simple_users":[],
		"report_full_type":"all",
		"report_full_users":[]
	}
}

Keys description

  • active - availablility time control tool.
  • minimum_idle_for_report - minimum time interval to request the report (in minutes).
  • register_offline - register the user offline status.
  • register_idle - register the user away status.
  • register_desktop - register when the desktop app is started and closed.
  • report_request_type - users from which the report to be requested (all - from all, user - only from the specified users, none - from no users).
  • report_request_users - list of users from which the report to be requested (if report_request_type == user).
  • report_simple_type - users with access to simple type of report (all - to all, user - only to specified users).
  • report_simple_users - list of users with access to simple type of report (if report_simple_type == user).
  • report_full_type - users with access to the expanded report (all - to all, user - only to specified users).
  • report_full_users - list of users with access to the expanded report (if report_simple_type == user).

Example of response in case of an error

{
    "error": "ACCESS_ERROR",
    "error_description": "You don't have access to user this method"
}
  • Key error - error code.
  • Key error_description - brief error description.

Possible error codes

CodeDescription
ACCESS_ERRORSpecified method is available only to administrators.


© «Bitrix24», 2001-2024