update_hosts_mask
To set or update the user host mask, use the user/update_hosts_mask method.
svc=user/update_hosts_mask¶ms={
"userId": <long>,
"hostsMask": <text>
}
To send a request, you should have the Change user’s general properties access right to the user.
Parameters
The required parameters are marked with an asterisk (*).
| Name | Description |
|---|---|
| userId* | User ID. |
| hostsMask* | Host mask. |
Response
If the request is completed successfully, a response of the following format is returned:
{
"hm": <text> /* Host mask. */
}
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input parameters. |
| 6 | Failed to update the host mask. |
| 7 | The user isn’t found, or you have no Change user’s general properties access right to this user. |