Documentation

timeman.timecontrol.reports.users.get

The method gets a list of users included into the specified department.

Parameters

ParameterExampleRequiredDescription
DEPARTMENT_ID 52 Yes* Department ID.

* - parameter DEPARTMENT_ID must be specified only if the user is a supervisor or administrator.

Call example

JavaScript

BX24.callMethod('timeman.timecontrol.reports.users.get', {
	'DEPARTMENT_ID': 52
}, function(result){
	if(result.error())
	{
		console.error(result.error().ex);
	}
	else
	{
		console.log(result.data());
	}
});

PHP

$result = restCommand('timeman.timecontrol.reports.users.get', Array(
	'DEPARTMENT_ID' => 52
), $_REQUEST["auth"]);	

Response example

{    
	"result": [
		{
			"id":2,
			"name":"John Harrington",
			"first_name":"John",
			"last_name":"Harrington",
			"work_position":"IT specialist",
			"avatar":"http://test.bitrix24.com/upload/resize_cache/main/072/100_100_2/42-17948709.gif",
			"last_activity_date":"2018-08-15T16:25:34+03:00"
		}
	]
}

Keys description

  • id - user ID.
  • name - user first and last name.
  • first_name - user name.
  • last_name - user last name.
  • work_position - position.
  • avatar - link to avatar (if empty, the avatar is not specified).
  • personal_gender - user gender.
  • last_activity_date - date of the last user action in АТОМ format.


© «Bitrix24», 2001-2024