forked from shaniacht1/content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomation-AlgosecGetTicket.yml
37 lines (36 loc) · 1023 Bytes
/
automation-AlgosecGetTicket.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
args:
- default: true
description: ID of requested change request
name: ticketId
required: true
comment: Retrieves a FireFlow change request by its ID
commonfields:
id: AlgosecGetTicket
version: -1
dependson:
must:
- algosec-get-ticket
name: AlgosecGetTicket
runonce: false
script: |
resp = demisto.executeCommand("algosec-get-ticket", demisto.args())
if isError(resp[0]):
demisto.results(resp)
else:
data = demisto.get(resp[0], "Contents.getTicketResponse")
if data:
raiseTable(data, 'ticket')
for key in data:
if isinstance(data[key], dict):
if '-xmlns' in data[key]:
del data[key]['-xmlns']
data[key] = zoomField(data[key], '#text')
data = flattenRow(data)
demisto.results({"ContentsFormat": formats["table"], "Type": entryTypes["note"], "Contents": data} )
else:
demisto.results("No results.")
scripttarget: 0
system: true
tags:
- Algosec
type: python