Skip to main content

comments

Creates, updates, deletes, gets or lists a comments resource.

Overview

Namecomments
TypeResource
Idaws.workdocs.comments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
comment_idstringThe ID of the comment. (pattern: <code>[\w+-.@]+</code>)
contributorobjectThe details of the user who made the comment.
created_timestampstring (date-time)The time that the comment was created.
parent_idstringThe ID of the parent comment. (pattern: <code>[\w+-.@]+</code>)
recipient_idstringIf the comment is a reply to another user's comment, this field contains the user ID of the user being replied to. (pattern: <code>[&\w+-.@]+</code>)
statusstringThe status of the comment. (DRAFT, PUBLISHED, DELETED)
textstringThe text of the comment.
thread_idstringThe ID of the root comment in the thread. (pattern: <code>[\w+-.@]+</code>)
visibilitystringThe visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors. (PUBLIC, PRIVATE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_commentsselectdocument_id, version_id, regionAuthentication, limit, markerList all the comments for the specified document version.
create_commentinsertdocument_id, version_id, regionAuthenticationAdds a new comment to the specified document version.
delete_commentdeletedocument_id, version_id, comment_id, regionAuthenticationDeletes the specified comment from the document version.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
comment_idstringThe ID of the comment.
document_idstringThe ID of the document.
regionstringAWS region (default: us-east-1)
version_idstringThe ID of the document version.
AuthenticationstringAmazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
limitintegerThe maximum number of items to return.
markerstringThe marker for the next set of results. This marker was received from a previous call.

SELECT examples

List all the comments for the specified document version.

SELECT
comment_id,
contributor,
created_timestamp,
parent_id,
recipient_id,
status,
text,
thread_id,
visibility
FROM aws.workdocs.comments
WHERE document_id = '{{ document_id }}' -- required
AND version_id = '{{ version_id }}' -- required
AND region = '{{ region }}' -- required
AND Authentication = '{{ Authentication }}'
AND limit = '{{ limit }}'
AND marker = '{{ marker }}'
;

INSERT examples

Adds a new comment to the specified document version.

INSERT INTO aws.workdocs.comments (
ParentId,
ThreadId,
Text,
Visibility,
NotifyCollaborators,
document_id,
version_id,
region,
Authentication
)
SELECT
'{{ ParentId }}',
'{{ ThreadId }}',
'{{ Text }}',
'{{ Visibility }}',
{{ NotifyCollaborators }},
'{{ document_id }}',
'{{ version_id }}',
'{{ region }}',
'{{ Authentication }}'
RETURNING
comment
;

DELETE examples

Deletes the specified comment from the document version.

DELETE FROM aws.workdocs.comments
WHERE document_id = '{{ document_id }}' --required
AND version_id = '{{ version_id }}' --required
AND comment_id = '{{ comment_id }}' --required
AND region = '{{ region }}' --required
AND Authentication = '{{ Authentication }}'
;