Function: getApprovalById()
ts
function getApprovalById(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
_links?: {
[key: string]: unknown;
self?: string;
};
approvers?: object[];
canAnswerApproval?: boolean;
completedDate?: {
[key: string]: unknown;
epochMillis?: number;
friendly?: string;
iso8601?: string;
jira?: string;
};
createdDate?: {
[key: string]: unknown;
epochMillis?: number;
friendly?: string;
iso8601?: string;
jira?: string;
};
finalDecision?: "pending" | string & object | "approved" | "declined";
id?: string;
name?: string;
}>;Defined in: src/serviceDesk/api/request.ts:238
This method returns an approval. Use this method to determine the status of an approval and the list of approvers.
Permissions required: Permission to view the customer request.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { approvalId: number; issueIdOrKey: string; } | - |
parameters.approvalId | number | The ID of the approval to be returned. |
parameters.issueIdOrKey? | string | The ID or key of the customer request the approval is on. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; _links?: { [key: string]: unknown; self?: string; }; approvers?: object[]; canAnswerApproval?: boolean; completedDate?: { [key: string]: unknown; epochMillis?: number; friendly?: string; iso8601?: string; jira?: string; }; createdDate?: { [key: string]: unknown; epochMillis?: number; friendly?: string; iso8601?: string; jira?: string; }; finalDecision?: "pending" | string & object | "approved" | "declined"; id?: string; name?: string; }>