Skip to main content

replies

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

Overview

Namereplies
TypeResource
Idgoogleworkspace.drivev3.replies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringOutput only. The ID of the reply.
actionstringThe action the reply performed to the parent comment. Valid values are: * resolve * reopen
authorobjectInformation about a Drive user. (id: User)
contentstringThe plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.
createdTimestring (date-time)The time at which the reply was created (RFC 3339 date-time).
deletedbooleanOutput only. Whether the reply has been deleted. A deleted reply has no content.
htmlContentstringOutput only. The content of the reply with HTML formatting.
kindstringOutput only. Identifies what kind of resource this is. Value: the fixed string "drive#reply". (default: drive#reply)
modifiedTimestring (date-time)The last time the reply was modified (RFC 3339 date-time).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfileId, commentId, replyIdincludeDeletedGets a reply by ID.
listselectfileId, commentIdincludeDeleted, pageSize, pageTokenLists a comment's replies.
createinsertfileId, commentIdCreates a reply to a comment.
updateupdatefileId, commentId, replyIdUpdates a reply with patch semantics.
deletedeletefileId, commentId, replyIdDeletes a reply.

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
commentIdstring
fileIdstring
replyIdstring
includeDeletedboolean
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a reply by ID.

SELECT
id,
action,
author,
content,
createdTime,
deleted,
htmlContent,
kind,
modifiedTime
FROM googleworkspace.drivev3.replies
WHERE fileId = '{{ fileId }}' -- required
AND commentId = '{{ commentId }}' -- required
AND replyId = '{{ replyId }}' -- required
AND includeDeleted = '{{ includeDeleted }}'
;

INSERT examples

Creates a reply to a comment.

INSERT INTO googleworkspace.drivev3.replies (
data__id,
data__kind,
data__createdTime,
data__modifiedTime,
data__action,
data__author,
data__deleted,
data__htmlContent,
data__content,
fileId,
commentId
)
SELECT
'{{ id }}',
'{{ kind }}',
'{{ createdTime }}',
'{{ modifiedTime }}',
'{{ action }}',
'{{ author }}',
{{ deleted }},
'{{ htmlContent }}',
'{{ content }}',
'{{ fileId }}',
'{{ commentId }}'
RETURNING
id,
action,
author,
content,
createdTime,
deleted,
htmlContent,
kind,
modifiedTime
;

UPDATE examples

Updates a reply with patch semantics.

UPDATE googleworkspace.drivev3.replies
SET
data__id = '{{ id }}',
data__kind = '{{ kind }}',
data__createdTime = '{{ createdTime }}',
data__modifiedTime = '{{ modifiedTime }}',
data__action = '{{ action }}',
data__author = '{{ author }}',
data__deleted = {{ deleted }},
data__htmlContent = '{{ htmlContent }}',
data__content = '{{ content }}'
WHERE
fileId = '{{ fileId }}' --required
AND commentId = '{{ commentId }}' --required
AND replyId = '{{ replyId }}' --required
RETURNING
id,
action,
author,
content,
createdTime,
deleted,
htmlContent,
kind,
modifiedTime;

DELETE examples

Deletes a reply.

DELETE FROM googleworkspace.drivev3.replies
WHERE fileId = '{{ fileId }}' --required
AND commentId = '{{ commentId }}' --required
AND replyId = '{{ replyId }}' --required
;