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
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
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? | boolean | Specifies whether to return internal comments or not. Default: true. |
parameters.issueIdOrKey? | string | The ID or key of the customer request whose comments will be retrieved. |
parameters.limit? | number | The maximum number of comments to return per page. Default: 50. See the Pagination section for more details. |
parameters.public? | boolean | Specifies whether to return public comments or not. Default: true. |
parameters.start? | number | The 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[]; }>