Added 'copy_user' function to the Non-Agent API.
git-svn-id: svn://192.168.202.10@3342 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
+32
-1
@@ -1,4 +1,4 @@
|
||||
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2020-12-01
|
||||
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2021-01-13
|
||||
|
||||
This document describes the functions of an API(Application Programming
|
||||
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
|
||||
@@ -26,6 +26,7 @@ did_log_export - exports all calls inbound to a DID for one day
|
||||
agent_stats_export - exports agent statistics for set time period
|
||||
add_user - adds a user to the system
|
||||
update_user - updates some user settings in the system
|
||||
copy_user - copies an existing user in the system to a new user ID and name
|
||||
add_phone - adds a phone to the system
|
||||
update_phone - updates or deletes an existing phone record in the system
|
||||
add_phone_alias - adds a phone alias record to the system
|
||||
@@ -167,6 +168,7 @@ Changes:
|
||||
201106-1654 - Added campaign_id option to agent_stats_export function
|
||||
201113-0713 - Added delete_did option to update_did function
|
||||
201201-1625 - Added group_by_campaign option to agent_stats_export function
|
||||
210113-1714 - Added copy_user function
|
||||
|
||||
|
||||
API Functions use the 'function' variable
|
||||
@@ -1204,6 +1206,35 @@ SUCCESS: add_user USER HAS BEEN ADDED - 6666|1000|1234|8|Testing+Person|AGENTS
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
copy_user - copies an existing user in the system to a new user ID and name
|
||||
|
||||
NOTE: api user for this function must have user_level set to 8 or higher and "modify users" enabled
|
||||
|
||||
REQUIRED FIELDS-
|
||||
agent_user - 2-20 characters (for auto-generated send 'AUTOGENERATED')
|
||||
agent_pass - 1-20 characters
|
||||
agent_full_name - 1-50 characters
|
||||
source_user - 2-20 characters (must be an existing user ID in the system)
|
||||
|
||||
NOTE: This function does not work with Vtiger integration
|
||||
|
||||
Example URL strings for API calls:
|
||||
http://server/vicidial/non_agent_api.php?source=test&function=copy_user&user=6666&pass=1234&agent_user=1000&agent_pass=9999&source_user=5555&agent_full_name=Copy+Person
|
||||
|
||||
Example responses:
|
||||
ERROR: copy_user USER DOES NOT HAVE PERMISSION TO COPY USERS - 6666|0
|
||||
ERROR: copy_user YOU MUST USE ALL REQUIRED FIELDS - 6666|1000|5555|||
|
||||
ERROR: copy_user USER DOES NOT HAVE PERMISSION TO COPY USERS IN THIS USER LEVEL - 9|8
|
||||
ERROR: copy_user SOURCE USER DOES NOT EXIST - 6666|5555
|
||||
ERROR: copy_user USER GROUP DOES NOT EXIST - 6666|ADFHR
|
||||
ERROR: copy_user USER ALREADY EXISTS - 6666|6666
|
||||
SUCCESS: copy_user USER HAS BEEN COPIED - 6666|1000|1234|Testing+Person|5555
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
update_user - updates or deletes a user entry already in the system
|
||||
|
||||
|
||||
Reference in New Issue
Block a user