Sadly, you have to filter on the task-name field. The rest of the task's fields depend on the type of task it is, but there is no distinct "task-type" field. Also note the tasks are first-in-first-out. Task 1 is the oldest task in the list. To get recent policy installations, you have to look at the tasks towards the end of the list (thus my 'offset 2500' below).
Here is an exemplar task object corresponding to a successful policy installation. The policy package's name was Standard, and the firewall's name was DallasSA. Standard detail level first, then full detail level:
[Expert@DallasSA]# mgmt_cli -f json -r true show tasks limit 500 offset 2500 | jq -c '.tasks[]' | grep "Policy installation" | tail -n 1 | jq .
{
"task-id": "a8dee8f6-00f4-4a34-9d94-e29fa9ac6328",
"task-name": "Policy installation - Standard",
"status": "succeeded",
"progress-percentage": 100,
"suppressed": false,
"comments": "Installation succeeded on DallasSA",
"meta-info": {
"lock": "unlocked",
"validation-state": "ok",
"last-modify-time": {
"posix": 1691255301129,
"iso-8601": "2023-08-05T17:08+0000"
},
"last-modifier": "System",
"creation-time": {
"posix": 1691255275000,
"iso-8601": "2023-08-05T17:07+0000"
},
"creator": "System"
}
}
[Expert@DallasSA]# mgmt_cli -f json -r true show tasks limit 500 offset 2500 details-level full | jq -c '.tasks[]' | grep "Policy installation" | tail -n 1 | jq .
{
"uid": "d3e5cd97-5e4a-4730-a515-7a237a977131",
"type": "task",
"domain": {
"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",
"name": "SMC User",
"domain-type": "domain"
},
"task-id": "a8dee8f6-00f4-4a34-9d94-e29fa9ac6328",
"task-name": "Policy installation - Standard",
"status": "succeeded",
"progress-percentage": 100,
"start-time": {
"posix": 1691255274991,
"iso-8601": "2023-08-05T17:07+0000"
},
"last-update-time": {
"posix": 1691255301107,
"iso-8601": "2023-08-05T17:08+0000"
},
"suppressed": false,
"task-details": [
{
"uid": "385ec945-276e-49ed-b0c7-1e793159c713",
"name": null,
"domain": {
"uid": "41e821a0-3720-11e3-aa6e-0800200c9fde",
"name": "SMC User",
"domain-type": "domain"
},
"color": "black",
"statusCode": "succeeded",
"statusDescription": "Succeeded",
"taskNotification": "d3e5cd97-5e4a-4730-a515-7a237a977131",
"gatewayId": "ea61e15b-0a8e-e441-a015-31dec0dcd15b",
"policyId": "f9835641-5436-49fa-97e4-042a9fbb88de",
"fastInstallStatus": {
"worksessionId": "19ec3896-de91-4a08-998f-d057cdbac941",
"gatewayId": "ea61e15b-0a8e-e441-a015-31dec0dcd15b",
"policyId": "f9835641-5436-49fa-97e4-042a9fbb88de",
"status": "eligible",
"detailedReason": []
},
"runningStages": [],
"waitingStages": [],
"stagesInfo": [
{
"type": "info",
"stage": "modern verification",
"messages": []
}
],
"cluster": false,
"meta-info": {
"validation-state": "ok",
"last-modify-time": {
"posix": 1691255298536,
"iso-8601": "2023-08-05T17:08+0000"
},
"last-modifier": "System",
"creation-time": {
"posix": 1691255275622,
"iso-8601": "2023-08-05T17:07+0000"
},
"creator": "System"
},
"tags": [],
"icon": "General/globalsNa",
"comments": "",
"display-name": "",
"customFields": null,
"gatewayName": "DallasSA",
"revision": "19ec3896-de91-4a08-998f-d057cdbac941"
}
],
"comments": "Installation succeeded on DallasSA",
"color": "black",
"icon": "General/globalsNa",
"tags": [],
"meta-info": {
"lock": "unlocked",
"validation-state": "ok",
"last-modify-time": {
"posix": 1691255301129,
"iso-8601": "2023-08-05T17:08+0000"
},
"last-modifier": "System",
"creation-time": {
"posix": 1691255275000,
"iso-8601": "2023-08-05T17:07+0000"
},
"creator": "System"
},
"read-only": false
}