Now I understand what is going on. After I did some hands on in my side, the Work-item API does not return the completed work item and it is not mentioned in the API documentation apart from the state values which shows the Finished state as possible value. Unfortunately I’m not seeing any other option.
Note: When I dig deep into the UI call, it calls the private API to get the completed work item details and getting the below response.
{
"items": [
{
"id": "2c9180835d2e5168015d32f890ca1581",
"requester": "John Smith",
"targetClass": "sailpoint.object.Identity",
"targetId": "7991da301dd010399882a02f4b150684",
"ownerId": null,
"ownerName": "Jason Smith",
"targetName": ""john.smith",
"targetDisplayName": null,
"targetDescription": null,
"created": 1689858155713,
"modified": 1756331219544,
"description": "Create account on source 'AD",
"type": "Generic",
"state": "Finished",
"approvalSet": {
"items": [
{
"id": "2c9180835d2e5168015d32f890ca1581",
"application": "Active Directory",
"account": "john.smith",
"operation": "update",
"displayName": null,
"name": "emailAddress",
"displayValue": null,
"value": "a@b.com",
"state": "Finished"
}
]
},
"level": "Normal",
"complete": true,
"createdSinceMillis": 66535302014,
"modifiedSinceMillis": 62238183,
"remediationItems": null,
"requesterDisplayName": "John Smith",
"comments": [],
"form": null
}
],
"count": 1
}
I wish they could allow the API to return the completed work item also.