דלג לתוכן הראשי

User Management

Services for managing the system users, their permissions, Maskyoo number assignment and the access log.


get_users

The list of all users (without passwords), each one with its permissions and assigned Maskyoo numbers.

Endpoint: /api/?service=get_users

Parameters

ParameterTypeRequiredDescription
formatstringNOjson / xml.

Error code

CodeDescription
7041No results

get_user_by_id

The details of a single user (without the password), including permissions and assigned Maskyoo numbers.

Endpoint: /api/?service=get_user_by_id

Parameters

ParameterTypeRequiredDescription
user_idintYESThe user ID.
formatstringNOjson / xml.

Error codes

CodeDescription
7031user_id is missing
7032The user does not exist

set_user

Create a new user. The system automatically creates:

  • A user profile.
  • A default set of report permissions.
  • A personal tag named #<email>.

The time zone, language and date format are copied from the main administrator user of the account.

A user created through the API does not receive the "export data to file" permission by default; the permissions can be updated in the user management interface when needed.

Endpoint: /api/?service=set_user

Parameters

ParameterTypeRequiredDescription
emailstringYESUp to 99 characters.
passwordstringYESAt least 8 characters. Must comply with the system password policy.
user_phonestringNOPhone number (converted to international format).
user_phone_smsstringNOPhone number for SMS (converted to international format).
user_loginstringNOThe login name is always derived automatically from the part before @ in email; a value sent in this parameter is not used.
formatstringNOjson / xml.

Error codes

CodeDescription
7001email is empty or longer than 99
7002password is shorter than 8 / does not comply with the policy
7003Creating the user failed
7004Creating the profile failed
7005Creating the default permissions failed

Example

curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
-X POST "https://[MASKYOO_URL]/api/?service=set_user" \
-d "password=Str0ng!Pass" \
-d "user_phone=972544224422" \
-d "format=json"

update_user

Update an existing user. It supports updating the password (an empty value = do not update), the phone, the SMS phone and the status.

Endpoint: /api/?service=update_user

Parameters

ParameterTypeRequiredDescription
user_idintYESThe user ID.
passwordstringNOA new password (when sent, it must comply with the policy).
user_phonestringNOA new phone number (at least 6 characters).
user_phone_smsstringNOA new SMS phone number.
user_statusintNO1 = enable the user, 0 = disable the user. Both values are supported through the API.
formatstringNOjson / xml.

Error codes

CodeDescription
7011user_id is missing
7012The update failed
7013The password does not comply with the policy

delete_user

Delete a user, including permissions, profiles and Maskyoo number assignment.

Endpoint: /api/?service=delete_user

Parameters

ParameterTypeRequiredDescription
user_idintYESThe user to delete.
formatstringNOjson / xml.

Error codes

CodeDescription
7021user_id is missing
7022The user does not exist
7023Deleting the user failed
7024Removing the Maskyoo number assignment failed
7025Deleting the user profile failed
7026Deleting the user permissions failed
caution

The deletion is irreversible. Verify before use.


set_ddi_to_user

Assign a Maskyoo number to a user (view / manage permission).

Endpoint: /api/?service=set_ddi_to_user

Parameters

ParameterTypeRequiredDescription
user_idintYESThe user.
maskyoostringYESThe Maskyoo number.
formatstringNOjson / xml.

Error codes

CodeDescription
8001user_id is missing
8002maskyoo is missing
8003The user does not exist
8004The Maskyoo number does not exist
8005The assignment failed
8006The assignment already exists

get_ddi_by_user_id

The list of Maskyoo numbers assigned to a user (including the status: active / inactive / release).

Endpoint: /api/?service=get_ddi_by_user_id

Parameters

ParameterTypeRequiredDescription
user_idintYESThe user ID.
formatstringNOjson / xml.

Error code

CodeDescription
8011user_id is missing
8012No results for this user

delete_ddi_from_user_id

Remove the assignment of a Maskyoo number from a user.

Endpoint: /api/?service=delete_ddi_from_user_id

Parameters

ParameterTypeRequiredDescription
user_idintYESThe user.
maskyoostringYESThe number to remove.
formatstringNOjson / xml.

Error codes

CodeDescription
8021user_id is missing
8022maskyoo is missing
8023The user does not exist
8024The Maskyoo number does not exist
8025The assignment does not exist
8026The removal failed

get_users_access_log

The users login log (up to 1000 rows, in descending order). It can be filtered by user and by time range.

Endpoint: /api/?service=get_users_access_log

Parameters

ParameterTypeRequiredDescription
user_idintNOFilter by user.
start_timestringNOY-m-d H:i:s. When only start_time is sent, end_time is set to now.
end_timestringNOY-m-d H:i:s.
formatstringNOjson / xml.

Response fields

access_log_user_id, access_log_name, access_log_time, access_log_status, access_log_ip.

Error code

CodeDescription
6001No results

System impact

The user management services affect access, permissions and reports:

  • Creating a userset_user is identical to creating a user in the interface: it creates a profile, default permissions and the personal tag #<email>
  • Number assignmentset_ddi_to_user determines which Maskyoo numbers the user sees in the reports and in the management screens
  • Deleting a user — an irreversible action; it removes the user, the permissions, the profile and the number assignment
  • Passwords — must comply with the system password policy; non-compliance returns 7002/7013
  • Access logget_users_access_log reflects the same records that are visible in the access log report; limited to 1000 rows
  • Time zone and language — these details are copied from the main administrator when a user is created through the API

See also