getApprovalById method

Future<ApprovalDTO> getApprovalById({
  1. required String issueIdOrKey,
  2. required int approvalId,
})

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.

Implementation

Future<ApprovalDTO> getApprovalById(
    {required String issueIdOrKey, required int approvalId}) async {
  return ApprovalDTO.fromJson(await _client.send(
    'get',
    'rest/servicedeskapi/request/{issueIdOrKey}/approval/{approvalId}',
    pathParameters: {
      'issueIdOrKey': issueIdOrKey,
      'approvalId': '$approvalId',
    },
  ));
}