DeleteIndicatorRelationships
This automation allows to delete a relationship between indicator objects based on the relationship id.
- Type
- python
- Pack
- Base
Source
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
""" MAIN FUNCTION """
def main():
try:
ids = demisto.args().get("ids")
res = demisto.executeCommand("deleteRelationships", {"relationshipsIDsKey": ids})
if is_error(res[0]):
raise Exception("Error in DeleteIndicatorRelationships command - {}".format(res[0]["Contents"]))
hr = f"The relationships {ids!s} were deleted successfully."
return_results(CommandResults(readable_output=hr))
except Exception as ex:
return_error(f"Failed to execute DeleteIndicatorRelationships. Error: {ex!s}")
""" ENTRY POINT """
if __name__ in ("__main__", "__builtin__", "builtins"):
main()
README
This automation allows to delete a relationship between indicator objects based on the relationship id.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | basescript |
| Cortex XSOAR Version | 6.2.0 |
Inputs
| Argument Name | Description |
|---|---|
| ids | The IDs of the relationships to delete. Can accept a list of ID’s. |
Outputs
There are no outputs for this script.