Skip to main content
Version: 5.6

Sync Service

This service contains methods in order to search for time entries or projects that have to be synchronized with mobile devices. Also it offers method in order to import / synchronize time entries and projects.

GetUseableSyncUserProfiles

This method searches for all TimePunch profiles that can be used in order to sync data. As an additional information the last synchronization date will be returned.

List<SyncUserProfileDto> GetUseableSyncUserProfiles(  
out TpFault fault,
TpAuthentication authentication);
Needed Permissionsync@access – current user core@switchIdentity – different users
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
Return valueList of TimePunch profiles that can be used for synchronisation purposes.

GetUseableConnectedDevicesForSync

This method searches for connected mobile devices that are available for data synchronisation.

For each connected device, the corresponding user profile is also supplied.

List<ConnectedDeviceDto> GetUseableConnectedDevicesForSync(  
out TpFault fault,
TpAuthentication authentication);
Needed Permissionsync@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
Return valueList of connected devices that are currently bound and used for synchronsiation purposes.

PullAndSyncConnectedDevices

Diese Methode lädt Daten aus der TimePunch Cloud für die verbundenen Geräte herunter und synchronisiert die Daten mit der lokalen TimePunch Installation.

void PullAndSyncConnectedDevices(  
out TpFault fault,
TpAuthentication authentication,
Guid userProfileId);
Needed Permissionsync@access timeEntries@download projects@download
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userProfileIdThe unique id of the user to load the connected devices

BindClientToDevice

This method can be used to connect a user profile to a mobile device. Connecting the user profile to the mobile device is necessary so that data can be automatically retrieved from the cloud.

void BindClientToDevice(  
out TpFault fault,
TpAuthentication authentication,
ConnectedDeviceDto connectedDevice);
Needed Permissionsync@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
connectedDeviceOne connected device for which the data shall be downloaded from cloud

ReleaseClientFromDevice

This method disconnects a user profile from a connected mobile device. Once the user profile has been disconnected from the device, it is no longer possible to retrieve data automatically.

void ReleaseClientFromDevice(  
out TpFault fault,
TpAuthentication authentication,
ConnectedDeviceDto connectedDevice);
Needed Permissionsync@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
connectedDeviceOne connected device for which the data shall be downloaded from cloud

GetDeviceInfo

This method retrieves the stored data of the mobile device.

ConnectedDeviceDto GetDeviceInfo(  
out TpFault fault,
TpAuthentication authentication,
Guid deviceConnectionId);
Needed Permissionsync@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
deviceConnectionIdId of the device for that the device info shall be loaded
Return valueConnected device info

**
**

GetClientInfo

This method retrieves the stored data of the mobile device, in the context of a user profile.

ConnectedDeviceDto GetClientInfo(  
out TpFault fault,
TpAuthentication authentication,
Guid deviceConnectionId,
Guid clientConnectionId);
Needed Permissionsync@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
deviceConnectionIdId of the device for that the device info shall be loaded
clientConnectionIdId of the client connection that is bound with the device (not necessarily the id of the user profile)
Return valueConnected device info

SearchTimeEntriesForSynchronisation

This method searches all time entries and the depending projects as well as the tasks and customers that can be send to a mobile device since the given synchronisation time.

The method does not check the creation or modification date, but the date of the time entry if it’s newer than the sync time.

void SearchTimeEntriesForSynchronisation(  
out TpFault fault,
TpAuthentication authentication,
DateTime? lastSyncTime,
out IEnumerable<TimeEntryDto> timeEntries,
out IEnumerable<ProjectDto> projects,
out IEnumerable< TaskDto> commonTasks,
out IEnumerable<CustomerDto> customers);
Needed PermissiontimeEntries@upload
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
lastSyncTimeSynchronisation-Time
timeEntriesOutCollection of time entries starting with the given sync time
projectsOutProjects that are referenced by the found time entries
commonTasksOutCommon tasks that are referenced by the found time entries
customersOutCustomers that are referenced by the found time entries

SearchProjectsForSynchronisation

This method searches for all projects that a user can send to his mobile devices.

IEnumerable<ProjectDto> SearchProjectsForSynchronisation(  
out TpFault fault,
TpAuthentication authentication);
Needed Permissionprojects@upload
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
Return ValueProjects that can be used for synchronization purposes.

UpdateLastSyncDate

This method updates the synchronisation date for the current user.

void UpdateLastSyncDate(  
out TpFault fault,
DateTime? syncDate,
TpAuthentication authentication);
Needed PermissiontimeEntries@upload
NameModifierDescription
faultOutContains the error if an exception occurs.
syncDateSync Date to set, or null if the current date shall be used.
authenticationUser authentication

ApplyStaticData

This method imports the given projects and customers and merges it with the already existing.

void ApplyStaticData(  
out TpFault fault,
TpAuthentication authentication,
IEnumerable<ProjectDto> projects,
IEnumerable<TaskDto> commonTasks,
IEnumerable<CustomerDto> customers);
Needed Permissionprojects@download
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectsCollection of projects that shall be imported.
commonTasksCollection of common tasks that shall be imported.
customersCollection of customers that shall be imported.

ApplyTimeEntries

This method imports the given time-entries, projects as well as tasks and merges it with the already existing.

void ApplyTimeEntries(  
out TpFault fault,
TpAuthentication authentication,
IEnumerable<TimeEntrySaveDto> timeEntries,
IEnumerable<ProjectDto> projects,
IEnumerable<TaskDto> commonTasks,
IEnumerable<CustomerDto> customers);
Needed Permissionprojects@download
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
timeEntriesCollection of time entries to impoert
projectsCollection of projects that are referenced by the time entries.
commonTasksCollection of common tasks that are referenced by the time entries.
customersCollection of customers that that are referenced by the time entries.