Update a comment

put/documents/{objectTypeName}/{objectId}/comments
Internal-Use Only

Updates a comment on an object by specifying the object type and ID. During an Update operation, all properties of a comment are read-only except the category. This is for security and audit purposes in order to keep historical data accurate.

Request Samples

1

Response Samples

1{
2 "id": 1,
3 "category": "ExampleCategory",
4 "author": {
5 "id": "example",
6 "name": "ExampleUser"
7 },
8 "createDate": "2022-03-17T17:47:41.845Z",
9 "lastUpdatedAt": "2022-03-17T17:47:41.845Z",
10 "lastUpdatedBy": "example",
11 "detail": "ExampleComment"
12}

Path Parameters

NameTypeRequiredDescription
objectId
string
true

The ID of the object in which to update the comment.

objectTypeName
string
true

The name of the object type to which the object belongs.

Header Parameters

NameTypeRequiredDescription
If-Match
string
false

The ETag of the representation in the request. If this header value is provided, it must match the ETag of the current version of the resource on the server. Otherwise, the server responds with a 412 error.

Request Body

The comment to update.

Additional text on an internal document. During an Update operation, all properties of a comment are read-only except the category. This is for security and audit purposes to keep historical data accurate.

Example:
{"$ref":"#/components/examples/commentExample"}
NameTypeRequiredDescription
id
integer<int64>
false

The unique identifier for the comment.

category
string
false

The category of the comment.

author
Comment Author
false

Information about an author of a comment.

createDate
string<date-time>
false

The date on which the comment was created.

lastUpdatedAt
string<date-time>
false

The date on which the comment was updated.

lastUpdatedBy
string
false

The user who last updated the comment.

detail
string
false

Text of the comment.

Responses

StatusMeaningDescription
200OKThe request succeeded. The comment was created. HeadersSchema
400Bad RequestPotential reasons for a 400 error: - The objectTypeName was null or empty. - The ID was null or empty. - The comment was null. - Anything other than the comment category was changed. The error message that is returned clarifies the reason for the 400 error. Schema
404Not FoundThe object was not found, the user did not have permission to view it, or the comment does not exist. Schema
412Precondition FailedThe object in the request body was out of date.Schema