catocli 2.0.1__py3-none-any.whl → 2.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of catocli might be problematic. Click here for more details.
- catocli/Utils/clidriver.py +41 -6
- catocli/__init__.py +1 -1
- catocli/parsers/custom/__init__.py +7 -5
- catocli/parsers/custom/customLib.py +490 -1
- catocli/parsers/custom/export_rules/__init__.py +5 -1
- catocli/parsers/custom/export_rules/export_rules.py +32 -183
- catocli/parsers/custom/export_sites/__init__.py +20 -0
- catocli/parsers/custom/export_sites/export_sites.py +365 -0
- catocli/parsers/custom/import_rules_to_tf/__init__.py +3 -3
- catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +20 -146
- catocli/parsers/custom/import_sites_to_tf/__init__.py +45 -0
- catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +891 -0
- catocli/parsers/mutation_accountManagement/__init__.py +18 -21
- catocli/parsers/mutation_admin/__init__.py +18 -21
- catocli/parsers/mutation_container/__init__.py +6 -7
- catocli/parsers/mutation_hardware/__init__.py +6 -7
- catocli/parsers/mutation_policy/__init__.py +666 -588
- catocli/parsers/mutation_policy_terminalServer/README.md +7 -0
- catocli/parsers/mutation_policy_terminalServer_addRule/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_addSection/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_createPolicyRevision/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_discardPolicyRevision/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_moveRule/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_moveSection/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_publishPolicyRevision/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_removeRule/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_removeSection/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_updatePolicy/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_updateRule/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_updateSection/README.md +18 -0
- catocli/parsers/mutation_sandbox/__init__.py +12 -14
- catocli/parsers/mutation_site/__init__.py +189 -175
- catocli/parsers/mutation_site_addSocketAddOnCard/README.md +17 -0
- catocli/parsers/mutation_site_removeSocketAddOnCard/README.md +17 -0
- catocli/parsers/mutation_site_startSiteUpgrade/README.md +17 -0
- catocli/parsers/mutation_sites/__init__.py +189 -175
- catocli/parsers/mutation_sites_addSocketAddOnCard/README.md +17 -0
- catocli/parsers/mutation_sites_removeSocketAddOnCard/README.md +17 -0
- catocli/parsers/mutation_sites_startSiteUpgrade/README.md +17 -0
- catocli/parsers/mutation_xdr/__init__.py +18 -21
- catocli/parsers/parserApiClient.py +36 -11
- catocli/parsers/query_accountBySubdomain/__init__.py +6 -7
- catocli/parsers/query_accountManagement/__init__.py +6 -7
- catocli/parsers/query_accountMetrics/__init__.py +6 -7
- catocli/parsers/query_accountRoles/__init__.py +6 -7
- catocli/parsers/query_accountSnapshot/__init__.py +6 -7
- catocli/parsers/query_admin/__init__.py +6 -7
- catocli/parsers/query_admins/__init__.py +6 -7
- catocli/parsers/query_appStats/__init__.py +6 -7
- catocli/parsers/query_appStatsTimeSeries/__init__.py +6 -7
- catocli/parsers/query_auditFeed/__init__.py +6 -7
- catocli/parsers/query_catalogs/__init__.py +6 -7
- catocli/parsers/query_container/__init__.py +6 -7
- catocli/parsers/query_devices/README.md +2 -1
- catocli/parsers/query_devices/__init__.py +6 -7
- catocli/parsers/query_entityLookup/__init__.py +6 -7
- catocli/parsers/query_events/__init__.py +6 -7
- catocli/parsers/query_eventsFeed/README.md +1 -1
- catocli/parsers/query_eventsFeed/__init__.py +6 -7
- catocli/parsers/query_eventsTimeSeries/__init__.py +6 -7
- catocli/parsers/query_hardware/__init__.py +6 -7
- catocli/parsers/query_hardwareManagement/__init__.py +6 -7
- catocli/parsers/query_licensing/__init__.py +6 -7
- catocli/parsers/query_policy/README.md +2 -1
- catocli/parsers/query_policy/__init__.py +6 -7
- catocli/parsers/query_sandbox/__init__.py +6 -7
- catocli/parsers/query_site/README.md +2 -1
- catocli/parsers/query_site/__init__.py +6 -7
- catocli/parsers/query_siteLocation/__init__.py +4 -8
- catocli/parsers/query_subDomains/__init__.py +6 -7
- catocli/parsers/query_xdr/__init__.py +12 -14
- catocli/parsers/raw/README.md +4 -0
- catocli/parsers/raw/__init__.py +5 -2
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/METADATA +1 -1
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/RECORD +108 -67
- graphql_client/api/call_api.py +12 -6
- models/mutation.policy.remotePortFwd.updateRule.json +6 -6
- models/mutation.policy.terminalServer.addRule.json +2403 -0
- models/mutation.policy.terminalServer.addSection.json +1358 -0
- models/mutation.policy.terminalServer.createPolicyRevision.json +1873 -0
- models/mutation.policy.terminalServer.discardPolicyRevision.json +1807 -0
- models/mutation.policy.terminalServer.moveRule.json +1605 -0
- models/mutation.policy.terminalServer.moveSection.json +1259 -0
- models/mutation.policy.terminalServer.publishPolicyRevision.json +1864 -0
- models/mutation.policy.terminalServer.removeRule.json +1253 -0
- models/mutation.policy.terminalServer.removeSection.json +958 -0
- models/mutation.policy.terminalServer.updatePolicy.json +1883 -0
- models/mutation.policy.terminalServer.updateRule.json +2096 -0
- models/mutation.policy.terminalServer.updateSection.json +1111 -0
- models/mutation.site.addSocketAddOnCard.json +1050 -0
- models/mutation.site.removeSocketAddOnCard.json +786 -0
- models/mutation.site.startSiteUpgrade.json +802 -0
- models/mutation.sites.addSocketAddOnCard.json +1050 -0
- models/mutation.sites.removeSocketAddOnCard.json +786 -0
- models/mutation.sites.startSiteUpgrade.json +802 -0
- models/query.devices.json +311 -2
- models/query.events.json +48 -0
- models/query.eventsFeed.json +12 -0
- models/query.eventsTimeSeries.json +36 -0
- models/query.licensing.json +21815 -10093
- models/query.policy.json +1898 -305
- models/query.site.json +225 -0
- models/query.siteLocation.json +97190 -295396
- schema/catolib.py +63 -30
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/LICENSE +0 -0
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/WHEEL +0 -0
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/entry_points.txt +0 -0
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
## CATO-CLI - mutation.sites.addSocketAddOnCard:
|
|
3
|
+
[Click here](https://api.catonetworks.com/documentation/#mutation-addSocketAddOnCard) for documentation on this operation.
|
|
4
|
+
|
|
5
|
+
### Usage for mutation.sites.addSocketAddOnCard:
|
|
6
|
+
|
|
7
|
+
`catocli mutation sites addSocketAddOnCard -h`
|
|
8
|
+
|
|
9
|
+
`catocli mutation sites addSocketAddOnCard <json>`
|
|
10
|
+
|
|
11
|
+
`catocli mutation sites addSocketAddOnCard "$(cat < addSocketAddOnCard.json)"`
|
|
12
|
+
|
|
13
|
+
`catocli mutation sites addSocketAddOnCard '{"addSocketAddOnCardInput": {"siteRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "socketAddOnCardInput": {"expansionSlotNumber": {"expansionSlotNumber": "enum(SocketAddOnExpansionSlotNumber)"}, "type": {"type": "enum(SocketAddOnType)"}}}}'`
|
|
14
|
+
|
|
15
|
+
#### Operation Arguments for mutation.sites.addSocketAddOnCard ####
|
|
16
|
+
`accountId` [ID] - (required) N/A
|
|
17
|
+
`addSocketAddOnCardInput` [AddSocketAddOnCardInput] - (required) N/A
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
## CATO-CLI - mutation.sites.removeSocketAddOnCard:
|
|
3
|
+
[Click here](https://api.catonetworks.com/documentation/#mutation-removeSocketAddOnCard) for documentation on this operation.
|
|
4
|
+
|
|
5
|
+
### Usage for mutation.sites.removeSocketAddOnCard:
|
|
6
|
+
|
|
7
|
+
`catocli mutation sites removeSocketAddOnCard -h`
|
|
8
|
+
|
|
9
|
+
`catocli mutation sites removeSocketAddOnCard <json>`
|
|
10
|
+
|
|
11
|
+
`catocli mutation sites removeSocketAddOnCard "$(cat < removeSocketAddOnCard.json)"`
|
|
12
|
+
|
|
13
|
+
`catocli mutation sites removeSocketAddOnCard '{"removeSocketAddOnCardInput": {"expansionSlotNumbers": {"expansionSlotNumbers": "enum(SocketAddOnExpansionSlotNumber)"}, "siteRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}}'`
|
|
14
|
+
|
|
15
|
+
#### Operation Arguments for mutation.sites.removeSocketAddOnCard ####
|
|
16
|
+
`accountId` [ID] - (required) N/A
|
|
17
|
+
`removeSocketAddOnCardInput` [RemoveSocketAddOnCardInput] - (required) N/A
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
## CATO-CLI - mutation.sites.startSiteUpgrade:
|
|
3
|
+
[Click here](https://api.catonetworks.com/documentation/#mutation-startSiteUpgrade) for documentation on this operation.
|
|
4
|
+
|
|
5
|
+
### Usage for mutation.sites.startSiteUpgrade:
|
|
6
|
+
|
|
7
|
+
`catocli mutation sites startSiteUpgrade -h`
|
|
8
|
+
|
|
9
|
+
`catocli mutation sites startSiteUpgrade <json>`
|
|
10
|
+
|
|
11
|
+
`catocli mutation sites startSiteUpgrade "$(cat < startSiteUpgrade.json)"`
|
|
12
|
+
|
|
13
|
+
`catocli mutation sites startSiteUpgrade '{"startSiteUpgradeInput": {"siteUpgradeRequest": {"site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "targetVersion": {"targetVersion": "String"}}}}'`
|
|
14
|
+
|
|
15
|
+
#### Operation Arguments for mutation.sites.startSiteUpgrade ####
|
|
16
|
+
`accountId` [ID] - (required) N/A
|
|
17
|
+
`startSiteUpgradeInput` [StartSiteUpgradeInput] - (required) N/A
|
|
@@ -12,40 +12,37 @@ def mutation_xdr_parse(mutation_subparsers):
|
|
|
12
12
|
help='addStoryComment() xdr operation',
|
|
13
13
|
usage=get_help("mutation_xdr_addStoryComment"))
|
|
14
14
|
|
|
15
|
-
mutation_xdr_addStoryComment_parser.add_argument('json', help='Variables in JSON format.')
|
|
15
|
+
mutation_xdr_addStoryComment_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
16
16
|
mutation_xdr_addStoryComment_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
17
|
-
mutation_xdr_addStoryComment_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
18
|
-
|
|
19
|
-
mutation_xdr_addStoryComment_parser.add_argument('-
|
|
20
|
-
|
|
21
|
-
mutation_xdr_addStoryComment_parser.add_argument('-
|
|
22
|
-
help='Pretty print')
|
|
17
|
+
mutation_xdr_addStoryComment_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
18
|
+
mutation_xdr_addStoryComment_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
19
|
+
mutation_xdr_addStoryComment_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
20
|
+
mutation_xdr_addStoryComment_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
21
|
+
mutation_xdr_addStoryComment_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
23
22
|
mutation_xdr_addStoryComment_parser.set_defaults(func=createRequest,operation_name='mutation.xdr.addStoryComment')
|
|
24
23
|
|
|
25
24
|
mutation_xdr_analystFeedback_parser = mutation_xdr_subparsers.add_parser('analystFeedback',
|
|
26
25
|
help='analystFeedback() xdr operation',
|
|
27
26
|
usage=get_help("mutation_xdr_analystFeedback"))
|
|
28
27
|
|
|
29
|
-
mutation_xdr_analystFeedback_parser.add_argument('json', help='Variables in JSON format.')
|
|
28
|
+
mutation_xdr_analystFeedback_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
30
29
|
mutation_xdr_analystFeedback_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
31
|
-
mutation_xdr_analystFeedback_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
32
|
-
|
|
33
|
-
mutation_xdr_analystFeedback_parser.add_argument('-
|
|
34
|
-
|
|
35
|
-
mutation_xdr_analystFeedback_parser.add_argument('-
|
|
36
|
-
help='Pretty print')
|
|
30
|
+
mutation_xdr_analystFeedback_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
31
|
+
mutation_xdr_analystFeedback_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
32
|
+
mutation_xdr_analystFeedback_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
33
|
+
mutation_xdr_analystFeedback_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
34
|
+
mutation_xdr_analystFeedback_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
37
35
|
mutation_xdr_analystFeedback_parser.set_defaults(func=createRequest,operation_name='mutation.xdr.analystFeedback')
|
|
38
36
|
|
|
39
37
|
mutation_xdr_deleteStoryComment_parser = mutation_xdr_subparsers.add_parser('deleteStoryComment',
|
|
40
38
|
help='deleteStoryComment() xdr operation',
|
|
41
39
|
usage=get_help("mutation_xdr_deleteStoryComment"))
|
|
42
40
|
|
|
43
|
-
mutation_xdr_deleteStoryComment_parser.add_argument('json', help='Variables in JSON format.')
|
|
41
|
+
mutation_xdr_deleteStoryComment_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
44
42
|
mutation_xdr_deleteStoryComment_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
45
|
-
mutation_xdr_deleteStoryComment_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
46
|
-
|
|
47
|
-
mutation_xdr_deleteStoryComment_parser.add_argument('-
|
|
48
|
-
|
|
49
|
-
mutation_xdr_deleteStoryComment_parser.add_argument('-
|
|
50
|
-
help='Pretty print')
|
|
43
|
+
mutation_xdr_deleteStoryComment_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
44
|
+
mutation_xdr_deleteStoryComment_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
45
|
+
mutation_xdr_deleteStoryComment_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
46
|
+
mutation_xdr_deleteStoryComment_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
47
|
+
mutation_xdr_deleteStoryComment_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
51
48
|
mutation_xdr_deleteStoryComment_parser.set_defaults(func=createRequest,operation_name='mutation.xdr.deleteStoryComment')
|
|
@@ -12,23 +12,38 @@ def createRequest(args, configuration):
|
|
|
12
12
|
instance = CallApi(ApiClient(configuration))
|
|
13
13
|
operationName = params["operation_name"]
|
|
14
14
|
operation = loadJSON("models/"+operationName+".json")
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
variablesObj = {}
|
|
16
|
+
if params["json"] and not params["t"]:
|
|
17
|
+
try:
|
|
18
|
+
variablesObj = json.loads(params["json"])
|
|
19
|
+
except ValueError as e:
|
|
20
|
+
print("ERROR: Query argument must be valid json in quotes. ",e,'\n\nExample: \'{"yourKey":"yourValue"}\'')
|
|
21
|
+
exit()
|
|
22
|
+
elif not params["t"] and params["json"] is None:
|
|
23
|
+
# Default to empty object if no json provided and not using -t flag
|
|
24
|
+
variablesObj = {}
|
|
20
25
|
if "accountId" in operation["args"]:
|
|
21
26
|
variablesObj["accountId"] = configuration.accountID
|
|
22
27
|
else:
|
|
23
28
|
variablesObj["accountID"] = configuration.accountID
|
|
24
|
-
|
|
29
|
+
if params["t"]==True:
|
|
30
|
+
# Skip validation when using -t flag
|
|
31
|
+
isOk = True
|
|
32
|
+
else:
|
|
33
|
+
isOk, invalidVars, message = validateArgs(variablesObj,operation)
|
|
25
34
|
if isOk==True:
|
|
26
35
|
body = generateGraphqlPayload(variablesObj,operation,operationName)
|
|
27
36
|
if params["t"]==True:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
# Load query from queryPayloads file
|
|
38
|
+
try:
|
|
39
|
+
queryPayloadFile = "queryPayloads/" + operationName + ".json"
|
|
40
|
+
queryPayload = loadJSON(queryPayloadFile)
|
|
41
|
+
if queryPayload and "query" in queryPayload:
|
|
42
|
+
print(queryPayload["query"])
|
|
43
|
+
else:
|
|
44
|
+
print("ERROR: Query not found in " + queryPayloadFile)
|
|
45
|
+
except Exception as e:
|
|
46
|
+
print("ERROR: Could not load query from " + queryPayloadFile + ": " + str(e))
|
|
32
47
|
return None
|
|
33
48
|
else:
|
|
34
49
|
try:
|
|
@@ -37,7 +52,13 @@ def createRequest(args, configuration):
|
|
|
37
52
|
return e
|
|
38
53
|
else:
|
|
39
54
|
print("ERROR: "+message,", ".join(invalidVars))
|
|
40
|
-
|
|
55
|
+
try:
|
|
56
|
+
queryPayloadFile = "queryPayloads/" + operationName + ".json"
|
|
57
|
+
queryPayload = loadJSON(queryPayloadFile)
|
|
58
|
+
print("\nExample: catocli "+operationName.replace(".", " "), json.dumps(queryPayload['variables']))
|
|
59
|
+
except Exception as e:
|
|
60
|
+
print("ERROR: Could not load query from " + queryPayloadFile + ": " + str(e))
|
|
61
|
+
|
|
41
62
|
def querySiteLocation(args, configuration):
|
|
42
63
|
params = vars(args)
|
|
43
64
|
operationName = params["operation_name"]
|
|
@@ -110,6 +131,9 @@ def querySiteLocation(args, configuration):
|
|
|
110
131
|
|
|
111
132
|
def createRawRequest(args, configuration):
|
|
112
133
|
params = vars(args)
|
|
134
|
+
# Handle endpoint override
|
|
135
|
+
if hasattr(args, 'endpoint') and args.endpoint:
|
|
136
|
+
configuration.host = args.endpoint
|
|
113
137
|
instance = CallApi(ApiClient(configuration))
|
|
114
138
|
isOk = False
|
|
115
139
|
try:
|
|
@@ -189,6 +213,7 @@ def validateArgs(variablesObj,operation):
|
|
|
189
213
|
isOk = False
|
|
190
214
|
invalidVars.append('"'+varName+'"')
|
|
191
215
|
message = "Invalid argument names. Looking for: "+", ".join(list(operation["operationArgs"].keys()))
|
|
216
|
+
|
|
192
217
|
if isOk==True:
|
|
193
218
|
for varName in operation["operationArgs"]:
|
|
194
219
|
if operation["operationArgs"][varName]["required"] and varName not in variablesObj:
|
|
@@ -6,12 +6,11 @@ def query_accountBySubdomain_parse(query_subparsers):
|
|
|
6
6
|
help='accountBySubdomain() query operation',
|
|
7
7
|
usage=get_help("query_accountBySubdomain"))
|
|
8
8
|
|
|
9
|
-
query_accountBySubdomain_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountBySubdomain_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountBySubdomain_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountBySubdomain_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_accountBySubdomain_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_accountBySubdomain_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_accountBySubdomain_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_accountBySubdomain_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_accountBySubdomain_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_accountBySubdomain_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_accountBySubdomain_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_accountBySubdomain_parser.set_defaults(func=createRequest,operation_name='query.accountBySubdomain')
|
|
@@ -6,12 +6,11 @@ def query_accountManagement_parse(query_subparsers):
|
|
|
6
6
|
help='accountManagement() query operation',
|
|
7
7
|
usage=get_help("query_accountManagement"))
|
|
8
8
|
|
|
9
|
-
query_accountManagement_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountManagement_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountManagement_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountManagement_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_accountManagement_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_accountManagement_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_accountManagement_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_accountManagement_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_accountManagement_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_accountManagement_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_accountManagement_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_accountManagement_parser.set_defaults(func=createRequest,operation_name='query.accountManagement')
|
|
@@ -6,12 +6,11 @@ def query_accountMetrics_parse(query_subparsers):
|
|
|
6
6
|
help='accountMetrics() query operation',
|
|
7
7
|
usage=get_help("query_accountMetrics"))
|
|
8
8
|
|
|
9
|
-
query_accountMetrics_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountMetrics_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountMetrics_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountMetrics_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_accountMetrics_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_accountMetrics_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_accountMetrics_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_accountMetrics_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_accountMetrics_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_accountMetrics_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_accountMetrics_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_accountMetrics_parser.set_defaults(func=createRequest,operation_name='query.accountMetrics')
|
|
@@ -6,12 +6,11 @@ def query_accountRoles_parse(query_subparsers):
|
|
|
6
6
|
help='accountRoles() query operation',
|
|
7
7
|
usage=get_help("query_accountRoles"))
|
|
8
8
|
|
|
9
|
-
query_accountRoles_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountRoles_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountRoles_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountRoles_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_accountRoles_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_accountRoles_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_accountRoles_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_accountRoles_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_accountRoles_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_accountRoles_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_accountRoles_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_accountRoles_parser.set_defaults(func=createRequest,operation_name='query.accountRoles')
|
|
@@ -6,12 +6,11 @@ def query_accountSnapshot_parse(query_subparsers):
|
|
|
6
6
|
help='accountSnapshot() query operation',
|
|
7
7
|
usage=get_help("query_accountSnapshot"))
|
|
8
8
|
|
|
9
|
-
query_accountSnapshot_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountSnapshot_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountSnapshot_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountSnapshot_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_accountSnapshot_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_accountSnapshot_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_accountSnapshot_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_accountSnapshot_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_accountSnapshot_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_accountSnapshot_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_accountSnapshot_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_accountSnapshot_parser.set_defaults(func=createRequest,operation_name='query.accountSnapshot')
|
|
@@ -6,12 +6,11 @@ def query_admin_parse(query_subparsers):
|
|
|
6
6
|
help='admin() query operation',
|
|
7
7
|
usage=get_help("query_admin"))
|
|
8
8
|
|
|
9
|
-
query_admin_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_admin_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_admin_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_admin_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_admin_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_admin_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_admin_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_admin_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_admin_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_admin_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_admin_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_admin_parser.set_defaults(func=createRequest,operation_name='query.admin')
|
|
@@ -6,12 +6,11 @@ def query_admins_parse(query_subparsers):
|
|
|
6
6
|
help='admins() query operation',
|
|
7
7
|
usage=get_help("query_admins"))
|
|
8
8
|
|
|
9
|
-
query_admins_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_admins_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_admins_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_admins_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_admins_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_admins_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_admins_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_admins_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_admins_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_admins_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_admins_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_admins_parser.set_defaults(func=createRequest,operation_name='query.admins')
|
|
@@ -6,12 +6,11 @@ def query_appStats_parse(query_subparsers):
|
|
|
6
6
|
help='appStats() query operation',
|
|
7
7
|
usage=get_help("query_appStats"))
|
|
8
8
|
|
|
9
|
-
query_appStats_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_appStats_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_appStats_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_appStats_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_appStats_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_appStats_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_appStats_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_appStats_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_appStats_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_appStats_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_appStats_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_appStats_parser.set_defaults(func=createRequest,operation_name='query.appStats')
|
|
@@ -6,12 +6,11 @@ def query_appStatsTimeSeries_parse(query_subparsers):
|
|
|
6
6
|
help='appStatsTimeSeries() query operation',
|
|
7
7
|
usage=get_help("query_appStatsTimeSeries"))
|
|
8
8
|
|
|
9
|
-
query_appStatsTimeSeries_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_appStatsTimeSeries_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_appStatsTimeSeries_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_appStatsTimeSeries_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_appStatsTimeSeries_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_appStatsTimeSeries_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_appStatsTimeSeries_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_appStatsTimeSeries_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_appStatsTimeSeries_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_appStatsTimeSeries_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_appStatsTimeSeries_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_appStatsTimeSeries_parser.set_defaults(func=createRequest,operation_name='query.appStatsTimeSeries')
|
|
@@ -6,12 +6,11 @@ def query_auditFeed_parse(query_subparsers):
|
|
|
6
6
|
help='auditFeed() query operation',
|
|
7
7
|
usage=get_help("query_auditFeed"))
|
|
8
8
|
|
|
9
|
-
query_auditFeed_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_auditFeed_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_auditFeed_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_auditFeed_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_auditFeed_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_auditFeed_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_auditFeed_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_auditFeed_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_auditFeed_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_auditFeed_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_auditFeed_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_auditFeed_parser.set_defaults(func=createRequest,operation_name='query.auditFeed')
|
|
@@ -6,12 +6,11 @@ def query_catalogs_parse(query_subparsers):
|
|
|
6
6
|
help='catalogs() query operation',
|
|
7
7
|
usage=get_help("query_catalogs"))
|
|
8
8
|
|
|
9
|
-
query_catalogs_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_catalogs_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_catalogs_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_catalogs_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_catalogs_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_catalogs_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_catalogs_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_catalogs_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_catalogs_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_catalogs_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_catalogs_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_catalogs_parser.set_defaults(func=createRequest,operation_name='query.catalogs')
|
|
@@ -6,12 +6,11 @@ def query_container_parse(query_subparsers):
|
|
|
6
6
|
help='container() query operation',
|
|
7
7
|
usage=get_help("query_container"))
|
|
8
8
|
|
|
9
|
-
query_container_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_container_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_container_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_container_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_container_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_container_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_container_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_container_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_container_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_container_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_container_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_container_parser.set_defaults(func=createRequest,operation_name='query.container')
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
`catocli query devices "$(cat < devices.json)"`
|
|
12
12
|
|
|
13
|
-
`catocli query devices '{"deviceAttributeCatalogInput": {"pagingInput": {"from": {"from": "Int"}, "limit": {"limit": "Int"}}, "sortOrderInput": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "stringFilterInput": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "deviceV2Input": {"deviceSortInput": {"category": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "confidence": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "firstSeen": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "hw": {"manufacturer": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "model": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "type": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "id": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "ip": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "lastSeen": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "name": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "network": {"networkName": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "subnet": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "nic": {"macAddress": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "vendor": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "os": {"product": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "vendor": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "version": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "riskScore": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "site": {"id": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "name": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "user": {"id": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "name": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}}, "deviceV2FilterInput": {"category": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "confidence": {"eq": {"eq": "enum(DeviceConfidenceLevel)"}, "in": {"in": "enum(DeviceConfidenceLevel)"}, "neq": {"neq": "enum(DeviceConfidenceLevel)"}, "nin": {"nin": "enum(DeviceConfidenceLevel)"}}, "firstSeen": {"between": {"between": ["DateTime"]}, "eq": {"eq": "DateTime"}, "gt": {"gt": "DateTime"}, "gte": {"gte": "DateTime"}, "in": {"in": ["DateTime"]}, "lt": {"lt": "DateTime"}, "lte": {"lte": "DateTime"}, "neq": {"neq": "DateTime"}, "nin": {"nin": ["DateTime"]}}, "hw": {"manufacturer": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "model": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "type": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "id": {"eq": {"eq": "ID"}, "in": {"in": ["ID"]}, "neq": {"neq": "ID"}, "nin": {"nin": ["ID"]}}, "ip": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "lastSeen": {"between": {"between": ["DateTime"]}, "eq": {"eq": "DateTime"}, "gt": {"gt": "DateTime"}, "gte": {"gte": "DateTime"}, "in": {"in": ["DateTime"]}, "lt": {"lt": "DateTime"}, "lte": {"lte": "DateTime"}, "neq": {"neq": "DateTime"}, "nin": {"nin": ["DateTime"]}}, "name": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "network": {"networkName": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "subnet": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "nic": {"macAddress": {"eq": {"eq": "MacAddress"}, "in": {"in": ["MacAddress"]}, "neq": {"neq": "MacAddress"}, "nin": {"nin": ["MacAddress"]}}, "vendor": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "os": {"product": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "vendor": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "version": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "riskScore": {"between": {"between": ["Int"]}, "eq": {"eq": "Int"}, "gt": {"gt": "Int"}, "gte": {"gte": "Int"}, "in": {"in": ["Int"]}, "lt": {"lt": "Int"}, "lte": {"lte": "Int"}, "neq": {"neq": "Int"}, "nin": {"nin": ["Int"]}}, "site": {"eq": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "in": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "neq": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "nin": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "user": {"eq": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "in": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "neq": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "nin": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}}, "pagingInput": {"from": {"from": "Int"}, "limit": {"limit": "Int"}}}, "sortOrderInput": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}'`
|
|
13
|
+
`catocli query devices '{"deviceAttributeCatalogInput": {"pagingInput": {"from": {"from": "Int"}, "limit": {"limit": "Int"}}, "sortOrderInput": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "stringFilterInput": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "deviceV2Input": {"deviceSortInput": {"category": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "confidence": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "firstSeen": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "hw": {"manufacturer": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "model": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "type": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "id": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "ip": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "lastSeen": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "name": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "network": {"networkName": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "subnet": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "nic": {"macAddress": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "vendor": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "os": {"product": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "vendor": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "version": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "riskScore": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "site": {"id": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "name": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}, "user": {"id": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}, "name": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}}, "deviceV2FilterInput": {"category": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "confidence": {"eq": {"eq": "enum(DeviceConfidenceLevel)"}, "in": {"in": "enum(DeviceConfidenceLevel)"}, "neq": {"neq": "enum(DeviceConfidenceLevel)"}, "nin": {"nin": "enum(DeviceConfidenceLevel)"}}, "firstSeen": {"between": {"between": ["DateTime"]}, "eq": {"eq": "DateTime"}, "gt": {"gt": "DateTime"}, "gte": {"gte": "DateTime"}, "in": {"in": ["DateTime"]}, "lt": {"lt": "DateTime"}, "lte": {"lte": "DateTime"}, "neq": {"neq": "DateTime"}, "nin": {"nin": ["DateTime"]}}, "hw": {"manufacturer": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "model": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "type": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "id": {"eq": {"eq": "ID"}, "in": {"in": ["ID"]}, "neq": {"neq": "ID"}, "nin": {"nin": ["ID"]}}, "ip": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "lastSeen": {"between": {"between": ["DateTime"]}, "eq": {"eq": "DateTime"}, "gt": {"gt": "DateTime"}, "gte": {"gte": "DateTime"}, "in": {"in": ["DateTime"]}, "lt": {"lt": "DateTime"}, "lte": {"lte": "DateTime"}, "neq": {"neq": "DateTime"}, "nin": {"nin": ["DateTime"]}}, "name": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "network": {"networkName": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "subnet": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "nic": {"macAddress": {"eq": {"eq": "MacAddress"}, "in": {"in": ["MacAddress"]}, "neq": {"neq": "MacAddress"}, "nin": {"nin": ["MacAddress"]}}, "vendor": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "os": {"product": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "vendor": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}, "version": {"eq": {"eq": "String"}, "in": {"in": ["String"]}, "neq": {"neq": "String"}, "nin": {"nin": ["String"]}}}, "riskScore": {"between": {"between": ["Int"]}, "eq": {"eq": "Int"}, "gt": {"gt": "Int"}, "gte": {"gte": "Int"}, "in": {"in": ["Int"]}, "lt": {"lt": "Int"}, "lte": {"lte": "Int"}, "neq": {"neq": "Int"}, "nin": {"nin": ["Int"]}}, "site": {"eq": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "in": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "neq": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "nin": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "user": {"eq": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "in": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "neq": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "nin": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}}, "pagingInput": {"from": {"from": "Int"}, "limit": {"limit": "Int"}}}, "jobId": "ID", "sortOrderInput": {"direction": {"direction": "enum(SortOrder)"}, "priority": {"priority": "Int"}}}'`
|
|
14
14
|
|
|
15
15
|
#### Operation Arguments for query.devices ####
|
|
16
16
|
`accountId` [ID] - (required) N/A
|
|
17
17
|
`deviceAttributeCatalogInput` [DeviceAttributeCatalogInput] - (optional) N/A
|
|
18
18
|
`deviceV2Input` [DeviceV2Input] - (optional) N/A
|
|
19
|
+
`jobId` [ID] - (required) N/A
|
|
19
20
|
`sortOrderInput` [SortOrderInput] - (optional) N/A
|
|
@@ -6,12 +6,11 @@ def query_devices_parse(query_subparsers):
|
|
|
6
6
|
help='devices() query operation',
|
|
7
7
|
usage=get_help("query_devices"))
|
|
8
8
|
|
|
9
|
-
query_devices_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_devices_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_devices_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_devices_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_devices_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_devices_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_devices_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_devices_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_devices_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_devices_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_devices_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_devices_parser.set_defaults(func=createRequest,operation_name='query.devices')
|
|
@@ -6,12 +6,11 @@ def query_entityLookup_parse(query_subparsers):
|
|
|
6
6
|
help='entityLookup() query operation',
|
|
7
7
|
usage=get_help("query_entityLookup"))
|
|
8
8
|
|
|
9
|
-
query_entityLookup_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_entityLookup_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_entityLookup_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_entityLookup_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_entityLookup_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_entityLookup_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_entityLookup_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_entityLookup_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_entityLookup_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_entityLookup_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_entityLookup_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_entityLookup_parser.set_defaults(func=createRequest,operation_name='query.entityLookup')
|
|
@@ -6,12 +6,11 @@ def query_events_parse(query_subparsers):
|
|
|
6
6
|
help='events() query operation',
|
|
7
7
|
usage=get_help("query_events"))
|
|
8
8
|
|
|
9
|
-
query_events_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_events_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_events_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_events_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_events_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_events_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_events_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_events_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_events_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_events_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_events_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_events_parser.set_defaults(func=createRequest,operation_name='query.events')
|