Filtering With Annotations - ACS - Reference Guides

ACS Integration Guide

Product
ACS
AFS_Version
7.9
Category
Reference Guides
language
English
audience
public

To filter entities with annotations, a CKS user must use:

  • the GET method on the filtered resource, and
  • the afs:filter parameter with a regular expression on the resource data.

Filtering with annotations is applicable to books, bookmarks, files, searches, folders, and users.

The following example shows how to look for all the books with the pertinence annotation with a value greater than zero.

The request line is:

GET /cks/instance/<service_id>-${Service_Status}/book?afs:login=login://aeinstein:albert@CKS/<service_id>-${Service_Status}&afs:filter=((annotation.name="pertinence")and(annotation.value>0))

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.book" reference="/cks/instance/<service_id>-${Service_Status}/book/13">
<id>13</id>
<annotations>
<annotation xsi:type="common.annotation.number"
name="pertinence">
<values>
<value xsi:type="number">10</value>
</values>
</annotation>
</annotations>
<name>Albert's Book </name>
<description>Alberts </description>
</result>
</value>