Documentation Center

Edit attachment

This API calls allows you to edit the comments and visibility associated with an existing attachment.

Example API call

/servlets3/wietmsd?id=1521041478673&book=s1000d_bike_41&collection=default&time=1521041477171&target=attach&action=attach_edit

Parameters

ParameterDescription
idA session ID that is valid for this collection and publication combination.
book The name of the publication, such as s1000d_bike_41.
collectionThe name of the collection that the publication is registered in, such as default.
timeTo 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 time parameter that is based on the time at which the call is made.
targetattach
actionattach_edit

XML post data

This API call requires XML post data to complete. An example of that XML data is given here. This example adds a comment to the attachment and sets its visibility to PRIVATE.
<attdata>
     <attach_id>1524670673310_1524671274590</attach_id>
     <comments>This is the text of the comment for this attachment.</comments>
     <user_name>admin</user_name>
     <visibility>PRIVATE</visibility>
</attdata>

Returns

On success
Returns nothing.
On failure
Returns nothing.