Data and AI Learning Group

 View Only
  • 1.  Datacap WebAPI

    Posted Mon August 15, 2022 11:30 AM
    I'm looking for information on the Datacap WebAPI beyond the API signatures and sparse documentation on the help page.
    Specifically, I'd like information
    1) on the sequencing of API calls in order to execute a given task profile (e.g., grabbatch, execute ruleset, releasebatch)
    2) how the batch cache should be used to minimize network traffic

    Thank you,

    ------------------------------
    Mark Daflucas
    ------------------------------


  • 2.  RE: Datacap WebAPI

    Posted Mon August 22, 2022 03:28 PM

    Not sure about minimizing network traffic because every GET and POST it's making calls to and from wTM services.   It's gonna be chatty back and forth.

    If you enable cache, wTM will cache the batch in the Program Date\WTM
    If you don't IIS or Window services will handle all that in memory. 

    Example:

    Logon
    Request- http://localhost:82/Service/Session/Logon

    <LogonProperties>
    <application>yourappsname</application>
    <password>admin</password>
    <station>1</station>
    <user>admin</user>
    </LogonProperties>

    2. Transaction start
    Request- http://localhost:82/Service/Transaction/Start

    test results
    transaction Id d0f1a2e1-41e5-4a20-af2d-864d36d50b1a

    3. setFile VScanMulti.xml

    Request- http://localhost:82/Service/Transaction/SetFile/d0f1a2e1-41e5-4a20-af2d-864d36d50b1a/VScanMulti/xml
    Raw data

    <?xml-stylesheet type="text/xsl" href="..\..\dco.xsl"?>
    <B id="d0f1a2e1-41e5-4a20-af2d-864d36d50b1a">
    <V n="TYPE">yourappsname</V>
    <V n="LAST_RR_TPROFILE">ScanFromDisk_MultiFormat:3</V>
    <P id="TM000001">
    <V n="TYPE">Other</V>
    <V n="IMAGEFILE">tm000001.pdf</V>
    <V n="ScanSrcPath">C:\Datacap\yourappsname\images\Input_MultiFormat\xxxxx.pdf</V>
    <V n="STATUS">49</V>
    </P>
    </B>

    4. SetFile PDF file
    Request- http://localhost:82/Service/Transaction/SetFile/d0f1a2e1-41e5-4a20-af2d-864d36d50b1a/tm000001/pdf

    5. Execute
    Request- http://localhost:82/Service/Transaction/Execute
    raw data as xml

    <Properties>
    <TransactionId>d0f1a2e1-41e5-4a20-af2d-864d36d50b1a</TransactionId>
    <Application>yourappsname</Application>
    <Workflow>yourappsname</Workflow>
    <PageFile>VScanMulti.xml</PageFile>
    <Rulesets>Ruleset1</Rulesets>
    </Properties>



    ------------------------------
    Duke Lam
    ------------------------------