The ObjectID endpoint accepts:
* POST for creating a comment
* PROPFIND to list comments, and also the read mark. You need to specify
attributes in the request.
* PROPPATCH to update the read mark, property name:
{http://owncloud.org/ns}readMarker
* REPORT to search comments
The CommentID endpoint accepts:
* PROPPATCH to update the comment
* DELETE to delete it
* PROPFIND to list all properties
For a list of properties, see:
https://github.com/nextcloud/server/blob/master/apps/dav/lib/Comments/CommentNode.php#L108
If you want a real life example of use, the announcement center has comments implemented.
See the comments related files in https://github.com/nextcloud/announcementcenter/tree/master/js
for frontend matters. Backendwise OCPCommentsICommentsManager is mostly close for housekeeping.
It was introduced in https://github.com/nextcloud/announcementcenter/pull/12, but
there are also some follow up PRs.
Comments
Comments have a PHP API within OCP and also via WebDAV. Basic documentation below.
Endpoint
The Comments resource has an endpoint:
` remote.php/comments/$OBJECTTYPE/$OBJECTID [/$COMMENTID] `
The ObjectID endpoint accepts: * POST for creating a comment * PROPFIND to list comments, and also the read mark. You need to specify attributes in the request. * PROPPATCH to update the read mark, property name: {http://owncloud.org/ns}readMarker * REPORT to search comments
The CommentID endpoint accepts: * PROPPATCH to update the comment * DELETE to delete it * PROPFIND to list all properties
For a list of properties, see: https://github.com/nextcloud/server/blob/master/apps/dav/lib/Comments/CommentNode.php#L108
Examples
REPORT request:
report.xml your receive:
Example Output (without headers):
If you want a real life example of use, the announcement center has comments implemented. See the comments related files in https://github.com/nextcloud/announcementcenter/tree/master/js for frontend matters. Backendwise OCPCommentsICommentsManager is mostly close for housekeeping. It was introduced in https://github.com/nextcloud/announcementcenter/pull/12, but there are also some follow up PRs.