Creating Searches - ACS - Reference Guides

ACS Integration Guide

Product
ACS
AFS_Version
7.9
Category
Reference Guides
language
English
audience
public

To add a search into a book or folder, a CKS user must use the POST method on the search list resource relative to this book or this folder.

WADL file

Resource

Method

search.wadl

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

POST

The following example shows how to create a search for the user Albert Einstein. The id of this new search is 31 and its reference is /cks/instance/<service_id>-${Service_Status}/book/13/search/31.

The request line is:

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

The request body is:

<result xsi:type="cks.ws.search.afs" xmlns="antidot:cks:input"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<description>AFS search</description>
<schedule xsi:type=”cks.ws.schedule.hourly”>
<startTime xsi:type="time">09:00:00+02:00</startTime>
<period>12</period>
</schedule>
<name>This is search for Albert</name>
<url>http://www.antidot.net/search?afs:query=william</url>
</result>

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.search.afs"
reference="/cks/instance/<service_id>-${Service_Status}/book/13/search/31">
<id>31</id>
<description>AFS search</description>
<schedule xsi:type=”cks.ws.schedule.hourly”>
<startTime xsi:type="time" timestamp=”31583000”>
09:00:00+02:00
</startTime>
<period>12</period>
</schedule>
<name>This is search for Albert</name>
<url>
http://www.antidot.net/search?afs:query=william
</url>
</result>
</value>