Documentation Center

Delete all annotations

Deletes any annotations that the user has the appropriate rights to delete. This will not delete public annotations created by other users. The user should be prompted to confirm this choice before being allowed to execute this API call.

Example API call

/servlets3/wietmsd?id=1512644477522&book=s1000d_bike_41&collection=default&uniqid=1512643069765&target=annot&action=deleteall_annotations&type=bookmarks

Parameters

ParameterDescription
targetannot
actiondeleteall_annotations
uniqidTo prevent browser-side caching of data, especially with AJAX requests, it is important to make a URL unique. The most effective technique to accomplish this is to include a date parameter that is based on the time at which the call is made.
typeThis value is always set to notes or bookmarks, which means annotation.
idA session ID that is valid for this collection and publication combination.
bookThe name of the publication, such as PDMUNITTEST.
collectionThe name of the collection that the publication is registered in, such as default.

Returns

On success
The XML result of a call to the Load Annotations List XML API function, after the delete has completed. This is the updated list of annotations.
<ANNOTATIONS>
     <ANNBODY>
		        <ANNITEM CREATOR="guest" OBJECTID="S1000DBIKE-AAA-D00-00-00-00-AA-041-A-A" OFFSET="0" TYPE="N" VISIBILITY="PUBLIC">
			            <TITLE>note</TITLE>
			            <NOTE> new note</NOTE>
		        </ANNITEM>
	    </ANNBODY>
</ANNOTATIONS>
The following example shows the result when there are no annotations remaining after the deletion.
<ANNOTATIONS>
     <NOANNOTATIONS/>
</ANNOTATIONS>
On failure
The XML result of a call to the Load Annotations List XML API function, after the delete has completed. This is the updated list of annotations. If an annotation was not deleted, or is public and was created by another user, it will still be present in the list.