Skip to content

Function: getRequestCommentById() ​

ts
function getRequestCommentById(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  _expands?: string[];
  _links?: {
   [key: string]: unknown;
     self?: string;
  };
  attachments?: {
   [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[];
  };
  author?: {
   [key: string]: unknown;
     _links?: {
      [key: string]: unknown;
        avatarUrls?: Record<string, string>;
        jiraRest?: string;
        self?: string;
     };
     accountId?: string;
     active?: boolean;
     displayName?: string;
     emailAddress?: string;
     key?: string;
     name?: string;
     timeZone?: string;
  };
  body?: string;
  created?: {
   [key: string]: unknown;
     epochMillis?: number;
     friendly?: string;
     iso8601?: string;
     jira?: string;
  };
  id?: string;
  public?: boolean;
  renderedBody?: {
   [key: string]: unknown;
     html?: string;
  };
}>;

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

This method returns details of a customer request's comment.

Permissions required: Permission to view the customer request.

Response limitations: Customers can only view public comments on requests where they are the reporter or a participant whereas agents can see both internal and public comments.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ commentId: number; expand?: string[]; issueIdOrKey: string; }-
parameters.commentIdnumberThe ID of the comment to retrieve.
parameters.expand?string[]A multi-value parameter indicating which properties of the comment to expand: - attachment returns the attachment details, if any, for the 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) of the comment.
parameters.issueIdOrKey?stringThe ID or key of the customer request that contains the comment.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; _expands?: string[]; _links?: { [key: string]: unknown; self?: string; }; attachments?: { [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[]; }; author?: { [key: string]: unknown; _links?: { [key: string]: unknown; avatarUrls?: Record<string, string>; jiraRest?: string; self?: string; }; accountId?: string; active?: boolean; displayName?: string; emailAddress?: string; key?: string; name?: string; timeZone?: string; }; body?: string; created?: { [key: string]: unknown; epochMillis?: number; friendly?: string; iso8601?: string; jira?: string; }; id?: string; public?: boolean; renderedBody?: { [key: string]: unknown; html?: string; }; }>