Skip to content

Function: getRequestComments() ​

ts
function getRequestComments(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  _expands?: string[];
  _links?: {
   [key: string]: unknown;
     base?: string;
     context?: string;
     next?: string;
     prev?: string;
     self?: string;
  };
  isLastPage?: boolean;
  limit?: number;
  size?: number;
  start?: number;
  values?: object[];
}>;

Defined in: src/serviceDesk/api/request.ts:407

This method returns all comments on a customer request. No permissions error is provided if, for example, the user doesn't have access to the service desk or request, the method simply returns an empty response.

Permissions required: Permission to view the customer request.

Response limitations: Customers are returned public comments only.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ expand?: string[]; internal?: boolean; issueIdOrKey: string; limit?: number; public?: boolean; start?: number; }-
parameters.expand?string[]A multi-value parameter indicating which properties of the comment to expand: - attachment returns the attachment details, if any, for each comment. (If you want to get all attachments for a request, use servicedeskapi/request/{issueIdOrKey}/attachment.) - renderedBody (Experimental) returns the rendered body in HTML format (in addition to the raw body) for each comment.
parameters.internal?booleanSpecifies whether to return internal comments or not. Default: true.
parameters.issueIdOrKey?stringThe ID or key of the customer request whose comments will be retrieved.
parameters.limit?numberThe maximum number of comments to return per page. Default: 50. See the Pagination section for more details.
parameters.public?booleanSpecifies whether to return public comments or not. Default: true.
parameters.start?numberThe starting index of the returned comments. Base index: 0. See the Pagination section for more details.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; _expands?: string[]; _links?: { [key: string]: unknown; base?: string; context?: string; next?: string; prev?: string; self?: string; }; isLastPage?: boolean; limit?: number; size?: number; start?: number; values?: object[]; }>