Difference between revisions of "webBooks-Dashboard APIs"
Digitalpipe (Talk | contribs) (Created page with "==Dashboard== In order to process any of these API's, all requests should be directed to the 'modules/webbooks/webbooks.php' file. The type of request will be specified per sect...") |
(No difference)
|
Latest revision as of 11:56, 26 March 2015
Contents
Dashboard
In order to process any of these API's, all requests should be directed to the 'modules/webbooks/webbooks.php' file. The type of request will be specified per section below.
Load the interface
Since the default themed dashboard is hard coded within the 'themes/default/webbooks.html' file, there isn't a request to load the interface. This will also be the case if any other theme is used.
Populate the form
To populate all the various values of the interface form objects, the below parameters will need to be passed via a GET request:
action=init target=values username=(the username for the account) SID=(the security identifier for the account)
This will return all the information in the following XML layout:
<system socialURI="STRING" /> <user id="INTEGER" name="STRING" /> <employees> <employee id="INTEGER" name="STRING" status="{in|out|delayed}" avail="{yes|no|break|meeting}" /> ...repeated for each employee in the company... </employees> <jobs> <job id="INTEGER" module="STRING" customerID="INTEGER" customerName="STRING" required="DATE" /> ...repeated for each job associated with the employee... </jobs> <groups> <group id="INTEGER" name="STRING" icon="STRING"> <module id="INTEGER" name="STRING" icon="STRING" /> ...repeated for each module within the group... </group> ...repeated for each defined group on the dashboard... </groups>
Change the interface
To change between the dashboard and the social interface, the below parameters will need to be passed via a GET request:
action=check target=provider username=(the username for the account) SID=(the security identifier for the account) uri=(the URI of the email provider such as 'http://www.gmail.com')
When changing to the social interface, the server-side script will perform a quick test to see if the provider allows for an embedded version of their service and returns the following XML:
<s></s> OR <f><msg>The service provider for your social interaction does not allow embedding in an iframe.</msg></f>
Update 'Employee' tab data
To update the data on the 'Employees' tab, the below parameters will need to be passed via a GET request:
action=update target=employees username=(the username for the account) SID=(the security identifier for the account)
This will return all the information in the following XML layout:
<employees> <employee id="INTEGER" name="STRING" status="{in|out|delayed}" avail="{yes|no|break|meeting}" /> ...repeated for each employee of the company... </employees> <jobs> <job id="INTEGER" module="STRING" customerID="INTEGER" customerName="STRING" required="DATE" /> ...repeated for each job assigned to the employee... </jobs>
Update user status
To update the users working status, the below parameters will need to be passed via a GET request:
action=update target=status username=(the username for the account) SID=(the security identifier for the account) status={in|out|pto|sick|delayed}
This will return all the information in the following XML:
<s><msg>Your status has been updated successfully!</msg><data status="{in|out|pto|sick|delayed}" /></s> OR <f><msg>There was an error processing your request and our staff has been notified. Please try again in a few minutes.</msg><data prior="{yes|no|break|meeting}" /></f>
Update user availability
To update the users working availability, the below parameters will need to be passed via a GET request:
action=update target=status username=(the username for the account) SID=(the security identifier for the account) avail={yes|no|break|meeting}
This will return all the information in the following XML:
<s><msg>Your status has been updated successfully!</msg><data status="{yes|no|break|meeting}" /></s> OR <f><msg>There was an error processing your request and our staff has been notified. Please try again in a few minutes.</msg><data prior="{yes|no|break|meeting}" /></f>