Documentation

timeman.networkrange.check

The method is used to check if an IP address is included in the office network IP range.

Parameters

ParameterExampleRequiredDescription
IP 10.10.255.255 No IP address.

If the IP parameter is not specified, the the next IP address is checked.

Call example

JavaScript

BX24.callMethod('timeman.networkrange.check', {
	'IP': '10.10.255.255'
}, function(result){
	if(result.error())
	{
		console.error(result.error().ex);
	}
	else
	{
		console.log(result.data());
	}
});

PHP

$result = restCommand('timeman.networkrange.check', Array(
	'IP' => '10.10.255.255'
), $_REQUEST["auth"]);	

Response example

{    
	"result": {
		ip: "10.10.255.255", 
		range: "10.0.0.0-10.255.255.255", 
		name: "Office network 10.x.x.x"
	}
}

Description of keys

  • ip - IP address that was checked.
  • range - range that includes the specified IP address.
  • name - name of the range that includes the specified IP address.

Response example 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.


User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix Inc.», 2001-2021, «Bitrix Inc.», 2021