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&target=annot&action=deleteall_annotations&type=bookmarks

Parameters

ParameterDescription
targetannot
actiondeleteall_annotations
typeAlways set to notes, bookmarks, or attachments, which are the valid types of 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.