Timecard Soap API
From
(Difference between revisions)
(→The Interface Definition) |
|||
Line 8: | Line 8: | ||
Below are listed the various functions that make up the timecard API. Each function is called, passing in at least one parameter, a UserIDBean. This bean contains the user name and password of a previously registered EService User, with administrative rights. This ensures only authorised users are able to access the interface. | Below are listed the various functions that make up the timecard API. Each function is called, passing in at least one parameter, a UserIDBean. This bean contains the user name and password of a previously registered EService User, with administrative rights. This ensures only authorised users are able to access the interface. | ||
− | |||
− | |||
− | |||
− | |||
=== Timecard functions to Retrieve Raw Event Data === | === Timecard functions to Retrieve Raw Event Data === | ||
Line 19: | Line 15: | ||
!Method | !Method | ||
!Parameters | !Parameters | ||
− | ! | + | !Description |
|---- bgcolor=#EDEDFF | |---- bgcolor=#EDEDFF | ||
− | |Array of | + | |Array of [[EventObjectBean]] |
|[[getUserEvents]] | |[[getUserEvents]] | ||
− | |UserIDBean, userPrimaryKey, start date, end date | + | |[[UserIDBean]], userPrimaryKey, start date, end date |
|For a given user in a selected period, retrieves clock in/out dates and times and task descriptions. | |For a given user in a selected period, retrieves clock in/out dates and times and task descriptions. | ||
− | | | + | |---- bgcolor=#EDEDFF |
− | + | |Array of [[EventObjectBean]] | |
− | + | |[[getAllUserEvents]] | |
− | + | |[[UserIDBean]], start date, end date | |
− | + | |Retrieves clock in/out dates and times and task descriptions for all users in a selected period. | |
− | + | |---- bgcolor=#EDEDFF | |
− | + | |Array of [[EventObjectBean]] | |
− | + | |[[getUnsynchronizedEvents]] | |
− | getUnsynchronizedEvents | + | |[[UserIDBean]], synchronisationID, createdOnOrAfter |
− | Retrieves array of | + | |Retrieves array of [[EventObject]] (detailed further below) that have not previously been synchronized and acknowledged and all events that have changed since their last synchronization. |
− | + | |---- bgcolor=#EDEDFF | |
− | ackEventSynchronization | + | |return |
− | Acknowledges that synchronization has been performed on the selected events | + | |[[ackEventSynchronization]] |
+ | |[[UserIDBean]], [[EventSynchronizationBean]] | ||
+ | |Acknowledges that synchronization has been performed on the selected events. | ||
+ | |} | ||
=== Timecard User Management Functions === | === Timecard User Management Functions === | ||
Line 66: | Line 65: | ||
|} | |} | ||
− | === | + | === Timecard Field Device Management Functions === |
{| border=1 | {| border=1 | ||
!Method | !Method | ||
Line 96: | Line 95: | ||
|} | |} | ||
− | Methods to Retrieve Processed Data | + | === Methods to Retrieve Processed Data === |
− | + | ||
− | + | ||
− | + | ||
− | + | {| border=1 | |
− | + | !Returns | |
− | + | !Method | |
− | getUserTypeNames | + | !Parameters |
− | Returns array of UserType Names | + | !Description |
− | + | |---- bgcolor=#EDEDFF | |
− | getOvertimeRules | + | |[[HourBreakdownBean]] |
− | Returns array of OverTimeRule | + | |[[getUserHoursSummary]] |
+ | |[[UserIDBean]], UserPrimaryKey, start, end | ||
+ | |Gets the hourly breakdown for a single user. | ||
+ | |---- bgcolor=#EDEDFF | ||
+ | |Array of [[HourBreakdownBean]] | ||
+ | |[[getHourSummaries]] | ||
+ | |[[UserIDBean]], start, end | ||
+ | |Hourly breakdowns for all users in the given time period. | ||
+ | |---- bgcolor=#EDEDFF | ||
+ | |Array of Strings | ||
+ | |[[getUserTypeNames]] | ||
+ | |[[UserIDBean]] | ||
+ | |Returns array of UserType Names. | ||
+ | |---- bgcolor=#EDEDFF | ||
+ | |Array of [[OverTimeRuleBean]] | ||
+ | |[[getOvertimeRules]] | ||
+ | |[[UserIDBean]] | ||
+ | |Returns array of OverTimeRule. | ||
+ | |} | ||
− | Main Data Type Definitions | + | === Main Data Type Definitions === |
− | + | ==== EventObjectBean ==== | |
− | Event Occurred Timestamp (the date and time at which a clock in, clock out, start break, end break start task or end task event occurred) | + | Fields : |
− | Event ID | + | *Event Occurred Timestamp (the date and time at which a clock in, clock out, start break, end break start task or end task event occurred) |
− | Event Type (Clock in, Clock out, Start break, End break, Task start, Task end) | + | *Event ID |
− | Name of User | + | *Event Type (Clock in, Clock out, Start break, End break, Task start, Task end) |
− | DeviceID of User | + | *Name of User |
− | UserPrimaryKey | + | *DeviceID of User |
− | UserType | + | *UserPrimaryKey |
+ | *UserType | ||
− | TaskEventObject extends EventObject | + | ==== TaskEventObject extends EventObject ==== |
− | Task ID | + | Fields : |
+ | *Task ID | ||
− | HourBreakdownObject | + | ==== HourBreakdownObject ==== |
− | UserPrimaryKey | + | *UserPrimaryKey |
− | UserType | + | *UserType |
− | UserName | + | *UserName |
− | Device ID | + | *Device ID |
− | Normal Hours as int | + | *Normal Hours as int |
− | Normal mins as int | + | *Normal mins as int |
− | Normal seconds as int (always zero currently) | + | *Normal seconds as int (always zero currently) |
− | Overtime Hours as int | + | *Overtime Hours as int |
− | Overtime mins as int | + | *Overtime mins as int |
− | Overtime seconds as int (always zero currently) | + | *Overtime seconds as int (always zero currently) |
− | Extratime Hours as int | + | *Extratime Hours as int |
− | Extratime mins as int | + | *Extratime mins as int |
− | Extratime seconds as int (always zero currently) | + | *Extratime seconds as int (always zero currently) |
+ | |||
+ | ==== OverTimeRule ==== | ||
+ | *UserType Applies to | ||
+ | *Start date | ||
+ | *End Date (may be indefinite, need constant for that !) not null !!! | ||
+ | *boolean for include break in time worked | ||
+ | *Overtime rule as OverTime | ||
+ | *ExtraTime rule as OverTime | ||
+ | |||
+ | ==== OverTime ==== | ||
+ | *boolean applicable | ||
+ | *hours per day as HoursPeriod | ||
+ | *hours per Week as HoursPeriod | ||
+ | |||
+ | ==== HoursPeriod ==== | ||
+ | *boolean applicable | ||
+ | *hours as int | ||
+ | *mins as int |
Revision as of 22:55, 17 July 2005
Contents |
The timecard SOAP API
The timecard SOAP API is similar to the EService SOAP API, in that it provides methods for retrieving, updating, and deleting data stored on the server.
The API is published seperately at the moment, as another interface for linking into the timecard server, although there is some progress on integrating the two products together in a future release.
The Interface Definition
Below are listed the various functions that make up the timecard API. Each function is called, passing in at least one parameter, a UserIDBean. This bean contains the user name and password of a previously registered EService User, with administrative rights. This ensures only authorised users are able to access the interface.
Timecard functions to Retrieve Raw Event Data
Returns | Method | Parameters | Description |
---|---|---|---|
Array of EventObjectBean | getUserEvents | UserIDBean, userPrimaryKey, start date, end date | For a given user in a selected period, retrieves clock in/out dates and times and task descriptions. |
Array of EventObjectBean | getAllUserEvents | UserIDBean, start date, end date | Retrieves clock in/out dates and times and task descriptions for all users in a selected period. |
Array of EventObjectBean | getUnsynchronizedEvents | UserIDBean, synchronisationID, createdOnOrAfter | Retrieves array of EventObject (detailed further below) that have not previously been synchronized and acknowledged and all events that have changed since their last synchronization. |
return | ackEventSynchronization | UserIDBean, EventSynchronizationBean | Acknowledges that synchronization has been performed on the selected events. |
Timecard User Management Functions
Method | Summary |
---|---|
createUser | Creates a new user based on the user data passed in. |
getUserDetail | Gets all the details of a specified user. |
updateUser | Updates a particular user with new details. |
updateUserPassword | Updates a user's password. |
deleteUser | Deletes an existing user. |
getUnsynchronisedUsers | Retrieves all users who have not previously been synchronised and acknowledged, and all users that have changed since their last synchronisation. |
ackUserSynchronisation | Acknowledges that synchronisation has been performed on the selected users. |
Timecard Field Device Management Functions
Method | Summary |
---|---|
createFieldDevice | Creates a new field device based on the field device data passed in. |
getFieldDeviceDetail | Gets the full set of details for a specified field device. |
getFieldDeviceDetails | Gets the full set of details for all specified field devices. |
getFieldDeviceDetailsUpdatedSince | Gets the full set of details for all field devices that have been updated since the specified date and time. |
updateFieldDevice | Updates a field device with new details. |
deleteFieldDevice | Marks a field device as deleted. |
getFieldDevicePKForName | Gets the primary key of a field device, based on the name passed in. |
getFieldDevicePKForDeviceID | Gets the primary key of a field device, based on the device id passed in. |
Methods to Retrieve Processed Data
Returns | Method | Parameters | Description |
---|---|---|---|
HourBreakdownBean | getUserHoursSummary | UserIDBean, UserPrimaryKey, start, end | Gets the hourly breakdown for a single user. |
Array of HourBreakdownBean | getHourSummaries | UserIDBean, start, end | Hourly breakdowns for all users in the given time period. |
Array of Strings | getUserTypeNames | UserIDBean | Returns array of UserType Names. |
Array of OverTimeRuleBean | getOvertimeRules | UserIDBean | Returns array of OverTimeRule. |
Main Data Type Definitions
EventObjectBean
Fields :
- Event Occurred Timestamp (the date and time at which a clock in, clock out, start break, end break start task or end task event occurred)
- Event ID
- Event Type (Clock in, Clock out, Start break, End break, Task start, Task end)
- Name of User
- DeviceID of User
- UserPrimaryKey
- UserType
TaskEventObject extends EventObject
Fields :
- Task ID
HourBreakdownObject
- UserPrimaryKey
- UserType
- UserName
- Device ID
- Normal Hours as int
- Normal mins as int
- Normal seconds as int (always zero currently)
- Overtime Hours as int
- Overtime mins as int
- Overtime seconds as int (always zero currently)
- Extratime Hours as int
- Extratime mins as int
- Extratime seconds as int (always zero currently)
OverTimeRule
- UserType Applies to
- Start date
- End Date (may be indefinite, need constant for that !) not null !!!
- boolean for include break in time worked
- Overtime rule as OverTime
- ExtraTime rule as OverTime
OverTime
- boolean applicable
- hours per day as HoursPeriod
- hours per Week as HoursPeriod
HoursPeriod
- boolean applicable
- hours as int
- mins as int