Add minutes to the actual time (now), for example if you want to add 15 minutes to the actual time, use this function.
Allowed timecode values are: days, hours, minutes, seconds
Neccessary JSON request body
{
"start_time": "if empty then now will use as start time",
"timecode" : "days/hours/minutes/seconds",
"timetoadd" : "number to add",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
{"resultcode" => "400", "resultmessage" => "timetoadd is empty!"}
{"resultcode" => "400", "resultmessage" => "timetoadd is not a number!");}
{"resultcode" => "400", "resultmessage" => "No timecode for adding was provided. Allowed is hours, minutes , seconds or days!"}
{"resultcode" => "400", "resultmessage" => "The given timecode is not valid. Allowed is hours, minutes , seconds or days!");}
SubTime
POST
https://diabolocom.name/api.php?action=SubTime
Function description
Sub minutes to the actual time (now), for example if you want to sub 15 minutes to the actual time, use this function.
Allowed timecode values are: days, hours, minutes, seconds
Neccessary JSON request body
{
"start_time": "if empty then now will use as start time",
"timecode" : "days/hours/minutes/seconds",
"timetosub" : "number to sub",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
{"resultcode" => "400", "resultmessage" => "timetoadd is empty!"}
{"resultcode" => "400", "resultmessage" => "timetoadd is not a number!");}
{"resultcode" => "400", "resultmessage" => "No timecode for adding was provided. Allowed is hours, minutes , seconds or days!"}
{"resultcode" => "400", "resultmessage" => "The given timecode is not valid. Allowed is hours, minutes , seconds or days!");}
Add
POST
https://diabolocom.name/api.php?action=Add
Function description
Add a value to an existing value. For example if you want to do 1+1.
Neccessary JSON request body
{
"actualvalue" : "Number",
"addvalue" : "Number",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
{"resultcode" => "400", "resultmessage" => "Actualvalue is not a number!"}
{"resultcode" => "400", "resultmessage" => "Subtractvalue is not a number!";}
Multiply
POST
https://diabolocom.name/api.php?action=Multiply
Function description
Multiply 2 numbers with each other
Neccessary JSON request body
{
"value_one" : "2",
"value_two" : "2",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
{
"originalstring" : "String",
"removecharacters" : "Character to remove",
"replacecharacters" :"Character that should used for the replacement",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
SPlit a string, based on the given length into smaller digit blocks
Neccessary JSON request body
{
"string" : "String",
"blocklength" : "A number that defines, after how many characters the string will be cutted into a new block.",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
{"resultcode" => "400", "resultmessage" => "Value_one is empty!"}
{"resultcode" => "400", "resultmessage" => "Value_one is not a number!"}
{"resultcode" => "400", "resultmessage" => "Value_two is empty!"}
{"resultcode" => "400", "resultmessage" => "Value_two is not a number!"}
{"resultcode" => "400", "resultmessage" => "Time_Value_1 is empty!"}
{"resultcode" => "400", "resultmessage" => "Time_Value_2 is empty!"}
Date Info
POST
https://diabolocom.name/api.php?action=Date_Info
Function description
Provides all relevant informations about a given date and optional about a given time.
Neccessary JSON request body
{
"date" : "22/12/2021 10:10:10",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
Allowed date formats are as well: dd.mm.YYYY or dd-mm-YYYY.
Provide different informations about a given phonenumber!
Neccessary JSON request body
{
"phonenumber" : "Phonenumber with leading +",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
{"resultcode" => "400", "resultmessage" => "The given phonenumber is missing the leading + sign!"}
UTC_TIME
POST
https://diabolocom.name/api.php?action=UTC_TIME
Function description
Provides the information about the actual UTC time and the given time difference for a provided timezone. Possible time zone values can be found here: https://www.php.net/manual/en/timezones.php
Neccessary JSON request body
{
"timezone" : "Europe/Berlin",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
{"resultcode" => "400", "resultmessage" => "TimeZone is empty!"}
{"resultcode" => "400", "resultmessage" => "Given timezone is not valid!"}
HTML2Image
POST
https://diabolocom.name/api.php?action=HTML2Image
Function description
Create an image file from given HTML code - could be used to implement additional data into Wallboards. Image format will be JPG.
To create your HTML code with the needed CSS style information, you could use: https://codepen.io
The final HTML and CSS code can after this be minified with the following tool: https://www.willpeavy.com/tools/minifier/
Replacing the " with an ' in the HMTL and CSS code could be easily done with MS Word and the Search and Replace function.
Neccessary JSON request body
{
"html" : "The full html code without linebreaks, doublequotes needs to be escaped with single quotes ' ",
"filename" : "the name of the file - file extension will be automatic set.",
"folder": "folder name, where the image should be stored",
"clientdetails": {
"customer_identifier": "clientname",
"customer_scenario": "clientscenario"
}
}
{"resultcode" => "400", "resultmessage" => "valueone is empty!"}
{"resultcode" => "400", "resultmessage" => "valuetwo is empty!"}
Send_Mail
POST
https://diabolocom.name/api.php?action=Send_Mail
Function description
Send an eMail via Webservice call (only from Diabolocom Platforms)
Neccessary JSON request body
{
"mailrecipient" : "Reciepient address (multiple recipient should be separated by a ;)",
"mailrecipientcc" : "CC recipients (multiple recipient should be separated by a ;)",
"mailrecipientbcc" : "BCC recipients (multiple recipient should be separated by a ;)",
"mailsubject" : "The subject of the email!",
"mailbody" : "The body of the eMail. All data which are enclosed with a " needs to be masked with a ' !",
"clientdetails": {
"customer_identifier": "clientname",
"customer_scenario": "clientscenario"
}
}
{"resultcode" => "400", "resultmessage" => "You are not allowed to use this functions api!"} -> Request doesn´t come from a Diabolocom platform!
{"resultcode" => "400", "resultmessage" => "The mailsender eMail address is not valid!"}
{"resultcode" => "400", "resultmessage" => "The mailrecipient eMail address is not valid!"}
{"resultcode" => "400", "resultmessage" => "The mailrecipientCC eMail address is not valid!"}
{"resultcode" => "400", "resultmessage" => "The mailrecipientBCC eMail address is not valid!"}
{"resultcode" => "400", "resultmessage" => "The mailsubject is empty!"}
{"resultcode" => "400", "resultmessage" => "The mailbody is empty!"}
{"resultcode" => "400", "resultmessage" => "Send WebService request headers option is missing!"}
{"resultcode" => "400", "resultmessage" => "Wrong configuration for the Send request headers was provided!"}
{"resultcode" => "400", "resultmessage" => "Customer Identifier is empty!"}
{"resultcode" => "400", "resultmessage" => "Customer Scenario is empty!"}
Contains
POST
https://diabolocom.name/api.php?action=Contains
Function description
Check if a given string contains a given letters, number or symbol
Neccessary JSON request body
{
"string" : "The string that has to be checked for a given value!",
"contain_value" : "The value that shouuld be part of the string.",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
{"resultcode":"400","resultmessage":"The given string is not allowed to be empty!"}
{"resultcode":"400","resultmessage":"Contain value is not allowed to be set!"}
SSH_KEY
POST
https://diabolocom.name/api.php?action=SSH_KEY
Function description
Generates a SSH KEY/Value pair for the login to the SFTP with a SSH public key instead of a password.
Neccessary JSON request body
{
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
Json result format and content
{
"resultcode": 200,
"SSH_KEY_IDENTIFIER": "customer name or identifier_3fd63284-f445-45d6-8713-99a5b3491c46",
"SSH_KEY_CREATED_ON": "11-02-2022 19:46:11",
"PublicKey": "ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAACAQDLK8SHPToyYkUwdnuHgab17YeFqurVUTP+s+U7SfuixLIhm7W02LsoAv7I2cEXPrcfXpcebuy9pyS4CJkyI5Ylxw/0eAho+XgsXepB3V46MsX4S/CpsvNu9YuY5e93kvPftFpc1GbzKrY9KxKDBjRKrh3oS8ULDOa30kBJLX7FEZPXjMgpNrJyaP36sXzY+XRJjyOvbH5NvrNIFbeu5ia3j+lrTfahdMm4TSAKWom/Px+I9xmbnJfvStR9TuWG022UY+NSw1qHR0BYcNBYg+c7YRKhlqVfqJpez39Numtg1+Mejh/QOb7HdOj7svfr/ak7XXJnDOy1Zh/vL4acfmJoEAx8p5qPkL4EZA9Ol/QciATJ0XXnYp+VXZ6rX4H1h/Ke0mCMJqJLfxZjPOqAubcV+Kz7u69SWpi7K1Q8j2V5oPSuY+CECi0bla5XhS5am1eMfKCTR55zJboVrP/VL07gDA0GnZ5QVwswxUZj8eaLqVtlq/FUh3GWKPY5ld6QN8cHZFG4Rw5lMoQVKJzzonjk+46Gj8BXa1ya6Fhr2pHb8zUOvtg32NAfawaoqTsbQvSb93ACCg8l/zk5nVimwFNn3f0Dti1unK8b2RBvW06wjqymBftHXhkD8pNb2NNHZ7isVEWj/sb1hTJudmUtrNW2+xd+qTdijuhPkJlnChiuHw=="
}
Result and error messages format and content
{"resultcode":"400","resultmessage":"customer_identifier is not allowed to be empty!"}
{"resultcode":"400","resultmessage":"customer_scenario is not allowed to be set!"}
{"resultcode":"400","resultmessage":"customer_identifier is not allowed to be empty!"}
{"resultcode":"400","resultmessage":"customer_scenario is not allowed to be set!"}
{"resultcode":"400","resultmessage":"String is empty!"}
{"resultcode":"400","resultmessage":"SPLIT_AFTER_SYMBOL is empty!"}
{"resultcode":"400","resultmessage":"Queuename cannot be empty!"}
{"resultcode":"400","resultmessage":"Publictoken cannot be empty!"}
{"resultcode":"400","resultmessage":"Platform cannot be empty!"}
{"resultcode":"400","resultmessage":"Invalid Platform was given!"}
{"resultcode":"400","resultmessage":"User unauthorized!"}
{"resultcode":"400","resultmessage":"Queuename cannot be empty!"}
{"resultcode":"400","resultmessage":"Publictoken cannot be empty!"}
{"resultcode":"400","resultmessage":"Platform cannot be empty!"}
{"resultcode":"400","resultmessage":"Invalid Platform was given!"}
{"resultcode":"400","resultmessage":"User unauthorized!"}
{
"diabolocom": {
"platform": "{{platform}}",
"public_token": "{{Public API Token}}",
"foldername" : "/sound_files/all_recordings/dates/{{YYYY-MM-DD}}",
"callid": "{{callID}}"
},
"destination" : {
"service" : "sFTP",
"filename" : "If a specific file name should be used!",
"sFTP" : {
"server" : "",
"port" : "",
"folder" : "",
"user" : "",
"password" : "",
"sshkey" : ""
}
},
"file": {
"creation" : "YES/NO",
"type" : "File ending of the specific file",
"filename" : "File name of the specific file without file type ending",
"file_content" : "Content of the specific file - always use ' as sign - no doublequotes allowed"
},
"debug" : {
"FAILURES_ONLY" : "0/1/2 = 0 = Never, 1 only when failure, 2 for every transaction in any case",
"debugmail_recipients" : ""
},
"clientdetails": {
"customer_identifier": "{{PLATFORM}}-{{ACCOUNTNUMBER}}",
"customer_scenario": "{{Scenarioname}}"
}
}
{"resultcode":"200","resultmessage": File filename was transfered!"}
{"resultcode":"400","resultmessage":"File cannot be found yet, will be queued for further procedure!"}
{"resultcode":"400","resultmessage":"User unauthorized!"}
{"resultcode":"400","resultmessage":"Dedicated errormessage"}
{
"diabolocom": {
"platform": "{{platform}}",
"public_token": "{{Public API Token}}",
"foldername" : "/sound_files/all_recordings/dates/{{YYYY-MM-DD}}",
"callid": "{{callID}}"
},
"destination" : {
"service" : "FTP",
"filename" : "If a specific file name should be used!",
"FTP" : {
"server" : "",
"port" : "",
"folder" : "",
"user" : "",
"password" : ""
}
},
"file": {
"creation" : "YES/NO",
"type" : "File ending of the specific file",
"filename" : "File name of the specific file without file type ending",
"file_content" : "Content of the specific file - always use ' as sign - no doublequotes allowed"
},
"debug" : {
"FAILURES_ONLY" : "0/1/2 = 0 = Never, 1 only when failure, 2 for every transaction in any case",
"debugmail_recipients" : ""
},
"clientdetails": {
"customer_identifier": "{{PLATFORM}}-{{ACCOUNTNUMBER}}",
"customer_scenario": "{{Scenarioname}}"
}
}
{"resultcode":"200","resultmessage": File filename was transfered!"}
{"resultcode":"400","resultmessage":"File cannot be found yet, will be queued for further procedure!"}
{"resultcode":"400","resultmessage":"User unauthorized!"}
{"resultcode":"400","resultmessage":"Dedicated errormessage"}
{"resultcode":"200","resultmessage": File filename was transfered!"}
{"resultcode":"400","resultmessage":"File cannot be found yet, will be queued for further procedure!"}
{"resultcode":"400","resultmessage":"User unauthorized!"}
{"resultcode":"400","resultmessage":"Dedicated errormessage"}
{
"diabolocom": {
"platform": "{{platform}}",
"public_token": "{{Public API Token}}",
"foldername" : "/sound_files/all_recordings/dates/{{YYYY-MM-DD}}",
"callid": "{{callID}}"
},
"destination" : {
"service" : "Mail",
"filename" : "If a specific file name should be used!",
"Mail" : {
"MAIL_RECIEPIENTS" : "",
"MAIL_CC_RECIEPIENTS" : "",
"MAIL_BCC_RECIEPIENTS" : "",
"MAIL_SUBJECT_LINE" : "",
"MAIL_BODY" : ""
}
},
"file": {
"creation" : "YES/NO",
"type" : "File ending of the specific file",
"filename" : "File name of the specific file without file type ending",
"file_content" : "Content of the specific file - always use ' as sign - no doublequotes allowed"
},
"debug" : {
"FAILURES_ONLY" : "0/1/2 = 0 = Never, 1 only when failure, 2 for every transaction in any case",
"debugmail_recipients" : ""
},
"clientdetails": {
"customer_identifier": "{{PLATFORM}}-{{ACCOUNTNUMBER}}",
"customer_scenario": "{{Scenarioname}}"
}
}
{"resultcode":"200","resultmessage": File filename was transfered!"}
{"resultcode":"400","resultmessage":"File cannot be found yet, will be queued for further procedure!"}
{"resultcode":"400","resultmessage":"User unauthorized!"}
{"resultcode":"400","resultmessage":"Dedicated errormessage"}
{
"diabolocom": {
"platform": "{{platform}}",
"public_token": "{{Public API Token}}",
"foldername" : "/sound_files/all_recordings/dates/{{YYYY-MM-DD}}",
"callid": "{{callID}}"
},
"destination" : {
"service" : "DIAB_AI",
"filename" : "If a specific file name should be used!",
"Mail" : {
"MAIL_RECIEPIENTS" : "",
"MAIL_CC_RECIEPIENTS" : "",
"MAIL_BCC_RECIEPIENTS" : "",
"MAIL_SUBJECT_LINE" : "",
"MAIL_BODY" : ""
}
},
"file": {
"creation" : "YES/NO",
"type" : "File ending of the specific file",
"filename" : "File name of the specific file without file type ending",
"file_content" : "Content of the specific file - always use ' as sign - no doublequotes allowed"
},
"debug" : {
"FAILURES_ONLY" : "0/1/2 = 0 = Never, 1 only when failure, 2 for every transaction in any case",
"debugmail_recipients" : ""
},
"clientdetails": {
"customer_identifier": "{{PLATFORM}}-{{ACCOUNTNUMBER}}",
"customer_scenario": "{{Scenarioname}}"
}
}
{"resultcode":"200","resultmessage": File filename was transfered!"}
{"resultcode":"400","resultmessage":"File cannot be found yet, will be queued for further procedure!"}
{"resultcode":"400","resultmessage":"User unauthorized!"}
{"resultcode":"400","resultmessage":"Dedicated errormessage"}
REPLACE
POST
https://diabolocom.name/api.php?action=REPLACE
Function description
Replace values within a string.
Neccessary JSON request body
{
"string" : "This \n is a test-string",
"search" : "\n",
"replace" : " ",
"clientdetails": {
"customer_identifier": "customer name or identifier",
"customer_scenario": "customer scenario"
}
}
Json result format and content
{
"resultcode": "200",
"result": "This is a test-mail",
"OriginalString": "This is a test-mail",
"Search": "\n",
"Replace": " "
}
Result and error messages format and content
{"resultcode":"400","resultmessage":"The string cannot be empty!"}
{"resultcode":"400","resultmessage":"The value to search for cannot be empty!"}
{
"diabolocom" : {
"diab_platform" : "Customer platform like FR1, DE1, SG1 etc.",
"diab_account_id" : "100152",
"diab_token" : "DIAB TOKEN - needs to have at least permissions for endpoints: /account/users, /account/status-sets, account/users/{{userID}}/status, real-time-stats/agents-list",
"diab_identifier_field" : "email/name"
},
"clientdata" : {
"tenant" : "MS Azure Tenant ID",
"access_config" : "client_id=MS Azure Client ID&username=MS Azure Username&password=MS Azure User password&grant_type=password&client_secret=MS Azure Client APP secret&scope=https://graph.microsoft.com/.default",
"config_expiration" : "Date when this MS Azure configuration will expire - actual maximum 24 months after client secret creation"
},
"configuration" : {
"dedicated_statusname" : "A dedicated Status for MS Teams by Name - needs to match exactly the way it is written in Diabolocom Statussets",
"set_previous_status" : "0/1 - defines if an user, that sets his status in Teams to available should be set in Diabolocom to Available or to the previous status he had in Diabolocom!",
"use_group_id" : "MS Azure Group ID - if not the full company directory should be used for searching the Diabolocom users - a single group ID could be used",
"access_code" : "Required when you want to update a configuration after creation"
},
"communication" : {
"errormessagerecipients" : "Mail reciepients of error messages with this cofniguration - one is required, multiple entries has to be separated by ;",
"debug_mode" : "0/1 - 1 Sends all action results during the configuration and the status syncronization to the given mail address above."
}
}
Json result format and content
{
"resultcode": 200,
"EXPIRATION": "30.06.2025",
"FOUND_DIABOLOCOM_USERS": 19,
"FOUND_DIAB_USERS_IN_AZURE": 14,
"SUBSCRIBED_USERS": 14,
"SUBSCRIPTION_USER_FAILED": "",
"ACCESS_CODE": "FQG-c_eRb62h",
"ACCOUNT_ID": "Diabolocom Account ID",
"PLATFORM": "de1",
"SUBSCRIPTION_FAILED_FOR_USER": [], - List of Users that we where not able to subscripe to - normally inactive users in MS Teams
"USER_FROM_DIABOLOCOM_NOT_FOUND": {- List of Diabolocom Users that we where not able to find my mailaddress or name in the MS Azure directory, or when a group has to be used in the given group
}
}
Result and error messages format and content
{"resultcode":"400","resultmessage":"The string cannot be empty!"}
{"resultcode":"400","resultmessage":"The value to search for cannot be empty!"}
{
"diabolocom" : {
"customer_identifier" : "{{PLATFORM}}-{{ACCOUNT-ID}}",
"customer_scenario" : "{{ScenarioName}}",
"publictoken" : "{{publicToken}}",
"platform" : "{{platform like FR1, FR8, DE1 etc.}}"
},
"configuration" : {
"campaignname" : "{{STRING THAT SHOULD BE INCLUDED IN THE CAMPAIGN NAME}} - COULD BE EMPTY",
"exclude_campagin_id" : "{{SINGLE CAMPAIGN ID THAT SHOULD BE EXCLUDED IN THE RESPONSE}}",
"filter_by_folder" : "Clark"
}
}