Web Services
Web Services
Version 9 Release 0
GC27-6379-00
IBM Datacap
Version 9 Release 0
GC27-6379-00
Note
Before using this information and the product it supports, read the information in “Notices” on page 51.
This edition applies to Version 8 Release 1 of Datacap (product number 5725-C15) and to all subsequent releases
and modifications until otherwise indicated in new editions.
© Copyright IBM Corporation 2014.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
ibm.com and related resources. . . . . v GET method for a batch ID - GetBatchId . . . . 22
How to send your comments . . . . . . . . . v GET method for batch history details -
Contacting IBM . . . . . . . . . . . . . vi GetBatchHistory. . . . . . . . . . . . . 23
GET method for a list of batches - GetBatchList . . 24
Datacap Web Services installation steps 1 PUT method to run a batch - GrabBatch . . . . . 26
PUT method to set the next pending batch status -
Datacap Web Services authentication . . . . . . 2
GrabNextPendingBatchOnJobTaskList . . . . . . 27
Configuring Datacap Web Services authentication 2
PUT method to release a batch - ReleaseBatch. . . 28
Configuring Datacap Web Services ADSI or LDAP
GET method for CCO information - GetCCO. . . . 29
authentication . . . . . . . . . . . . . 3
POST method to upload a file with a page object -
Configuring Datacap Web Services ADLDS or
UploadFile . . . . . . . . . . . . . . 31
LLLDAP authentication. . . . . . . . . . 3
POST method to upload files with no page object -
Setting up sharing permissions for Datacap Web
SetFile. . . . . . . . . . . . . . . . 32
Services . . . . . . . . . . . . . . . . 4
GET method to return a file - GetFile . . . . . 34
Setting up shared folder security for Datacap Web
POST method to copy files to the cache folder -
Services . . . . . . . . . . . . . . . . 4
CopyFilesToCache . . . . . . . . . . . . 35
Setting up application folders security for Datacap
PUT method to assign a page file name -
Web Services . . . . . . . . . . . . . . 5
SetPageFileName. . . . . . . . . . . . . 36
Installing Datacap Web Services . . . . . . . . 5
GET method for page file contents - GetPageFile . . 37
Datacap Web Services hosting options . . . . . . 6
GET method for a page file name - GetPageFileName 38
Setting up the Windows service to host Datacap
GET method for a list of applications -
Web Services . . . . . . . . . . . . . 6
GetApplicationList . . . . . . . . . . . 39
Setting up IIS to host Datacap Web Services . . . 7
GET method for a program settings file -
Importing encryption keys to Datacap computers . . 8
GetProgramFile . . . . . . . . . . . . . 40
POST method to save a user permission list -
Datacap Web Services REST API SetUserPermissionList . . . . . . . . . . 41
methods . . . . . . . . . . . . . . 9 POST method to save a group permissions list -
POST method to log on to an application - Logon . . 9 SetGroupPermissionList . . . . . . . . . . 42
POST method to log off an application - Logoff . . 10 GET method for user permissions list -
POST method to change a password - GetUserPermissionList . . . . . . . . . . 43
ChangeUserPassword . . . . . . . . . . . 11 GET method for group permissions list -
POST method to run rules on a batch - Execute . . 12 GetGroupPermissionList . . . . . . . . . . 44
POST method to create a batch record - CreateBatch 14 POST method to create or save a task - SaveTask . . 46
POST method to delete batches - DeleteBatches . . 16 GET method for mobile profiles -
GET method to check the integrity of a batch - GetMobileProfiles . . . . . . . . . . . . 48
CheckIntegrity . . . . . . . . . . . . . 17
POST method to save batch attributes - Notices . . . . . . . . . . . . . . 51
SaveBatchAttribute . . . . . . . . . . . 19
GET method for batch attributes -
GetBatchAttributes . . . . . . . . . . . 21
Index . . . . . . . . . . . . . . . 55
Product support is available on the Web. Click Support from the product Web site
at:
Datacap
http://www.ibm.com/support/entry/portal/Software/
Enterprise_Content_Management/Datacap_Taskmaster_Capture
Knowledge Center
You can view the product documentation on ibm.com. See Knowledge Center at
http://www.ibm.com/support/knowledgecenter/SSZRWV_9.0.0/.
PDF publications
You can view the PDF files online using the Adobe Acrobat Reader for your
operating system. If you do not have the Acrobat Reader installed, you can
download it from the Adobe Web site at http://www.adobe.com.
Tell us how you feel about the value of quality content by taking the Importance of
High Quality Technical Information survey at the following link:
http://www.ibm.com/survey/oid/wsb.dll/s/ag2c1. If you want to help IBM
make this product easier to install and use, take the Consumability Survey at the
following link: http://www.ibm.com/software/data/info/consumability-survey/.
Contacting IBM
To contact IBM customer service in the United States or Canada, call
1-800-IBM-SERV (1-800-426-7378).
To learn about available service options, call one of the following numbers:
v In the United States: 1-888-426-4343
v In Canada: 1-800-465-9600
For more information about how to contact IBM, see the Contact IBM Web site at
http://www.ibm.com/contact/us/.
You can install Datacap Web Services on a dedicated web server or on a web
server on which other Datacap Web Services components are installed. You must
have administrator access to all computers on which the Datacap software is
installed and to the server on which you install Datacap Web Services.
The following list is an overview of the steps that are required to install and
configure Datacap Web Services in a Datacap client/server environment.
v Ensure that you meet the prerequisites that are detailed in Installation and
configuration prerequisites.
v You can adjust the value of the maxAllowedContentLength and maxRequestLength
settings in the web.config file. The maximum size message that can be uploaded
depends on your web server, proxy server, and client.
v Determine which Datacap applications you want Datacap Web Services to
interact with and the type of interactions you want Datacap Web Services to
have with Datacap.
v Ensure that you can run all of the application tasks manually before you
configure Datacap Web Services to run them.
v Based on your authentication system, set up the Datacap Web Services
authentication credentials in the Application Manager for users and stations.
Access to the Datacap Web Services HTTP IP address and methods is limited to
authorized computers and users by a firewall or other network devices.
v Set up security permissions for Datacap Web Services on the Datacap shared
folder on the Datacap Server.
v Set up security permissions for Datacap Web Services account on the Datacap
folder that contains the application with which Datacap Web Services is to be
interacting.
v Install and configure Datacap Web Services on the web server, including
selecting the appropriate language for installation purposes and selecting
Datacap Web Service from the list of components.
v You can host Datacap Web Services as a Windows Service or you can set up IIS
to host Datacap Web Services. Validate the Datacap Web Services installation by
opening the help page.
– To host Datacap Web Services as a Windows Service, select the Datacap
Windows Service option in the installation wizard.
– To set up IIS to host Datacap Web Services, you must add the wTM website,
configure the application pool settings, and enable the ISAPI extension for All
Verbs.
v Import encryption keys to from the Datacap Server to the computer on which
you are installing Datacap Web Services to secure passwords that are sent across
the network.
v Set the location of the datacap.xml file.
The Datacap Web Services configured user, password, and station information is
retrieved from the Application Manager for authentication. Configure the
Application Manager Custom values settings with the name and value pair for the
user, password, and station authentication. Datacap Web Services uses settings in
the c:\Datacap\wTM\web.config file to determine the names of the keys that are
stored in the Application Manager from which the user name, password, and
station information is retrieved. You must set up the wTMUser, wTMPassword, and
wTMStation name and value pairs in the Application Manager that is based on your
authentication method. The web.config file contains the following lines that
identify the names of the keys.
<setting name="pathUser" serializeAs="String">
<value>values/gen/wTMUser</value>
</setting>
<setting name="pathPassword" serializeAs="String">
<value>values/adv/wTMPassword</value>
</setting>
<setting name="pathStation" serializeAs="String">
<value>values/gen/wTMStation</value>
</setting>
When you are using the Application Manager configured user, Datacap Web
Services authenticates with the Datacap Server when each endpoint is called. Each
time an endpoint is called, Datacap Web Services sends a request to the Datacap
Server to log in the user, then processes the endpoint action, and logs off the user.
When you are using the \Session\Logon endpoint, a user session is persisted for
subsequent calls to reduce the number of calls to the Datacap Server. When the
user is logged in, the session between Datacap Web Services and the Datacap
Server continues throughout all subsequent endpoints until the \Session\Logoff
endpoint is called or the session expires.
To avoid unauthorized user access when you use the \Session\Logon endpoint,
ensure that a user is not configured in the Application Manager. If you are using
ADSI or LDAP for your application, configure a separate instance of the Datacap
Server for Datacap Web Services to use the TMA, ADLDS, or LLLDAP
authentication method.
When your authentication system is TMA, follow this procedure to set up the
Datacap Web Services credentials for your application. In Application Manager,
add the name and value pair for a Datacap user, password, and station.
1. Add a name and value pair in General string values section of the Custom
values tab for the Datacap user name.
When your authentication system is ADSI or LDAP, follow this procedure to set up
the Datacap Web Services credentials for your application. In the Application
Manager, add the name and value pair for a user, password, and station.
1. Add a name and value pair in General string values section of the Custom
values tab for the blank user name.
v Value name: wTMUser
v Value: Leave this field blank.
2. Add a name and value pair in the General string values section of the Custom
values tab for the Datacap station name.
v Value name: wTMStation
v Value: Set to the Datacap station name.
3. Add a name and value pair in the Advanced values section of the Custom
values tab for the blank user password.
v Value name: wTMPassword
v Value: Leave this field blank.
When your authentication system is ADLDS or LLLDAP, you can configure the
user in the Application Manager or you can use the \Session\Logon endpoint for
authentication.
When you use theDatacap Web Services \Session\Logon method, you force each
client of the web service to provide credentials and authenticate. The session
between Datacap Web Services and the Datacap Server continues throughout all
If you configure the user, password, and station in the Application Manager,
Datacap Web Services authenticates with the Datacap Server when an endpoint is
called. Each time an endpoint is called, Datacap Web Services sends a request to
the Datacap Server to log in the user, then processes the endpoint action, and logs
off the user.
Follow this procedure to set up the Datacap Web Services credentials for your
application in the Application Manager. Add the name and value pair for a user,
password, and station. The user name and password must match the user name
and password that is set up in your ADLDS or LLLDAP authentication system.
1. Add a name and value pair in General string values section of the Custom
values tab for the Datacap Web Services user name.
v Value name: wTMUser
v Value: Enter the user name.
2. Add a name and value pair in the General string values section of the Custom
values tab for the Datacap Web Services station name.
v Value name: wTMStation
v Value: Enter the station name.
3. Add a name and value pair in the Advanced values section of the Custom
values tab for the Datacap Web Services user password.
v Value name: wTMPassword
v Value: Enter the password.
An example of the shared folder is the C:\Datacap folder on the Datacap Server.
Note that other accounts were already granted sharing permissions during the
initial installation and configuration of the Datacap Server.
1. On the server, start Windows Explorer, navigate to, and right-click the
c:\Datacap folder and select Properties.
2. Click the Sharing tab and ensure that the folder is shared with the Share name
of Datacap.
3. Click Advanced Sharing. When User Account Control (UAC) is on, the User
Account Control window is displayed. Click Yes.
4. Click Permissions. Ensure that the domain/Windows user ID of Datacap Web
Services is set to allow Full Control.
You must set up the security permissions for the Datacap Web Services account on
the shared folder, such as c:\Datacap. In the examples that are used in this
material, the shared folder is the c:\Datacap folder on the Datacap Server. Note
If you are setting up Datacap Web Services to run tasks from more than one
application, you must set up security permissions for each Datacap\Application
folder. Note that other accounts were already granted security permissions during
the initial installation and configuration of the Datacap server. In the examples that
are used in this material, the application files are found on the Datacap server in
the shared c:\Datacap folder.
1. On the server, start Windows Explorer, navigate to, and right-click the
c:\Datacap\Application folder and select Properties.
2. Click the Security tab and click Edit.
3. Ensure that the domain Windows user ID of the Datacap Web Services account
is set to Read.
Follow this procedure to install the Datacap Web Services software component on
the web server. You can also install the Datacap Windows Service, if you want to
host Datacap Web Services as a Windows service.
1. Make the installation package available on your network or insert the Datacap
CD in the web server's CD/DVD drive. If the installation process does not
start automatically or if the package is on the network, open Windows
Explorer, navigate to and double-click the Setup.exe.
2. Select the appropriate language, then click OK. The language that you select
determines the language that is displayed by the installation program during
the installation process.
3. When additional, redistributed software is required, the installation program
displays a list of the items to be installed. Click Install.
4. Click Next.
5. Accept the license agreement and click Next.
6. Select the Custom option and click Next.
7. Select the Datacap Web Service option from the list of components.
8. Select the Datacap Windows Service option from the list of components, if
you want to host Datacap Web Services as a Windows service.
9. Click Next.
10. Click Install.
11. Click Finish.
Datacap Web Services installation steps 5
Datacap Web Services hosting options
You can host Datacap Web Services as a Windows service or by configuring
Datacap Web Services on Microsoft Internet Information Services (IIS).
To host Datacap Web Services as a Windows service, select the custom option and
choose the Datacap Windows Service option in the installation wizard.
To host Datacap Web Services on Microsoft Internet Information Services (IIS), add
the wTM website and configure the application pool settings.
Follow this procedure to install and start the Datacap Windows Service to host the
Datacap Web Services.
1. Install the Datacap Windows Service from the installation wizard.
a. Make the installation package available on your network or insert the
Datacap CD in the web server's CD/DVD drive. If the installation process
does not start automatically or if the package is on the network, open
Windows Explorer, navigate to and double-click the Setup.exe.
b. Select the appropriate language, then click OK. The language that you select
determines the language that is displayed by the installation program
during the installation process.
c. When additional, redistributed software is required, the installation program
displays a list of the items to be installed. Click Install.
d. Click Next.
e. Accept the license agreement and click Next.
f. Select the Custom option and click Next.
g. Select the Datacap Windows Service option from the list of components.
h. Click Next.
i. Click Install.
j. Click Finish
2. Start the Datacap Windows Service.
a. Go to Administrative Tools > Services.
b. Right-click Datacap Windows Service and select Start.
3. Validate the installation of Datacap Web Services by opening the help page.
a. Go to c:\Datacap\Taskmaster and open wTMservice.exe.config with
Notepad.
b. Copy the baseAddress URL to your browser and add /help. The following
is an example of a baseAddress URL in the wTMservice.exe.config file.
<host>
<baseAddresses>
<add baseAddress="http://localhost:82/service" />
</baseAddresses>
</host>
Follow this procedure to set up the Datacap Web Services wTM website on Microsoft
Internet Information Services (IIS).
1. Add the Datacap Web Services in IIS.
a. From Start, select Administrative Tools > Internet Information Services
(IIS) Manager.
b. In the Connections pane, right-click Sites and select Add Web Site.
c. Set Site name to wTM. The Application pool is automatically set to wTM.
d. Set the Physical path by entering or browsing to the installation folder for
Datacap Web Services. The default location is C:\Datacap\wTM.
e. Select the IP address of the Datacap Web Services server and assign a
unique Port number and click OK to close the Add Web Site dialog.
Note: The Datacap Web Client and Datacap Web Services must be assigned
different port numbers when they are installed on the same server. The
Datacap Web Client does not work unless Datacap Web Services is assigned
a different port number.
2. Set up the Datacap Web Services IIS application pool.
a. In the Connections pane, select Application Pools.
b. In the Application Pools pane, select the wTM application pool. Select
Actions > Edit Application Pool > Advanced Settings.
c. Ensure that the .NET Framework Version is set to v4.0.
d. Ensure that Enable 32-Bit Applications is set to True.
e. Ensure that Managed Pipeline Mode is set to Integrated.
f. Ensure that Start Automatically is set to True.
g. In the Process Model section, click the Browse button next to Identity.
h. In the Application Pool Identity window, select Custom account and click
Set.
i. In the Set Credentials window, enter the wTM domain Windows account
information in the format, accountname@domainname. Enter the account
password and click OK.
j. In the Process Model section, set Load User Profile to True and click OK.
k. In the Connections pane, select the wTM site. In the Actions pane under
Manage Web Site, click Restart.
l. Confirm that the Application Pools, Default Web Site, and wTM website
are started.
3. Enable ISAPI extensions for All verbs and for execution on the Datacap Web
Services server.
a. In the Connections pane, select the wTM site. In the wTM Home pane,
double-click Handler Mappings.
You must generate the encryption keys in the keystore on a server on which the
Datacap server software component is installed. You export the new keys to a key
transport file.
URI
http://{IP address}:{Port}/ServicewTM.svc/Session/Logon
Request content
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Session/Logoff
Request content
The request content includes the wTmId cookie the request header.
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Session/ChangeUserPassword
Request content
Response content
The response contains the change result with a true/false string in the
changeResult attribute. The response also provides a message that states the change
is complete or the change failed.
Files that are retrieved from the batch folder or sent to the batch folder are cached
in a session folder on the Datacap Web Services server. When the web services
session ends, the session folder is deleted. When the application closes, all folders
are deleted.
The Execute POST method does not update batch attributes. If one of the values is
changed by the rules, such as Priority, the batch attributes must be updated by
using SaveBatchAttribute.
Caching is not required to run rules. If the BatchDir value is specified, the Datacap
Web Services accesses the batch folder directly. The BatchDir value must be empty
when the web.config setting enableCache is set to True to run rules against the
files in the cache folder. If enableCache is set to False, you must specify a batch
folder in BatchDir.
v Result is not needed when you are posting. It is the result of rules execution. You
can post with <Result></Result>.
v If you post the TargetDCOObbject property as empty, the page is targeted.
v ChildCondition is not needed when you are posting. It is the result of rules
execution that is set by the action Task_RaiseCondition. ChildCondition can be
empty or omitted when you post.
v ChildrenQuantity is not needed when you are posting. It is the result of rules
execution as set by the action Task_NumberOfSplits. ChildrenQuantity can be
empty or omitted when you post.
v XtraBatchFields are custom fields added to the Job Monitor. See Creating a custom
column in the Job Monitor. The caller can use the SaveBatchAttribute endpoint to
URI
http://{IP address}:{Port}/ServicewTM.svc/Rules/Execute
Request content
The request content for this method runs the rules on a batch.
Response content
The response for this method contains the same content as the Request content.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/CreateBatch
Request content
The request contains the application name and the job name. The request can also
contain the batch folder name, the new page file name, and the name of an
existing page file.
Table 5. Request content attributes for the POST method
Attribute Name Description
application The Datacap application name that is shown in the datacap.xml file.
The application name is required and must be the first attribute.
job The job name that is shown in a Datacap application workflow. The
job name is required and the batch creation task must be the first
task in the job.
batchFolder The name of the batch folder that is created is optional. When this
variable is not included, the batch folder is assigned a name by
Datacap.
Response content
The response for this method returns the following batch attributes.
Table 6. Response content attributes for the POST method
Attribute name Description of value
batchID The batch ID that is assigned to the batch by Datacap.
job The name of the job.
queueId The unique identifier that is assigned to the batch by Datacap.
status The status of the batch.
task The name of the task.
Datacap creates the batch folder and manages the adding of each file to the DCO
page file, such as adding the tm000001 node to scan.xml. The request content
contains an empty text value for the batchFolder node. The message content does
not contain a pageFile node.
<createBatchAttributes>
<application>APT</application>
<batchFolder></batchFolder>
<job>Main Job</job>
</createBatchAttributes>
Datacap creates the batch folder and the client manages the DCO page file. The
request content batchFolder node contains the XML to use for the page file. The B id
batch node attribute must be blank. This method is useful for transferring
metadata with or without the page objects. If page objects are specified, the
UploadFile endpoint must be used instead of SetFile.
<createBatchAttributes>
<application>APT</application>
<batchFolder></batchFolder>
<job>Main Job</job>
<pageFile>
<B id="">
<V n="STATUS">0</V>
<V n="TYPE">FastDoc</V>
<P id="TM000001">
<V n="TYPE">Other</V>
<V n="Status">49</V>
<V n="IMAGEFILE">TM000001.tif</V>
</P>
</B>
</pageFile>
</createBatchAttributes>
The client creates the batch folder and manages the DCO page file. The page file
name is provided and the page file is separately uploaded. The request content
message body pageFile node text contains the name of the page file, such as
scan.xml. After CreateBatch is called, then SetFile is called to upload the page
file.
<createBatchAttributes>
<application>APT</application>
<batchFolder>C:\Datacap\Batches\20130328.000087</batchFolder>
<job>Main Job</job>
<pageFile><file>scan.xml</file></pageFile>
</createBatchAttributes>
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/DeleteBatches/{application}
The URI for the POST method includes the following path elements.
Request content
The request deletes the batches that are associated with the application name.
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/CheckIntegrity/{application}/
{queueId}
The URI for the GET method includes the following path elements.
Table 10. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which the batch
integrity is checked.
Request content
Response content
The response for this method returns the ID, message, and returnCode content.
ID - In case of error, the last object that is checked.
message - Return message.
returnCode - One of the following values is returned.
0 = Passed.
1 = Has more child objects that allowed by the maximum attribute.
2 = Has fewer child objects than required by the minimum attribute.
3 = Invalid member – a child object is not of a type that is supported by
the parent.
4 = A child object is in the wrong position relative to other child objects as
specified by the position attribute.
The GET method also returns one of the following response codes.
Table 11. Response codes to the GET method
Response
Code Description
200 OK The request was successful.
400 Bad The request was not understood by the service due to malformed syntax.
Request
401 The request requires user authentication. If the request included valid
Unauthorized credentials, the 401 response indicates that authorization was refused for
those credentials.
405 Method The method that is specified in the Request-Line is not allowed for the
Not Allowed resource that is identified by the Request-URI. The response must include
an Allow header that contains a list of valid methods for the requested
resource.
500 Internal An unexpected condition was encountered that prevented the service from
Error fulfilling the request.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/SaveBatchAttribute/{application}
The URI for the POST method includes the following path elements.
Table 12. Path elements for the POST method
Name Type Required? Description
{application} String Yes The name of the application for which the
batch attributes are to be saved.
Request content
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/GetBatchAttributes/
{application}/{queueId}
The URI for the GET method includes the following path elements.
Table 14. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which the
batch attributes are to be returned.
{queueId} String Yes The unique identifier that is assigned to the
batch.
Request body
Response content
The GET method also returns one of the following response codes.
Table 16. Response codes for the GET method
Response Code Description
200 OK The request was successful.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/GetBatchId/{application}/
{queueId}
The URI for the GET method includes the following path elements.
Table 17. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which the
batch ID is to be returned.
{queueId} String Yes The unique identifier that is assigned to
the batch.
Request body
Response content
The GET method also returns one of the following response codes.
Table 18. Response codes for the GET method
Response Code Description
200 OK The request was successful.
400 Bad Request The request was not understood by the service because of malformed
syntax.
401 Unauthorized The request requires user authentication. If the request included valid
credentials, the 401 response indicates that authorization was refused
for those credentials.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/GetBatchHistory/{application}/
{queueId}
The URI for the GET method includes the following path elements.
Table 19. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which the
batch history is to be returned.
{queueId} String Yes The unique identifier that is assigned to the
batch.
Request body
Response content
The GET method also returns one of the following response codes.
Table 20. Response codes for the GET method
Response Code Description
200 OK The request was successful.
400 Bad Request The request was not understood by the service because of malformed
syntax.
401 Unauthorized The request requires user authentication. If the request included valid
credentials, the 401 response indicates that authorization was refused
for those credentials.
405 Method Not The method that is specified in the Request-Line is not allowed for
Allowed the resource that is identified by the Request-URI. The response must
include an Allow header that contains a list of valid methods for the
requested resource.
500 Internal Error An unexpected condition was encountered that prevented the service
from fulfilling the request.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/GetBatchList/{application}/
{pageSize}/{pageIndex}/{sort}
The URI for the GET method includes the following path elements.
Table 21. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which the list of
batches is to be returned.
{pageSize} String Yes The maximum number of batches in a list that you
can retrieve. If you set the pageSize value to 0 to
return a list of all batches, you must include
optional filtering to avoid a performance impact on
the Datacap Server and Datacap Web Services.
{pageIndex} String Yes The specific batches in a list that you want to
retrieve. For example, if there are 30 batches and
your pageSize is 10, enter 0 to retrieve the list of the
first 10 batches. Enter 1 to retrieve the list of the
second 10 batches and enter 2 to retrieve the list of
the last 10 batches.
{sort} String Yes You can sort the list of batches by any column in
the response.
Optional String No When you add an optional filter, you must use the
filters format, databaseField=Operator|Value. If you add
more than one optional filter, you must put an
ampersand between the filters. In the following
example, this method returns a list of the first 10
batches that have a pending status and a priority
value of 1. "http://localhost:55287/ServicewTM.svc/
Queue/GetBatchList/appname/10/0/
qu_id?qu_status==|pending&qu_priority==|1
Request content
Response content
The GET method also returns one of the following response codes:
http://{IP address}:{Port}/ServicewTM.svc/Queue/GrabBatch/{application}/
{queueId}
The URI for the PUT method includes the following path elements.
Table 23. Path elements for the PUT method
Name Type Required? Description
{application} String Yes The name of the application for which the
batch status is set to running.
{queueId} String Yes The unique identifier that is assigned to
the batch.
Request content
Response content
The response sets the batch status to running for the pending task.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/
GrabNextPendingBatchOnJobTaskList/{application}/{jobNameList}/{taskNameList}
The URI for the PUT method includes the following path elements.
Request content
Response content
The response sets the status of the next pending batch on the job and task list to
running.
The PUT method also returns one of the following response codes.
Table 26. Response codes for the PUT method
Response Code Description
201 Created The request was successful.
400 Bad Request The request was not understood by the service because of malformed
syntax.
401 The request requires user authentication. If the request included valid
Unauthorized credentials, the 401 response indicates that authorization was refused for
those credentials.
405 Method Not The method that is specified in the Request-Line is not allowed for the
Allowed resource that is identified by the Request-URI. The response must
include an Allow header that contains a list of valid methods for the
requested resource.
500 Internal An unexpected condition was encountered that prevented the service
Error from fulfilling the request.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/ReleaseBatch/{application}/
{queueId}/{status}
The URI for the PUT method includes the following path elements.
Request content
Response content
The response releases the batch for the next task in the workflow to process.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/GetCCO/{application}/
{queueId}/{imageFilename}
The URI for the GET method includes the following path elements.
Request content
Response content
The response content is the CCO information for the image file.
The GET method also returns one of the following response codes.
Table 30. Response codes for the GET method
Response Code Description
201 Created The request was fulfilled and resulted in the creation of a new
resource.
400 Bad Request The request was not understood by the service because of malformed
syntax.
401 Unauthorized The request requires user authentication. If the request included
authorization credentials, then the 401 response indicates that
authorization was refused for those credentials.
405 Method Not The method that is specified in the Request-Line is not allowed for
Allowed the resource that is identified by the Request-URI. The response must
include an Allow header that contains a list of valid methods for the
requested resource.
500 Internal Error An unexpected condition was encountered that prevented the service
from fulfilling the request.
The sequentially numbered page object is created in the page file. The task settings
contain the page file name. The page TYPE is always set to Other, and STATUS is
always set to 49. The page object contains the following information.
<P id="tm000001">
<V n="TYPE">Other</V>
<V n="STATUS">49</V>
<V n="IMAGEFILE">tm000001.tif</V>
</P>
http://{IP address}:{Port}/ServicewTM.svc/Queue/UploadFile/{application}/
{queueId}
The URI for the POST method includes the following path elements.
Table 31. Path elements for the POST method
Name Type Required? Description
{application} String Yes The name of the application for which the file
is to be uploaded.
{queueId} String Yes The unique identifier that is assigned to the
batch.
Request content
Response content
The response returns the original file name and the page ID.
If you specify a header field file name, then it is used as the file name for the
uploaded the file. If you do not specify a header field file name, then the {fileName}
in the SetFile URI is used as the file name for the uploaded file.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/SetFile/{application}/{queueId}/
{fileName}/{fileExtension}
The URI for the POST method includes the following path elements.
Table 33. Path elements for the POST method
Name Type Required? Description
{application} String Yes The name of the application for which the file
is to be uploaded.
{fileName} String Yes The name of the file that is to be uploaded.
{fileExtension} String Yes The file name extension of the file that is to be
returned, such as exe. Do not include the file
name path, set.xml.
Request content
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/GetFile/{application}/{queueId}/
{fileName}/{fileExtension}
The URI for the GET method includes the following path elements.
Table 35. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which
the file is to be returned.
{queueId} String Yes The unique identifier that is assigned to
the batch.
{fileName} String Yes The name of the file in the batches
directory that is to be returned. The
{fileName} must not have a dot such as
verify.1 or a plus sign such as
batch+profiler.
{fileExtension} String Yes The file name extension of the file that is
to be returned, such as xml. Do not
include the file name path, such as
verify.xml.
Request body
Response content
If the file is cached and an endpoint is used to retrieve a file from the batch folder,
the cached file is returned. If the file is not in the cache, the file is returned from
the batch folder and added to the cache. When you are calling an endpoint that
adds or updates a batch file, the file is saved to the cache but it is not saved to the
batch folder. When the batch is released, all files are copied from the cache and
will write over files that are in the batch folder.
The wTmId header value that is returned by the POST method Session/Logon must
be in the session header.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/CopyFilesToCache/
{application}/{queueId}
The URI for the POST method includes the following path elements.
Table 37. Path elements for the POST method
Name Type Required? Description
{application} String Yes The name of the application for which the files
are to be copied to the cache folder.
{queueId} String Yes The unique identifier that is assigned to the
batch.
Request content
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/SetPageFileName/{application}/
{queueId}/{fileName}/{fileExtension}
The URI for the PUT method includes the following path elements.
Table 39. Path elements for the PUT method
Name Type Required? Description
{application} String Yes The name of the application for which the
page file name for the batch is assigned.
{queueId} String Yes The unique identifier that is assigned to the
batch.
{fileName} String Yes The name of the file that is assigned.
{fileExtension} String Yes The file name extension of the file that is to be
returned, such as exe. Do not include the file
name path, set.xml.
Response content
The response sets the page file name for the batch.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/GetPageFile/{application}/
{queueId}
The URI for the GET method includes the following path elements.
Table 41. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which the
contents of the page file are to be returned.
{queueId} String Yes The unique identifier that is assigned to
the batch.
Request body
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/GetPageFileName/{application}/
{queueId}
The URI for the GET method includes the following path elements.
Table 43. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which the
page file name is to be returned.
{queueId} String Yes The unique identifier that is assigned to
the batch.
Request body
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Admin/GetApplicationList
Request content
Response content
The response contains the list of applications that are defined in the Datacap
Application Manager.
The GET method also returns one of the following response codes.
Table 45. Response codes for the GET method
Response Code Description
201 Created The request was fulfilled and resulted in the creation of a new resource.
400 Bad Request The request was not understood by the service because of malformed
syntax.
405 Method Not The method that is specified in the Request-Line is not allowed for the
Allowed resource that is identified by the Request-URI. The response must
include an Allow header that contains a list of valid methods for the
requested resource.
500 Internal An unexpected condition was encountered that prevented the service
Error from fulfilling the request.
URI
http://{IP address}:{Port}/ServicewTM.svc/Admin/GetProgramFile/{application}/
{fileName}/{fileExtension}
The URI for the GET method includes the following path elements:
Table 46. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which the
file is to be returned.
{fileName} String Yes The name of the file in the batches directory
that is to be returned. The {fileName} must
not have a dot such as verify.1 or a plus
sign such as batch+profiler.
{fileExtension} String Yes The file name extension of the file that is to
be returned, such as xml. Do not include the
file name path, such as verify.xml.
Request content
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Admin/SetUserPermissionList/
{application}/{userInd}
The URI for the POST method includes the following path elements.
Table 48. Path elements for the POST method
Name Type Required? Description
{application} String Yes The name of the application for which
the permissions list is to be saved.
{userInd} String Yes The index for a user is the value in the
us_ind column of the tmuser table in the
Administration database.
Request content
The request content contains the job and task index pair list for which the user has
permission.
Table 49. Request elements for the POST method
Name Description
Job The value of jb_ind from the job table of the Administration database.
Task The value of ts_ind from the tasks table of the Administration database.
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Admin/SetGroupPermissionList/
{application}/{groupInd}
The URI for the POST method includes the following path elements:
Table 51. Path elements for the POST method
Name Type Required? Description
{application} String Yes The name of the application for which the
permissions list is to be saved.
{groupInd} String Yes The index for a group is the value in the
gr_ind column of the tmgroup table in the
Admin database.
Request content
The request content contains the job and task index pair list for which the group
has permission.
Table 52. Request elements for the POST method
Name Description
Job The value of jb_ind from the job table of the Administration database.
Task The value of ts_ind from the tasks table of the Administration
database.
Response content
URI
http://{IP address}:{Port}/ServicewTM.svc/Admin/GetUserPermissionList/
{application}/{userInd}
The URI for the GET method includes the following path elements.
Table 54. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which
the permissions list is to be returned.
{userInd} String Yes The index for a user is the value in the
us_ind column of the tmuser table in
the Administration database.
Request content
The response contains the job and task index pair list for which the user has
permission. If -1 is returned for the task and job, the object has permission to all
job and task pairs.
Table 55. Response elements for the GET method
Name Description
Job The value of jb_ind from the job table of the Admin database.
Task The value of ts_ind from the tasks table of the Admin database.
http://{IP address}:{Port}/ServicewTM.svc/Admin/GetGroupPermissionList/
{application}/{groupInd}
The URI for the GET method includes the following path elements:
Table 57. Path elements for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which
the permissions list is to be returned.
{groupInd} String Yes The index for a group is the value in the
gr_ind column of the tmgroup table in
the Admin database.
Request content
Response content
The response contains the job and task index pair list for which the group has
permission. If -1 is returned for the task and job, the object has permission to all
job and task pairs.
Table 58. Response elements for the GET method
Name Description
Job The value of jb_ind from the job table of the Admin database.
Task The value of ts_ind from the tasks table of the Admin database.
The GET method also returns one of the following response codes.
Table 59. Response codes for the GET method
Response Code Description
200 OK The request was successful.
400 Bad Request The request was not understood by the service because of malformed
syntax.
401 The request requires user authentication. If the request included valid
Unauthorized credentials, the 401 response indicates that authorization was refused for
those credentials.
405 Method Not The method that is specified in the Request-Line is not allowed for the
Allowed resource that is identified by the Request-URI. The response must
include an Allow header that contains a list of valid methods for the
requested resource.
500 Internal An unexpected condition was encountered that prevented the service
Error from fulfilling the request.
URI
http://{IP address}:{Port}/ServicewTM.svc/Admin/SaveTask
Request content
The request contains the name of the application that is defined in the Application
Manager and the following task properties content.
Table 60. Task properties for the POST method
Task Property Description
conditions A comma-separated list of conditions, such as Skip_Verify.
desc The description of the task, such as Identify, Recognize, or Flag
Problems.
id The value of ts_ind from the tasks table of the Administration
database. When you are creating a new task, id must be empty.
jobId The job index value of jb_ind from the job table of the
Administration database. The jobId is optional for an existing task
but is required for a new task.
mode Sets the task as normal processing, batch creation, or task routing.
v 2 - Normal processing
v 3 - Batch creation
v 6 - Routing task
name The task name, such as Profiler.
program The executable file or web page file that is used by the task, such as
FastDoc.exe. You can use Rulerunner.exe for a background task
when the tasks are run by a client.
queueBy The value specifies the user and station to which the batch is
queued.
v 0 - No user or station is specified
v 1 - Station
v 2 - User
v 3 - Other Station
v 4 - Other User
v 5 - Station And User
v 6 - Station And Other User
v 7 - User And Other Station
v 8 - Other Station And Other User
Response content
The profile settings are a combination of task settings, batch fields, and batch level
dictionaries in the Setup DCO. A list of the Start Batch Panel fields is saved to the
profile on the mobile client.
In Datacap Web Client, you can set a batch creation task for a job to use the
Mobile Capture program. The GET method adds a mobile profile to the returned
list for each job and task pair. In addition to the task settings, the profile includes
the job and task IDs, the job and task indexes, and batch fields. The batch fields
include the DataType variables and a database column from the tmbatch table that
is updated with the field value.
URI
http://{IP address}:{Port}/ServicewTM.svc/Admin/GetMobileProfiles/{application}
The URI for the GET method includes the following path elements.
Table 62. Path element for the GET method
Name Type Required? Description
{application} String Yes The name of the application for which the
mobile profiles are to be returned.
Request content
Response content
The response for this method contains the mobile profiles for the Datacap
application.
The GET method also returns one of the following response codes.
Table 64. The wTM response to the GET method
Response Code Description
200 OK The request was successful.
400 Bad Request The request was not understood by the service because of
malformed syntax.
401 Unauthorized The request requires user authentication. If the request included
valid credentials, the 401 response indicates that authorization was
refused for those credentials.
405 Method Not The method that is specified in the Request-Line is not allowed for
Allowed the resource that is identified by the Request-URI. The response must
include an Allow header that contains a list of valid methods for the
requested resource.
500 Internal Error An unexpected condition was encountered that prevented the service
from fulfilling the request.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user's responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not grant you
any license to these patents. You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
IBM Corporation
J46A/G4
555 Bailey Avenue
San Jose, CA 95141-1003
U.S.A.
The licensed program described in this document and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement or any equivalent agreement
between us.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
All statements regarding IBM's future direction or intent are subject to change or
withdrawal without notice, and represent goals and objectives only.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
Notices 53
54 IBM Datacap: Installing and using Datacap Web Services
Index
A D Datacap Windows Service host
Datacap Web Services 6
application folders security Datacap folder Delete batches
Datacap Web Services 5 Datacap Web Services 4 POST method
Application list Sharing permissions 4 DeleteBatches 16
GET method Datacap web services
GetApplicationList 39 application folders security 5
Application Manager Datacap Web Services 4
ADLDS authentication 3 add wTM website 7 E
ADSI authentication 3 ADLDS authentication 3 encryption keys
Datacap Web Services 3 ADSI authentication 3 importing 8
Configuring TMA Application Manager 3 Execute rules on a batch
authentication 2 Authentication POST method
LDAP authentication 3 Configured user 2 Execute 12
LLLDAP authentication 3 Endpoint user 2
Assign a page file name Configuring TMA authentication
PUT method Application Manager 2 G
SetPageFileName 36 Datacap Windows Service host 6 Get batch list
Authentication GET method GET method
Datacap Web Services CheckIntegrity 17 GetBatchList 24
Configured user 2 GetApplicationList 39 Get CCO information
Endpoint user 2 GetBatchAttributes 21 GET method
GetBatchHistory 23 GetCCO 29
GetBatchId 22 GET method
B GetBatchList 24
GetCCO 29
CheckIntegrity 17
Base64 encoding GetApplicationList 39
GetFile 34 GetBatchAttributes 21
POST method
GetGroupPermissionList 45 GetBatchHistory 23
SetFile 32
GetMobileProfiles 48 GetBatchId 22
UploadFile 31
GetPageFile 37 GetBatchList 24
Batch attributes
GetPageFileName 38 GetCCO 29
GET method
GetProgramFile 40 GetFile 34
GetBatchAttributes 21
GetUserPermissionList 43 GetGroupPermissionList 45
Batch history
Hosting options GetMobileProfiles 48
GET method
IIS 6 GetPageFile 37
GetBatchHistory 23
Windows Service 6 GetPageFileName 38
Batch ID
IIS application pool settings 7 GetProgramFile 40
GET method
Installation steps 1 GetUserPermissionList 43
GetBatchId 22
Installing 5 Get page file contents
LDAP authentication 3 GET method
LLLDAP authentication 3
C POST method
GetPageFile 37
Get page file name
Change your password ChangeUserPassword 11 GET method
POST method CopyFilesToCache 35 GetPageFileName 38
ChangeUserPassword 11 CreateBatch 14 Group permissions list
Check batch integrity DeleteBatches 16 GET method
GET method Execute 12 GetGroupPermissionList 45
CheckIntegrity 17 Logoff 10
Copy files to the cache folder Logon 9
POST method SaveBatchAttribute 19
CopyFilesToCache 35 SaveTask 46 I
Create a batch record SetFile 32 IIS application pool settings
POST method SetGroupPermissionList 42 add wTM website 7
CreateBatch 14 SetUserPermissionList 41 Datacap Web Services 7
Create or save a task UploadFile 31 IIS hosting option
POST method PUT method Datacap Web Services 6
SaveTask 46 GrabBatch 27 import
GrabNextPendingBatch encryption keys 8
OnJobTaskList 27 Installation steps
ReleaseBatch 28 Datacap Web Services 1
SetPageFileName 36 Installing
REST API methods 9 Datacap Web Services 5
R
Release a batch
PUT method
ReleaseBatch 28
REST API methods
Datacap Web Services 9
Returns a file
GET method
GetFile 34
Run a batch
PUT method
GrabBatch 27
S
Save batch attributes
POST method
SaveBatchAttribute 19
GC27-6379-00