Query Based on a Single Approval Request
SAM provides a built-in GET REST API to access Approval Request information. A sample follows.
Note: For readability only two fields are provided in the output.
http://<server ip>/sam/approvals/88@93
'88@93' in the previous URL is Approval Id.
Output:
{
"message": "",
"data": [
{
"approvalId": "88@93",
"seedIssue": "Y",
"profileId": "88@30990610",
"defaultActionId": null,
"closeStatus": null,
"fieldsAndData": [
{
"fieldmapId": "88@30990653",
"genericFieldId": null,
"genericFieldLabel": null,
"genericFieldName": "APPROVAL_ID",
"extFieldName": "APPROVAL_ID",
"overrideLabel": "Approval Id",
"fieldValue": "88@93",
"valid": null,
"drillDownURL": null,
"defaultView": "N",
"header": "N",
"validationText": null,
"keyField": "N",
"systemId": "0CX@32325372",
"systemname": "System",
"displayOrder": 1
},
{
"fieldmapId": "88@30990654",
"genericFieldId": null,
"genericFieldLabel": null,
"genericFieldName": "APPROVAL_STATUS",
"extFieldName": "APPROVAL_STATUS",
"overrideLabel": "Approval Status",
"fieldValue": "Draft",
"valid": null,
"drillDownURL": null,
"defaultView": "N",
"header": "N",
"validationText": null,
"keyField": "N",
"systemId": "0CX@32325372",
"systemname": "System",
"displayOrder": 2
},
],
"buttons": null,
"scmSystems": null,
"approvalAuditTrail": [
{
"atId": "88@94",
"approvalId": "88@93",
"approvalStatusId": "88@30993086",
"approvalStatus": "Draft",
"comments": null,
"overrideManagerId": "null",
"overrideManager": null,
"updatedById": "88@30993489",
"updatedByEmail": "thirupathi.rajendran@oracle.com",
"updatedBy": "Thirupathi Rajendran",
"updated": 1501064367000,
"version": null
}
]
}
]
}