Creating Document Watch - ACS - Reference Guides

ACS Integration Guide

Product
ACS
Platform
7.9
Category
Reference Guides
Language
English
Target Audience
public

To watch a document indexed by AFS, a CKS user must create a Document Watch into a book or folder, a CKS user must use the POST method on the docwatch resource relative to this book or this folder.

WADL file

Resource

Method

document.wadl

/cks/instance/<service_id>-${Service_Status}/book/
{book_id}/
docwatch

POST

The following example shows how to create a document watch for the user Albert Einstein.

The id of this new search is 42 and its reference is /cks/instance/<service_id>-${Service_Status}/book/13/docwatch/42.

The request line is:

POST /cks/instance/<service_id>-${Service_Status}/book/13/docwatch?
afs:login=login://aeinsten:albert@CKS/<service_id>-${Service_Status}

The request body is:

<value xsi:type="cks.ws.docwatch.afs" xmlns="antidot:cks:input"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>Document watch</name>
<service xsi:type="cks.ws.afs.service">
<id>500</id>
<status>stable</status>
</service>
<uri>reply uri</uri>
</value>

The reply body is:

<value xsi:type="ws.response" xmlns="antidot:cks:output"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<result xsi:type="cks.ws.docwatch.afs"
reference="/cks/instance/<service_id>-${Service_Status}/book/13/docwatch/42">
<id>42</id>
<name>Document watch</name>
<isWatchingOn>true</isWatchingOn>
<pafId>0</pafId>
<service xsi:type="cks.ws.afs.service">
<id>500</id>
<status>stable</status>
</service>
<uri>reply uri</uri>
</result>
</value>