Added 'custom_fields_delete' option for update_list function of the Non-Agent API

git-svn-id: svn://192.168.202.10@3418 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2021-04-02 15:14:41 +00:00
parent 024feac6fb
commit abf641ed53
3 changed files with 140 additions and 7 deletions
+14 -4
View File
@@ -1,4 +1,4 @@
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2021-04-01
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2021-04-02
This document describes the functions of an API(Application Programming
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
@@ -184,6 +184,7 @@ Changes:
210325-2042 - Added more data output fields to agent_stats_export function
210330-1633 - Added ability to use custom_fields_copy on update_list on a deleted list_id
210401-1058 - Added 'custom_fields_update' option for update_list function
210402-1102 - Added 'custom_fields_delete' option for update_list function
API Functions use the 'function' variable
@@ -1756,6 +1757,7 @@ custom_fields_add - Must be one of these: 'Y','N', will default to 'N'. The fiel
custom_fields_update - Must be one of these: 'Y','N', will default to 'N'. The fields shown above are all optional except for 'field_label' which is required for this to work
* For 'custom_fields_update' only, you can set the following fields to '--BLANK--' to have them changed to an empty '' value:
field_description, $field_help, $field_options, $field_default
custom_fields_delete - Must be one of these: 'Y','N', will default to 'N'. The 'field_label' field is required for this to work
NOTES:
- in order to set a field to empty('') set it equal to --BLANK--, i.e. "&drop_inbound_group=--BLANK--"
@@ -1774,6 +1776,7 @@ http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&functio
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_list&list_id=9988&custom_fields_add=Y&field_label=new_api_field4&field_name=new+API+field4&field_size=20&field_type=TEXT&field_rank=16
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_list&list_id=9988&custom_fields_update=Y&field_label=Utility&field_options=1,1_1_hello%0A2,2_2_hello%0A3,3_3_hello
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_list&list_id=9988&custom_fields_update=Y&field_label=bill_period3&field_options=source=%3Ebill_start_month3%0Avalue=%3ESeptember%0Aoption=%3E%7Cselect%20bill-period-1%0Aoption=%3E1_month%7C1%20Month%0Aoption=%3E2_months%7C2%20Months%0Aoption=%3E3_months%7C3%20Months%0Avalue=%3E%0Aoption=%3E%7Cno%20match
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_list&list_id=5040379&custom_fields_delete=Y&field_label=new_api_field6
Example responses:
ERROR: update_list USER DOES NOT HAVE PERMISSION TO UPDATE LISTS - 6666
@@ -1815,8 +1818,15 @@ NOTICE: update_list REQUIRED CUSTOM FIELDS VARIABLES ARE MISSING, FIELD NOT ADDE
NOTICE: update_list CUSTOM FIELDS LIST ID TO UPDATE TO HAS NO CUSTOM FIELDS, THIS IS AN OPTIONAL FIELD - 6666|1101||||||
NOTICE: update_list REQUIRED CUSTOM FIELDS VARIABLES ARE MISSING, FIELD NOT UPDATED, THIS IS AN OPTIONAL FIELD - 6666|1101|||
NOTICE: update_list FIELD DOES NOT EXIST, FIELD NOT UPDATED, THIS IS AN OPTIONAL FIELD - 6666|1101|abc|||||
NOTICE: update_list CUSTOM FIELDS LIST ID TO DELETE TO HAS NO CUSTOM FIELDS, THIS IS AN OPTIONAL FIELD - 6666|1101|
NOTICE: update_list REQUIRED CUSTOM FIELDS VARIABLES ARE MISSING, FIELD NOT DELETED, THIS IS AN OPTIONAL FIELD - 6666|1101|||
NOTICE: update_list FIELD DOES NOT EXIST, FIELD NOT DELETED, THIS IS AN OPTIONAL FIELD - 6666|1101|abc|
NOTICE: update_list ADD CUSTOM FIELD COMMAND SENT - 6666|1101|new_field|TEXT|ERROR: Field not added|
NOTICE: update_list ADD CUSTOM FIELD COMMAND SENT - 6666|1101|new_field|TEXT|SUCCESS: Field added|
NOTICE: update_list UPDATE CUSTOM FIELD COMMAND SENT - 6666|1101|new_field|TEXT|ERROR: Field not updated|
NOTICE: update_list UPDATE CUSTOM FIELD COMMAND SENT - 6666|1101|new_field|TEXT|SUCCESS: Field updated|
NOTICE: update_list DELETE CUSTOM FIELD COMMAND SENT - 6666|1101|new_field|TEXT|ERROR: Field not deleted|
NOTICE: update_list DELETE CUSTOM FIELD COMMAND SENT - 6666|1101|new_field|TEXT|SUCCESS: Field deleted|
@@ -2049,9 +2059,9 @@ file_download - [0,1] Download as a CSV file, default 0
Example URL strings for API calls:
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=call_dispo_report&ingroups=TEST_IN3-TEST_IN2&query_date=2018-02-05&end_date=2018-02-07
http://svn.eflo.net:40080/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=call_dispo_report&ingroups=TEST_IN3-TEST_IN2&query_date=2018-02-05&end_date=2018-02-07&status_breakdown=1
http://svn.eflo.net:40080/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=call_dispo_report&did_patterns=7275551113&query_date=2018-02-05&end_date=2018-02-07&status_breakdown=1
http://svn.eflo.net:40080/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=call_dispo_report&ingroups=TEST_IN3-TEST_IN2&query_date=2018-02-05&end_date=2018-02-07&status_breakdown=1&show_percentages=1
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=call_dispo_report&ingroups=TEST_IN3-TEST_IN2&query_date=2018-02-05&end_date=2018-02-07&status_breakdown=1
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=call_dispo_report&did_patterns=7275551113&query_date=2018-02-05&end_date=2018-02-07&status_breakdown=1
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=call_dispo_report&ingroups=TEST_IN3-TEST_IN2&query_date=2018-02-05&end_date=2018-02-07&status_breakdown=1&show_percentages=1
Example responses:
ERROR: call_dispo_report INVALID OR MISSING CAMPAIGNS, INGROUPS, OR DIDS