IncapListSites

List sites for an account

python · Imperva Incapsula

Source

import demistomock as demisto  # noqa: F401
from CommonServerPython import *  # noqa: F401

resp = demisto.executeCommand("incap-list-sites", demisto.args())

if isError(resp[0]):
    demisto.results(resp)
else:
    data = demisto.get(resp[0], "Contents.sites")
    if data:
        data = data if isinstance(data, list) else [data]
        data = [{k: formatCell(row[k]) for k in row} for row in data]
        demisto.results({"ContentsFormat": formats["table"], "Type": entryTypes["note"], "Contents": data})
    else:
        demisto.results("No results.")

README

Lists the sites for an account.

Script Data


Name Description
Script Type python
Tags Incapsula

Dependencies


This script uses the following commands and scripts.

  • incap-list-sites

Inputs


Argument Name Description
account_id The numeric identifier of the account to operate on. If this is not specified, the operation will be performed on the account identified by the authentication parameters.
page_size The number of objects to return in the response. The default is 50.
page_num The page to return starting from 0. The default is 0.

Outputs


There are no outputs for this script.