Developer Documentation Library > Interviewer - Server > Architecture > Interview Service tier > UNICOM Intelligence Interviewer - Offline for Windows Architecture > Synchronization process flow > Synchronization API
 
Synchronization API
The Synchronization API supports the synchronization of UNICOM Intelligence interview data between UNICOM Intelligence clients and servers. Synchronization support assigning interviewers (so interviewing can be completed efficiently), prevents data from being cleaned before analysis, and supports the following multimode project attributes:
recruitment in one mode; interviewing in another
interviewer transfer to self completion
global project where each country collects data in a single mode.
Sample synchronization workflow
This graphic is described in the surrounding text.
Quota synchronization workflow
This graphic is described in the surrounding text.
See
Ping
Register
Begin
End
Get
Put
OpenDownloadPackage
OpenUploadPackage
ClosePackage
See also
Synchronization process flow
Ping
Tests the synchronization web service availability.
Method declaration
void Ping()
See also
Synchronization API
Register
Registers the given user and computer with the server, thus ensuring that future synchronizations can take place.
Method declaration
void Register(string userId, string password, string computerId)
Parameters
userId
Data type: string
The ID that identifies the user to UNICOM Intelligence Interviewer - Server Admin.
password
Data type: string
The password associated with the provided user ID in UNICOM Intelligence Interviewer - Server Admin. The password is encrypted.
computerId
Data type: string
An ID that uniquely identifies the computer. The sending computer will typically generate a GUID for this purpose.
See also
Synchronization API
Begin
Begin a new synchronization session.
Method declaration
int Begin(string computerId)
Parameters
computerId
Data type: string
The GUID that is used to register with the server.
Return value
A session ID that identifies the current synchronization session. The session ID is a 32-bit integer and is used to identify the synchronization log entries.
See also
Synchronization API
End
Ends the current synchronization session.
Method declaration
void End (int status, string computerId)
Parameters
status
Data type: int
The synchronization status (bit flags)
0 = Success
1 = Error - project data - data cache files, participant records, and quota assignments (upload)
2 = Error - siteinfo changes (download)
4 = Error - project files - metadata document and supporting runtime files (download)
8 = Error - log files (upload)
16 = User Abort
32 = Error - console configuration (download)
64 = Error - Sample data
128 = Error - Quota data
256 = Error - project data - participant records and quota assignments (download)
512 = Error - shared content files (download)
computerId
Data type: string
The GUID that is used to register with the server.
See also
Synchronization API
Get
Ask the server to send data to the caller.
Method declaration
string Get(string definition, string computerId)
Parameters
definition
Data type: string
XML that describes the data being requested.
computerId
Data type: string
The GUID that is used to register with the server.
Return value
The return value is an XML string describing the requested data.
See also
Synchronization API
Put
Sends data from the a client to a server.
Method declaration
void Put (string definition, string computerId)
Parameters
definition
Data type: string
XML that describes the data being sent.
computerId
Data type: string
The GUID that is used to register with the server.
See also
Synchronization API
OpenDownloadPackage
Opens a package for download.
Method declaration
Stream OpenDownloadPackage (string packageId, string computerId)
Parameters
packageId
Data type: string
The package ID representing the download package. The ID returned from a Get Project-info request.
packageId must be unique across all clients.
computerId
Data type: string
The GUID that is used to register with the server.
Return value
The stream object that can be used to read or write data to the server.
See also
Synchronization API
OpenUploadPackage
Opens a package for upload.
Method declaration
Stream OpenUploadPackage (string packageId, string computerId, Stream data)
Parameters
packageId
Data type: string
The package ID representing the upload package. This is the client-specified value provided in the associated Put() request.
packageId must be unique across all clients.
computerId
Data type: string
The GUID that is used to register with the server.
data
Data type: stream
A System.IO.Stream object that represents the data being uploaded. The server reads from this stream and writes data to a temporary file.
See also
Synchronization API
ClosePackage
Closes a download or upload package. Any temporary files and objects used by the package are cleaned up on the server. It is not possible to reopen the package once it is closed. It is assumed that the associated stream object will be closed prior to closing the package. In the case of an upload, final processing of the uploaded files occurs at this time.
Method declaration
void ClosePackage (string packageId, string computerId)
Parameters
packageId
Data type: string
The package ID representing the requested download or upload package.
packageId must be unique across all clients.
computerId
Data type: string
The GUID that is used to register with the server.
See also
Synchronization API