SendCPAction
Send quarantine or restore action and update action task id.
Source
from CommonServerPython import * def send_action_and_update_incident(entity: str, action: str, incident: str): result = demisto.executeCommand("checkpointhec-send-action", {"entity": entity, "action": action, "using": incident}) demisto.executeCommand("setIncident", {"customFields": json.dumps({"checkpointhecemailtask": result[0]["Contents"]["task"]})}) return result def main(): # pragma: no cover try: incident = demisto.incident()["sourceInstance"] args = demisto.args() entity = args.get("entity") action = args.get("action") return_results(send_action_and_update_incident(entity, action, incident)) except Exception as ex: demisto.error(traceback.format_exc()) return_error(f"Failed to execute BaseScript. Error: {ex!s}") if __name__ in ("__main__", "__builtin__", "builtins"): # pragma: no cover main()
README
Send quarantine or restore action and update action task id.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Cortex XSOAR Version | 6.9.0 |
Dependencies
This script uses the following commands and scripts.
- checkpointhec-send-action
- CheckPointHEC
Inputs
| Argument Name | Description |
|---|---|
| entity | Email entity id. |
| action | Action name. |
Outputs
There are no outputs for this script.