catocli 2.0.2__py3-none-any.whl → 2.0.4__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 +4 -1
- catocli/__init__.py +1 -1
- catocli/parsers/custom/__init__.py +4 -3
- catocli/parsers/custom/customLib.py +239 -1
- catocli/parsers/custom/export_rules/__init__.py +2 -0
- catocli/parsers/custom/export_rules/export_rules.py +30 -6
- catocli/parsers/custom/export_sites/__init__.py +1 -0
- catocli/parsers/custom/export_sites/export_sites.py +194 -55
- catocli/parsers/custom/import_rules_to_tf/__init__.py +1 -1
- catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +1 -137
- 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 +6 -6
- catocli/parsers/mutation_admin/__init__.py +6 -6
- catocli/parsers/mutation_container/__init__.py +2 -2
- catocli/parsers/mutation_hardware/__init__.py +2 -2
- catocli/parsers/mutation_policy/__init__.py +192 -192
- catocli/parsers/mutation_sandbox/__init__.py +4 -4
- catocli/parsers/mutation_site/__init__.py +56 -56
- catocli/parsers/mutation_sites/__init__.py +56 -56
- catocli/parsers/mutation_xdr/__init__.py +6 -6
- catocli/parsers/parserApiClient.py +199 -12
- catocli/parsers/query_accountBySubdomain/__init__.py +2 -2
- catocli/parsers/query_accountManagement/__init__.py +2 -2
- catocli/parsers/query_accountMetrics/__init__.py +2 -2
- catocli/parsers/query_accountRoles/__init__.py +2 -2
- catocli/parsers/query_accountSnapshot/__init__.py +2 -2
- catocli/parsers/query_admin/__init__.py +2 -2
- catocli/parsers/query_admins/__init__.py +2 -2
- catocli/parsers/query_appStats/__init__.py +2 -2
- catocli/parsers/query_appStatsTimeSeries/__init__.py +2 -2
- catocli/parsers/query_auditFeed/__init__.py +2 -2
- catocli/parsers/query_catalogs/__init__.py +2 -2
- catocli/parsers/query_container/__init__.py +2 -2
- catocli/parsers/query_devices/__init__.py +2 -2
- catocli/parsers/query_entityLookup/__init__.py +2 -2
- catocli/parsers/query_events/__init__.py +2 -2
- catocli/parsers/query_eventsFeed/__init__.py +2 -2
- catocli/parsers/query_eventsTimeSeries/__init__.py +2 -2
- catocli/parsers/query_hardware/__init__.py +2 -2
- catocli/parsers/query_hardwareManagement/__init__.py +2 -2
- catocli/parsers/query_licensing/__init__.py +2 -2
- catocli/parsers/query_policy/__init__.py +2 -2
- catocli/parsers/query_sandbox/__init__.py +2 -2
- catocli/parsers/query_site/__init__.py +2 -2
- catocli/parsers/query_siteLocation/__init__.py +2 -2
- catocli/parsers/query_subDomains/__init__.py +2 -2
- catocli/parsers/query_xdr/__init__.py +4 -4
- catocli/parsers/raw/README.md +18 -0
- catocli/parsers/raw/__init__.py +5 -2
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/METADATA +1 -1
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/RECORD +57 -55
- schema/catolib.py +14 -9
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/LICENSE +0 -0
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/WHEEL +0 -0
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/entry_points.txt +0 -0
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/top_level.txt +0 -0
|
@@ -12,9 +12,9 @@ def query_xdr_parse(query_subparsers):
|
|
|
12
12
|
help='stories() xdr operation',
|
|
13
13
|
usage=get_help("query_xdr_stories"))
|
|
14
14
|
|
|
15
|
-
query_xdr_stories_parser.add_argument('json', help='Variables in JSON format.')
|
|
15
|
+
query_xdr_stories_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
16
16
|
query_xdr_stories_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
17
|
-
query_xdr_stories_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
17
|
+
query_xdr_stories_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
18
18
|
query_xdr_stories_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
19
19
|
query_xdr_stories_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
20
20
|
query_xdr_stories_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -25,9 +25,9 @@ def query_xdr_parse(query_subparsers):
|
|
|
25
25
|
help='story() xdr operation',
|
|
26
26
|
usage=get_help("query_xdr_story"))
|
|
27
27
|
|
|
28
|
-
query_xdr_story_parser.add_argument('json', help='Variables in JSON format.')
|
|
28
|
+
query_xdr_story_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
29
29
|
query_xdr_story_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
30
|
-
query_xdr_story_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
30
|
+
query_xdr_story_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
31
31
|
query_xdr_story_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
32
32
|
query_xdr_story_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
33
33
|
query_xdr_story_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
catocli/parsers/raw/README.md
CHANGED
|
@@ -13,3 +13,21 @@
|
|
|
13
13
|
`catocli raw '{ "query": "query operationNameHere($yourArgument:String!) { field1 field2 }", "variables": { "yourArgument": "string", "accountID": "10949" }, "operationName": "operationNameHere" } '`
|
|
14
14
|
|
|
15
15
|
`catocli raw '{ "query": "mutation operationNameHere($yourArgument:String!) { field1 field2 }", "variables": { "yourArgument": "string", "accountID": "10949" }, "operationName": "operationNameHere" } '`
|
|
16
|
+
|
|
17
|
+
#### Override API endpoint
|
|
18
|
+
|
|
19
|
+
`catocli raw --endpoint https://custom-api.example.com/graphql '<json>'`
|
|
20
|
+
|
|
21
|
+
#### Binary content and file uploads
|
|
22
|
+
|
|
23
|
+
Use `--binary` flag for multipart/form-data requests with file uploads:
|
|
24
|
+
|
|
25
|
+
`catocli raw --binary --file privateKey /path/to/file.pem '{ "operationName": "accountUpdate", "variables": { "update": { "cloudAccessConfiguration": { "cloudApplications": { "items": [{ "privateKey": null }] } } } }, "query": "mutation accountUpdate($update: AccountInput!) { accountUpdate(update: $update) { id } }" }'`
|
|
26
|
+
|
|
27
|
+
`catocli raw --binary --file 1 /path/to/file.pem '{ "operationName": "accountUpdate", "variables": { "update": { "version": "1234" } }, "query": "mutation { accountUpdate { id } }" }'`
|
|
28
|
+
|
|
29
|
+
The `--binary` flag enables multipart/form-data mode which is required for file uploads. Files are specified using `--file field_name file_path` where:
|
|
30
|
+
- `field_name` is the GraphQL variable path where the file should be mapped
|
|
31
|
+
- `file_path` is the local path to the file to upload
|
|
32
|
+
|
|
33
|
+
Multiple files can be uploaded by using multiple `--file` arguments.
|
catocli/parsers/raw/__init__.py
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
from ..parserApiClient import createRawRequest, get_help
|
|
3
3
|
|
|
4
4
|
def raw_parse(raw_parser):
|
|
5
|
-
raw_parser.add_argument('json', help='Query, Variables and opertaionName in JSON format.')
|
|
6
|
-
raw_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
5
|
+
raw_parser.add_argument('json', nargs='?', default='{}', help='Query, Variables and opertaionName in JSON format (defaults to empty object if not provided).')
|
|
6
|
+
raw_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
7
7
|
raw_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
8
8
|
raw_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
9
9
|
raw_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
10
10
|
raw_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
11
|
+
raw_parser.add_argument('--endpoint', dest='endpoint', help='Override the API endpoint URL (e.g., https://api.catonetworks.com/api/v1/graphql2)')
|
|
12
|
+
raw_parser.add_argument('--binary', action='store_true', help='Send multipart/form-data request for file uploads and binary content')
|
|
13
|
+
raw_parser.add_argument('--file', action='append', nargs=2, metavar=('FIELD', 'PATH'), dest='files', help='Add file for multipart upload. Format: --file field_name file_path')
|
|
11
14
|
raw_parser.set_defaults(func=createRawRequest,operation_name='raw')
|
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
catocli/__init__.py,sha256=
|
|
1
|
+
catocli/__init__.py,sha256=ajGxorfEwiU3tSC5f62zkinuEGSJny5SM4XGqKHMzpA,85
|
|
2
2
|
catocli/__main__.py,sha256=6Z0ns_k_kUcz1Qtrn1u7UyUnqB-3e85jM_nppOwFsv4,217
|
|
3
|
-
catocli/Utils/clidriver.py,sha256=
|
|
3
|
+
catocli/Utils/clidriver.py,sha256=736sqgZf7hszFTWJ0BGTaoPILziFdd_eAOp0Uz9ArXc,12655
|
|
4
4
|
catocli/Utils/profile_manager.py,sha256=Stch-cU2rLA7r07hETIRsvG_JxpQx3Q42QwpfD7Qd2I,6379
|
|
5
5
|
catocli/Utils/version_checker.py,sha256=rakF8LIeB1D_bbsT1cX6q4IaxYpGw4Yeq35BWa7QbEA,6698
|
|
6
|
-
catocli/parsers/parserApiClient.py,sha256=
|
|
6
|
+
catocli/parsers/parserApiClient.py,sha256=Ux-tpkMNQ_pL-RNHAOhI-YGsscqm7w92yynQf6AOCsU,19444
|
|
7
7
|
catocli/parsers/configure/__init__.py,sha256=Kq4OYGq_MXOQBHm8vxNkzJqCXp7zremYBfQ4Ai3_Lb4,3286
|
|
8
8
|
catocli/parsers/configure/configure.py,sha256=GyaOeuf0ZK3-wsZaczmO1OsKVJiPK04h6iI1u-EaKQc,12217
|
|
9
9
|
catocli/parsers/custom/README.md,sha256=UvCWAtF3Yh0UsvADb0ve1qJupgYHeyGu6V3Z0O5HEvo,8180
|
|
10
|
-
catocli/parsers/custom/__init__.py,sha256=
|
|
11
|
-
catocli/parsers/custom/customLib.py,sha256=
|
|
12
|
-
catocli/parsers/custom/export_rules/__init__.py,sha256=
|
|
13
|
-
catocli/parsers/custom/export_rules/export_rules.py,sha256=
|
|
14
|
-
catocli/parsers/custom/export_sites/__init__.py,sha256=
|
|
15
|
-
catocli/parsers/custom/export_sites/export_sites.py,sha256=
|
|
16
|
-
catocli/parsers/custom/import_rules_to_tf/__init__.py,sha256
|
|
17
|
-
catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py,sha256=
|
|
10
|
+
catocli/parsers/custom/__init__.py,sha256=HUI8WSjPs_GAN3ZtOQMtzK68-018zoe8qACt0yeVwp8,2889
|
|
11
|
+
catocli/parsers/custom/customLib.py,sha256=sR1aECqyrLjq-1YykUtY8PtzqM_E5LjrVpVtOuWx-Qk,24092
|
|
12
|
+
catocli/parsers/custom/export_rules/__init__.py,sha256=Cci1LwMN9VzwPuHOXqUDFORujDI96dJuN-YSccGlQZU,2564
|
|
13
|
+
catocli/parsers/custom/export_rules/export_rules.py,sha256=gXig4NC29yC5nW48ri-j0FEnaTz_kxKiuLF5y-5fZ_4,15646
|
|
14
|
+
catocli/parsers/custom/export_sites/__init__.py,sha256=WnTRNA4z4IS0rKR9r_UfuGv3bxp8nlt4YNH1Sed4toU,1378
|
|
15
|
+
catocli/parsers/custom/export_sites/export_sites.py,sha256=gjkXsx2LRYBvXGXm42Nib0Wz8tS_UNAe2Fp1Jno1vfQ,23521
|
|
16
|
+
catocli/parsers/custom/import_rules_to_tf/__init__.py,sha256=jFCFceFv8zDW7nGLZOXkFE6NXAMPYRwKQwTbhSawYdM,3908
|
|
17
|
+
catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py,sha256=kHzd3Iw9H6UeuSB-HE6vp3ZY38kGJk_ATgnDI2kus7k,18135
|
|
18
|
+
catocli/parsers/custom/import_sites_to_tf/__init__.py,sha256=xK4CMO0QhZJnOGPreagFL46ORl8113jpnM4UgwyNMc0,2739
|
|
19
|
+
catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py,sha256=-bOz1rcu07zxTklVA9VC9vXCBsulO9NqW24WzhH_CYg,39195
|
|
18
20
|
catocli/parsers/mutation/README.md,sha256=mdOfOY0sOVGnf9q-GVgtGc7mtxFKigD9q0ILJAw8l0I,32
|
|
19
21
|
catocli/parsers/mutation_accountManagement/README.md,sha256=8ipbdTU8FAAfiH3IYlTZkTbLpPtO0fMblra7Zi8vwAI,249
|
|
20
|
-
catocli/parsers/mutation_accountManagement/__init__.py,sha256=
|
|
22
|
+
catocli/parsers/mutation_accountManagement/__init__.py,sha256=pSvjeUB_1VNfoIM1jLQ_2_mXyRBUmryIFDDXeZvVz90,4865
|
|
21
23
|
catocli/parsers/mutation_accountManagement_addAccount/README.md,sha256=Ll-k0gzpmm526z-mT6X3zBhcl5vvB-vqx8EyAzLYZ5I,844
|
|
22
24
|
catocli/parsers/mutation_accountManagement_removeAccount/README.md,sha256=fEvfxt4simLJe2qb-iOJ3cFin1ZEnPqYBn-pJvdX_6k,596
|
|
23
25
|
catocli/parsers/mutation_accountManagement_updateAccount/README.md,sha256=J9xjWTu3PD8oTbXZC5W3k-dFMgVHMwXGoapZU13cGPU,720
|
|
24
26
|
catocli/parsers/mutation_admin/README.md,sha256=YzXrmiZf8gPKDd2ii__NztKfYxReu3MBOmswR3BGQHk,201
|
|
25
|
-
catocli/parsers/mutation_admin/__init__.py,sha256=
|
|
27
|
+
catocli/parsers/mutation_admin/__init__.py,sha256=VqJz5cvrcyInekvy7FTo2fgOffch1hl3_zkfl3ClDEE,4235
|
|
26
28
|
catocli/parsers/mutation_admin_addAdmin/README.md,sha256=ZeG9QvcpEUK0ENiySynEknA1YBl5inE3YHYB9dpAwAQ,985
|
|
27
29
|
catocli/parsers/mutation_admin_removeAdmin/README.md,sha256=a3Qc0gfn9GZGDSEU2wDE_fl0AkjMopEH81_mD22yC-8,542
|
|
28
30
|
catocli/parsers/mutation_admin_updateAdmin/README.md,sha256=UkxPvA3VxD0mLhxpFOlogQ8Zb-eGkH-C6ZaZSJaCUgE,994
|
|
29
31
|
catocli/parsers/mutation_container/README.md,sha256=thgVBv4Wjfs6eccdDxPd4oqHh6YjiAAcd1Vp4QRCZPg,217
|
|
30
|
-
catocli/parsers/mutation_container/__init__.py,sha256=
|
|
32
|
+
catocli/parsers/mutation_container/__init__.py,sha256=yWZdGUWdwryp4ETINPxwcfblXpgIPNntRELAwVQx3PU,1649
|
|
31
33
|
catocli/parsers/mutation_container_delete/README.md,sha256=YObmdTBucQjTA-0lwqdEP51C4JNQiqA38jhi14-mzQY,653
|
|
32
34
|
catocli/parsers/mutation_hardware/README.md,sha256=P5hGMibPxeZcOptPmI2UcYjN0zoeXmRjPBHnXX5SoZs,213
|
|
33
|
-
catocli/parsers/mutation_hardware/__init__.py,sha256=
|
|
35
|
+
catocli/parsers/mutation_hardware/__init__.py,sha256=ZigCBzlYeuF2sVoOu6XFx8MI-x9XEwTVC3CTlcSXy20,1837
|
|
34
36
|
catocli/parsers/mutation_hardware_updateHardwareShipping/README.md,sha256=K1KMuV7iKU9m0XzINsvnVghEACTWax7WcrG_F3__nZE,1314
|
|
35
37
|
catocli/parsers/mutation_policy/README.md,sha256=xYEidHz8nQH6ZoK2mPbaTD5sC3ARMC0fPLUm6FiuC2E,205
|
|
36
|
-
catocli/parsers/mutation_policy/__init__.py,sha256=
|
|
38
|
+
catocli/parsers/mutation_policy/__init__.py,sha256=B07EN4NnLTh-dmF5VIUi6JyX-k7QF2HaQ0ZKZDLowkw,151225
|
|
37
39
|
catocli/parsers/mutation_policy_appTenantRestriction/README.md,sha256=lg6x4zksQ38j_TjnhrajdfiMGva2DnG5evsPySAp27g,282
|
|
38
40
|
catocli/parsers/mutation_policy_appTenantRestriction_addRule/README.md,sha256=dpZrPynpPHjNfb-BUrJzPrxLZqRwPalLBpFHRx3cYzU,2782
|
|
39
41
|
catocli/parsers/mutation_policy_appTenantRestriction_addSection/README.md,sha256=2jcmasM7AIRHc7at9Dd9wArc-fXAD94lokOmNSfjHCg,1104
|
|
@@ -139,11 +141,11 @@ catocli/parsers/mutation_policy_wanNetwork_updatePolicy/README.md,sha256=sckjxSY
|
|
|
139
141
|
catocli/parsers/mutation_policy_wanNetwork_updateRule/README.md,sha256=I0lCtyRM5Fy-kwmsH7RIOu52SWn7KOa0OPIXDD76cyE,7680
|
|
140
142
|
catocli/parsers/mutation_policy_wanNetwork_updateSection/README.md,sha256=2su5NEI5mLnp8FseYBKi9HTptd9oqoXLamXT9cpxRYI,948
|
|
141
143
|
catocli/parsers/mutation_sandbox/README.md,sha256=qyb-LJe3Q2gqwkcmC1K7OU3gvasWKcc2-kToB_5tcQI,209
|
|
142
|
-
catocli/parsers/mutation_sandbox/__init__.py,sha256=
|
|
144
|
+
catocli/parsers/mutation_sandbox/__init__.py,sha256=KquzuoOj0MR9LtVEPjdtD2bW4zlhNvAusphxf_U0An0,3020
|
|
143
145
|
catocli/parsers/mutation_sandbox_deleteReport/README.md,sha256=UOaSYRmziuGiPrlWGeuHP78m154FKK0kob97ObLpj_o,632
|
|
144
146
|
catocli/parsers/mutation_sandbox_uploadFile/README.md,sha256=BxnXfvklKaD6uUmoDKIEFISWo6TL1KW7Ak5r4yNb7D4,608
|
|
145
147
|
catocli/parsers/mutation_site/README.md,sha256=VGtw4II0zTDPC4PyWohkkH1gcsbPtbNWH6FIUJK48Ew,197
|
|
146
|
-
catocli/parsers/mutation_site/__init__.py,sha256=
|
|
148
|
+
catocli/parsers/mutation_site/__init__.py,sha256=bNYVRPAKAagDjxqvhKO9wKtru_sd22agUzdbJCUecv4,40465
|
|
147
149
|
catocli/parsers/mutation_site_addBgpPeer/README.md,sha256=5yiH_ZF2a9N9QhbwkMFrG_z3bK8pufIls8t2VkGuU_Y,2443
|
|
148
150
|
catocli/parsers/mutation_site_addCloudInterconnectPhysicalConnection/README.md,sha256=P92mZUoE4l1c74OvVz9YRzDiD-JJro-7G0ITuKmOJBI,1488
|
|
149
151
|
catocli/parsers/mutation_site_addCloudInterconnectSite/README.md,sha256=h3rzLy7jhmunl1s1skdz0cKi8T6pHbyBrOhEvA4NHVc,1037
|
|
@@ -173,7 +175,7 @@ catocli/parsers/mutation_site_updateSiteGeneralDetails/README.md,sha256=33bldDxC
|
|
|
173
175
|
catocli/parsers/mutation_site_updateSocketInterface/README.md,sha256=Mlo9on-MKbCNJ76k5fAQu_duCv4uzyWO5VFTSGwyZGE,2458
|
|
174
176
|
catocli/parsers/mutation_site_updateStaticHost/README.md,sha256=UD0O85NWsR47YrHTzgOdLY1RzVujweOb79IWXDeSfwc,766
|
|
175
177
|
catocli/parsers/mutation_sites/README.md,sha256=0JLG9cOfCCFgUxvhRiAYW7yPfFYL0-I3JDkI2SYqHE4,201
|
|
176
|
-
catocli/parsers/mutation_sites/__init__.py,sha256=
|
|
178
|
+
catocli/parsers/mutation_sites/__init__.py,sha256=xtVofq4D5fWQoPmC9jmqHQc1rRUO3gBmUY-CAISose4,40836
|
|
177
179
|
catocli/parsers/mutation_sites_addBgpPeer/README.md,sha256=hFWjuC-IxTBxDs8H1JK5ImgeUVjbeRkdc9eQDeB52Ug,2450
|
|
178
180
|
catocli/parsers/mutation_sites_addCloudInterconnectPhysicalConnection/README.md,sha256=hro4USouqSm8wJcTBMteFTuzaoNh48wbAnINtD0nNBw,1495
|
|
179
181
|
catocli/parsers/mutation_sites_addCloudInterconnectSite/README.md,sha256=SjHGDUBykvI8f83ReMchq477gKEXnQEfFKbMU_dACJg,1044
|
|
@@ -203,67 +205,67 @@ catocli/parsers/mutation_sites_updateSiteGeneralDetails/README.md,sha256=TgltXfi
|
|
|
203
205
|
catocli/parsers/mutation_sites_updateSocketInterface/README.md,sha256=DwuqdAINbBGOLaJ7IFD9zBS5Ig7Rtvdyz7dJKCWc3j8,2465
|
|
204
206
|
catocli/parsers/mutation_sites_updateStaticHost/README.md,sha256=4K6xmd00JWiMsVnjapfiyK3VYryHK1kc9H7qYbcsSKs,773
|
|
205
207
|
catocli/parsers/mutation_xdr/README.md,sha256=-mc5BsFEpC7F6aSm0PZrOGONdJd-RroLGmiwshVGYmU,193
|
|
206
|
-
catocli/parsers/mutation_xdr/__init__.py,sha256=
|
|
208
|
+
catocli/parsers/mutation_xdr/__init__.py,sha256=uvfsfT0wpsvK78cDUsXu5a1-DgIjWdzer_2z2OeW0wU,4377
|
|
207
209
|
catocli/parsers/mutation_xdr_addStoryComment/README.md,sha256=4Epx61pArL3hzsFlRzDQeWjp_iDFKANvUfcwe9yp5sY,662
|
|
208
210
|
catocli/parsers/mutation_xdr_analystFeedback/README.md,sha256=e6_K2VZsaQxxI7Xs6BrmhWZJx0D_bw05P0vajCLA4lU,1159
|
|
209
211
|
catocli/parsers/mutation_xdr_deleteStoryComment/README.md,sha256=PWItOoDdyCeHcsE86x4whVOc80Ufh0p6SxC_PQ8SnI0,704
|
|
210
212
|
catocli/parsers/query/README.md,sha256=QX5L_NhJgpCSZy-bQcPRZw2gdJRxMPb6DtrRgVK9f5g,28
|
|
211
213
|
catocli/parsers/query_accountBySubdomain/README.md,sha256=tuR-M5nt4mjc8XxxXBv625J4Mt6v2QKGt_YwOxeTonk,583
|
|
212
|
-
catocli/parsers/query_accountBySubdomain/__init__.py,sha256=
|
|
214
|
+
catocli/parsers/query_accountBySubdomain/__init__.py,sha256=TaXxIlgjt6UI-LRpaBw_YrudS5nZDb_55XJIh-ih6mk,1412
|
|
213
215
|
catocli/parsers/query_accountManagement/README.md,sha256=FI3amhaUsbvcAezeW7y2EE0jNBRpnnqAl97SFOxWcRg,482
|
|
214
|
-
catocli/parsers/query_accountManagement/__init__.py,sha256=
|
|
216
|
+
catocli/parsers/query_accountManagement/__init__.py,sha256=cz-KgOymU-IwLqrWMfw15CjALkpIlRthiLRlLyo5Tu8,1398
|
|
215
217
|
catocli/parsers/query_accountMetrics/README.md,sha256=-xFk9mFwfqGY37vRfaD7mfOyvfjhwiB22LeLXdOE8YM,2891
|
|
216
|
-
catocli/parsers/query_accountMetrics/__init__.py,sha256=
|
|
218
|
+
catocli/parsers/query_accountMetrics/__init__.py,sha256=D89I-BDRVQBZ9wyPlYE-3kHOfgPOafkxJmPJeYv2zeE,1356
|
|
217
219
|
catocli/parsers/query_accountRoles/README.md,sha256=O4B0FeFuyReFWVqJUs1o42jGFnq-jY8-Yh28OzaFl_Y,572
|
|
218
|
-
catocli/parsers/query_accountRoles/__init__.py,sha256=
|
|
220
|
+
catocli/parsers/query_accountRoles/__init__.py,sha256=RsLMUMFZh39336EDv2R0eODBpXdFFZD2VoKWfChKOvg,1328
|
|
219
221
|
catocli/parsers/query_accountSnapshot/README.md,sha256=ITVt5oIhS7bVaYxhaThhU9zEbYzCBv1C2N13nFSERtc,727
|
|
220
|
-
catocli/parsers/query_accountSnapshot/__init__.py,sha256=
|
|
222
|
+
catocli/parsers/query_accountSnapshot/__init__.py,sha256=BozyWhE0uR85gCn5hvzhCBJwy3RHBYpxrXzuOCIbU6o,1370
|
|
221
223
|
catocli/parsers/query_admin/README.md,sha256=vVPaPIQb_UIvmh_fXmxhVpKfRgJqRZ802c1h6pckiL8,422
|
|
222
|
-
catocli/parsers/query_admin/__init__.py,sha256=
|
|
224
|
+
catocli/parsers/query_admin/__init__.py,sha256=ojhLtCvB5avtlvA5_rg1BW7G9x_p8YddbDq7ucRpgzE,1230
|
|
223
225
|
catocli/parsers/query_admins/README.md,sha256=n-9Sf1a0Z92l0XGRs1juTyRNwJiPsEYDWVkdHPTOH1M,720
|
|
224
|
-
catocli/parsers/query_admins/__init__.py,sha256=
|
|
226
|
+
catocli/parsers/query_admins/__init__.py,sha256=5YSKi4CxwGY4K2_7Rb0wlX1F71SXAFbWsGk3X7XPmOo,1244
|
|
225
227
|
catocli/parsers/query_appStats/README.md,sha256=E8HYnIkuGgE5DchQ0St066ne07y558Fk4caxNTQVjzc,1249
|
|
226
|
-
catocli/parsers/query_appStats/__init__.py,sha256=
|
|
228
|
+
catocli/parsers/query_appStats/__init__.py,sha256=aL8c7IWI1L9lUA8r5mu-NBueH6ayG9pLTm3m5Ye5F6A,1272
|
|
227
229
|
catocli/parsers/query_appStatsTimeSeries/README.md,sha256=3TMOMMzYOkz9HZem8PC92hM0qLDsFuBgiMMEs8rvO4E,1596
|
|
228
|
-
catocli/parsers/query_appStatsTimeSeries/__init__.py,sha256=
|
|
230
|
+
catocli/parsers/query_appStatsTimeSeries/__init__.py,sha256=bZ2DLolMn4W4fil3N1Iqv1wNCWGneHjD0QCYeylwoj4,1412
|
|
229
231
|
catocli/parsers/query_auditFeed/README.md,sha256=Ojiet38CEPIqFB379vfe8TNqm-_7jJSS8QXErk-oMak,1151
|
|
230
|
-
catocli/parsers/query_auditFeed/__init__.py,sha256=
|
|
232
|
+
catocli/parsers/query_auditFeed/__init__.py,sha256=7ba725YeQ24Eda66-V5vOZgAHQfxwsScThDJDR03oQo,1286
|
|
231
233
|
catocli/parsers/query_catalogs/README.md,sha256=ud2tAGSkLi4RBdQUHOIsKprN4Su4v0Y0BxPP0-LGWWc,3085
|
|
232
|
-
catocli/parsers/query_catalogs/__init__.py,sha256=
|
|
234
|
+
catocli/parsers/query_catalogs/__init__.py,sha256=oXoTTAuz-edWJjlB00G_E-y4UuQ9KIP8R8dwessVNnU,1272
|
|
233
235
|
catocli/parsers/query_container/README.md,sha256=qLRL-pE3j3fHD8_ycFHrFjBrs0GJkLeLj7FG9jUp9es,1836
|
|
234
|
-
catocli/parsers/query_container/__init__.py,sha256=
|
|
236
|
+
catocli/parsers/query_container/__init__.py,sha256=1nvNKSEyqc5zoXdb2DV4UyyO_5fraTpbrJkfF3h-ZCQ,1286
|
|
235
237
|
catocli/parsers/query_devices/README.md,sha256=exCc4Kcq0go0rE87caq9m63JPcLnIfvqreOS07wy7FU,6516
|
|
236
|
-
catocli/parsers/query_devices/__init__.py,sha256=
|
|
238
|
+
catocli/parsers/query_devices/__init__.py,sha256=zypEydZ1nn5x9_hS2gENK6qDsvXujzaB2nKZkakrM20,1258
|
|
237
239
|
catocli/parsers/query_entityLookup/README.md,sha256=YoJm7w0sWjQKdt5vQ5WZb5hAKecUiuXF-vQqi-V3T_w,2510
|
|
238
|
-
catocli/parsers/query_entityLookup/__init__.py,sha256=
|
|
240
|
+
catocli/parsers/query_entityLookup/__init__.py,sha256=dcdkg8XzsyDPTTNbtTZSQijoyq9grjFck0tu7NEAFc0,1328
|
|
239
241
|
catocli/parsers/query_events/README.md,sha256=fN0xe-I3omQEVE5lUYMJT1lJexQXp1--AFWT6ASEOn4,1243
|
|
240
|
-
catocli/parsers/query_events/__init__.py,sha256=
|
|
242
|
+
catocli/parsers/query_events/__init__.py,sha256=9tOtW_JScO3mxxhWX0JGlgBmQzDbw6WcFirv6u0U0Zc,1244
|
|
241
243
|
catocli/parsers/query_eventsFeed/README.md,sha256=df2VP02gCQN_eT3wG-epEzX5VqTz1_oMKzYYuSiRCBE,5511
|
|
242
|
-
catocli/parsers/query_eventsFeed/__init__.py,sha256=
|
|
244
|
+
catocli/parsers/query_eventsFeed/__init__.py,sha256=OfsBZ3sgzIp5WJbS6DGV5pQNrIbq8dE5QcFHhwjfunM,1300
|
|
243
245
|
catocli/parsers/query_eventsTimeSeries/README.md,sha256=HpQb8vQfdwg48hNK8dOGRd-Wq_BNywJuVSw2uevENYk,1599
|
|
244
|
-
catocli/parsers/query_eventsTimeSeries/__init__.py,sha256=
|
|
246
|
+
catocli/parsers/query_eventsTimeSeries/__init__.py,sha256=hK-KX_FEP636lKfAi6DDQd-9OrxrfPMZaLzH8_G2Rq4,1384
|
|
245
247
|
catocli/parsers/query_hardware/README.md,sha256=4KjQoBKpRxkKlbcIb-ImZOzWegS5iZfgam7SwHNDAsM,2698
|
|
246
|
-
catocli/parsers/query_hardware/__init__.py,sha256=
|
|
248
|
+
catocli/parsers/query_hardware/__init__.py,sha256=4lSXlS0QfRKqTv6qNCojBWvsv-Gr_h4LOvYuXZTpqjU,1272
|
|
247
249
|
catocli/parsers/query_hardwareManagement/README.md,sha256=XYPOtmBDzz7ERlt6xRaORGpVGgFjD7K3xhp-04pS-t8,1637
|
|
248
|
-
catocli/parsers/query_hardwareManagement/__init__.py,sha256=
|
|
250
|
+
catocli/parsers/query_hardwareManagement/__init__.py,sha256=9lBg5837W0hCju8_keWxUmSWvTM4Sj_5COKz7jnl_-k,1412
|
|
249
251
|
catocli/parsers/query_licensing/README.md,sha256=12rRUeUBY-PC-sTx9pBPVb5LM4gaKFG0aQkYqo5S9jc,410
|
|
250
|
-
catocli/parsers/query_licensing/__init__.py,sha256=
|
|
252
|
+
catocli/parsers/query_licensing/__init__.py,sha256=uxE1dHJqxSFHZWvSWhkiwnMgYMdaxzgVkLG135pwtes,1286
|
|
251
253
|
catocli/parsers/query_policy/README.md,sha256=VFbioavuKnWK9bac5cnArYFq7tYATRPzh6X73m0hnv8,1949
|
|
252
|
-
catocli/parsers/query_policy/__init__.py,sha256=
|
|
254
|
+
catocli/parsers/query_policy/__init__.py,sha256=quC_AcLnohPlYI3N_TY-pMCXRD2PJfeuMqVhGlOwgkM,1244
|
|
253
255
|
catocli/parsers/query_sandbox/README.md,sha256=vt6_akDngwlxpH2cfgx5ImH5D1AmI_IdK5XG9mWHE9U,1318
|
|
254
|
-
catocli/parsers/query_sandbox/__init__.py,sha256=
|
|
256
|
+
catocli/parsers/query_sandbox/__init__.py,sha256=agNFSXwyd9F5OTkUZfyVzCIRrZ4HnoBu2J5SiuUwYBg,1258
|
|
255
257
|
catocli/parsers/query_site/README.md,sha256=bMyUG35sG5pkg9X1D2Euc-yHI3uxQyfMhKmj9tzCa7s,1605
|
|
256
|
-
catocli/parsers/query_site/__init__.py,sha256=
|
|
258
|
+
catocli/parsers/query_site/__init__.py,sha256=5OqK6aHYB7nGKZzyQMG3uqC_VvPvsiIOc42mdnakT8c,1216
|
|
257
259
|
catocli/parsers/query_siteLocation/README.md,sha256=FjUgqoDeOCkeIzJbvZCf0norvIKFcNTT1y2BLVe8uPE,1503
|
|
258
|
-
catocli/parsers/query_siteLocation/__init__.py,sha256=
|
|
260
|
+
catocli/parsers/query_siteLocation/__init__.py,sha256=yZg9g7ZulvO4V6Ol6sDjGXdmcTqS3FG_TpE99saQn8I,992
|
|
259
261
|
catocli/parsers/query_subDomains/README.md,sha256=cYS_97fOekPlJe1PDfgkh39XdECbcgZCArcN7SOQ88E,640
|
|
260
|
-
catocli/parsers/query_subDomains/__init__.py,sha256=
|
|
262
|
+
catocli/parsers/query_subDomains/__init__.py,sha256=W7fB3QWXoRAbyuQMcjXAErhZuvOBFEWZt8BidKmM5ss,1300
|
|
261
263
|
catocli/parsers/query_xdr/README.md,sha256=bmaw_sVCQgN-3hiyLtbB4xlsXKxHfy-vbnt1qWFZ4QY,181
|
|
262
|
-
catocli/parsers/query_xdr/__init__.py,sha256=
|
|
264
|
+
catocli/parsers/query_xdr/__init__.py,sha256=ro911nrCCXHUL8K5LYjN7BD3XbWdRQuIRseg59OVAQk,2662
|
|
263
265
|
catocli/parsers/query_xdr_stories/README.md,sha256=kbnrCmTq7o0T1LMgN0w8lAoiwB3NZiod7jvcONGNSLs,2432
|
|
264
266
|
catocli/parsers/query_xdr_story/README.md,sha256=Csl2tE511miGOrISgIJyJXVEz2v1ONrMdvYywMeKv1Q,930
|
|
265
|
-
catocli/parsers/raw/README.md,sha256=
|
|
266
|
-
catocli/parsers/raw/__init__.py,sha256=
|
|
267
|
+
catocli/parsers/raw/README.md,sha256=nBI2tdiieuP45iPDKaiNdH3XdZwiuUJJAlplY8Qs2sg,1712
|
|
268
|
+
catocli/parsers/raw/__init__.py,sha256=tcVsBs7LowyNzBoAlWa-IWu287xOH3N58Ge5qhBxwAc,1389
|
|
267
269
|
graphql_client/__init__.py,sha256=2nxD4YsWoOnALXi5cXbmtIN_i0NL_eyDTQRTxs52mkI,315
|
|
268
270
|
graphql_client/api_client.py,sha256=2Rc1Zo1xH9Jnk1AO68kLSofTShkZwSVF-WkVtczfIc4,5786
|
|
269
271
|
graphql_client/api_client_types.py,sha256=dM3zl6FA5SSp6nR6KmLfTL1BKaXX9uPMCZAm4v_FiUs,11569
|
|
@@ -464,7 +466,7 @@ models/query.siteLocation.json,sha256=YDFp6w5vdMOb0dATjhByH2GwUOkYvdvRNm9mTl5FCl
|
|
|
464
466
|
models/query.subDomains.json,sha256=ySJ-gsBzC8EX4WrtJpasLAGkSK7-3e3orhPbIyx_B8s,7041
|
|
465
467
|
models/query.xdr.stories.json,sha256=B5cp2crp_5Yullk7qxPjXr25kFvZyjfg3w9god8AzbY,3834462
|
|
466
468
|
models/query.xdr.story.json,sha256=0GuddnM6Ak_Unrs3HSbNJKKl7k-F7pYxTtUUudC56XM,2837909
|
|
467
|
-
schema/catolib.py,sha256=
|
|
469
|
+
schema/catolib.py,sha256=uiv-5K5czQFDwaaHSqkGpMjzG2K2fN8iQrAlFXE9eUY,55903
|
|
468
470
|
schema/importSchema.py,sha256=9xg9N0MjgQUiPRczOpk0sTY1Nx9K2F6MRhpUyRTNqZ4,2795
|
|
469
471
|
scripts/catolib.py,sha256=6QaGZaHj1waZuta8gUFsfXmyoDiLabpU9gwnyq7pSXg,2145
|
|
470
472
|
scripts/export_if_rules_to_json.py,sha256=sTYzUbAtiFTy9vKpnyO8Sljshvg0qKd2gadanpeRVAM,10076
|
|
@@ -512,9 +514,9 @@ vendor/urllib3/util/timeout.py,sha256=4eT1FVeZZU7h7mYD1Jq2OXNe4fxekdNvhoWUkZusRp
|
|
|
512
514
|
vendor/urllib3/util/url.py,sha256=wHORhp80RAXyTlAIkTqLFzSrkU7J34ZDxX-tN65MBZk,15213
|
|
513
515
|
vendor/urllib3/util/util.py,sha256=j3lbZK1jPyiwD34T8IgJzdWEZVT-4E-0vYIJi9UjeNA,1146
|
|
514
516
|
vendor/urllib3/util/wait.py,sha256=_ph8IrUR3sqPqi0OopQgJUlH4wzkGeM5CiyA7XGGtmI,4423
|
|
515
|
-
catocli-2.0.
|
|
516
|
-
catocli-2.0.
|
|
517
|
-
catocli-2.0.
|
|
518
|
-
catocli-2.0.
|
|
519
|
-
catocli-2.0.
|
|
520
|
-
catocli-2.0.
|
|
517
|
+
catocli-2.0.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
518
|
+
catocli-2.0.4.dist-info/METADATA,sha256=l7Cws67VB5uIhEAHiG4vCIZCCfq_RUw8sNIEr7zwmz4,1264
|
|
519
|
+
catocli-2.0.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
520
|
+
catocli-2.0.4.dist-info/entry_points.txt,sha256=p4k9Orre6aWcqVrNmBbckmCs39h-1naMxRo2AjWmWZ4,50
|
|
521
|
+
catocli-2.0.4.dist-info/top_level.txt,sha256=uiIWEVkizgM3Fo8b4cWwGhXaLi-mGzETdeLd4-yNOdE,66
|
|
522
|
+
catocli-2.0.4.dist-info/RECORD,,
|
schema/catolib.py
CHANGED
|
@@ -717,12 +717,13 @@ def writeOperationParsers(catoApiSchema):
|
|
|
717
717
|
from ..parserApiClient import createRawRequest, get_help
|
|
718
718
|
|
|
719
719
|
def raw_parse(raw_parser):
|
|
720
|
-
raw_parser.add_argument('json', help='Query, Variables and opertaionName in JSON format.')
|
|
721
|
-
raw_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
720
|
+
raw_parser.add_argument('json', nargs='?', default='{{}}', help='Query, Variables and opertaionName in JSON format (defaults to empty object if not provided).')
|
|
721
|
+
raw_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
722
722
|
raw_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
723
723
|
raw_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
724
724
|
raw_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
725
725
|
raw_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
726
|
+
raw_parser.add_argument('--endpoint', dest='endpoint', help='Override the API endpoint URL (e.g., https://api.catonetworks.com/api/v1/graphql2)')
|
|
726
727
|
raw_parser.set_defaults(func=createRawRequest,operation_name='raw')
|
|
727
728
|
"""
|
|
728
729
|
parserPath = "../catocli/parsers/raw"
|
|
@@ -738,9 +739,9 @@ def query_siteLocation_parse(query_subparsers):
|
|
|
738
739
|
query_siteLocation_parser = query_subparsers.add_parser('siteLocation',
|
|
739
740
|
help='siteLocation local cli query',
|
|
740
741
|
usage=get_help("query_siteLocation"))
|
|
741
|
-
query_siteLocation_parser.add_argument('json', help='Variables in JSON format.')
|
|
742
|
+
query_siteLocation_parser.add_argument('json', nargs='?', default='{{}}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
742
743
|
query_siteLocation_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
743
|
-
query_siteLocation_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
744
|
+
query_siteLocation_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
744
745
|
query_siteLocation_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
745
746
|
query_siteLocation_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
746
747
|
query_siteLocation_parser.set_defaults(func=querySiteLocation,operation_name='query.siteLocation')
|
|
@@ -768,9 +769,9 @@ def {parserName}_parse({operationType}_subparsers):
|
|
|
768
769
|
"""
|
|
769
770
|
if "path" in parser:
|
|
770
771
|
cliDriverStr += f"""
|
|
771
|
-
{parserName}_parser.add_argument('json', help='Variables in JSON format.')
|
|
772
|
+
{parserName}_parser.add_argument('json', nargs='?', default='{{}}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
772
773
|
{parserName}_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
773
|
-
{parserName}_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
774
|
+
{parserName}_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
774
775
|
{parserName}_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
775
776
|
{parserName}_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
776
777
|
{parserName}_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -799,9 +800,9 @@ def renderSubParser(subParser,parentParserPath):
|
|
|
799
800
|
if "path" in subOperation:
|
|
800
801
|
command = parentParserPath.replace("_"," ")+" "+subOperationName
|
|
801
802
|
cliDriverStr += f"""
|
|
802
|
-
{subParserPath}_parser.add_argument('json', help='Variables in JSON format.')
|
|
803
|
+
{subParserPath}_parser.add_argument('json', nargs='?', default='{{}}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
803
804
|
{subParserPath}_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
804
|
-
{subParserPath}_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
805
|
+
{subParserPath}_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
805
806
|
{subParserPath}_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
806
807
|
{subParserPath}_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
807
808
|
{subParserPath}_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -831,6 +832,10 @@ def writeReadmes(catoApiSchema):
|
|
|
831
832
|
`catocli raw '{ "query": "query operationNameHere($yourArgument:String!) { field1 field2 }", "variables": { "yourArgument": "string", "accountID": "10949" }, "operationName": "operationNameHere" } '`
|
|
832
833
|
|
|
833
834
|
`catocli raw '{ "query": "mutation operationNameHere($yourArgument:String!) { field1 field2 }", "variables": { "yourArgument": "string", "accountID": "10949" }, "operationName": "operationNameHere" } '`
|
|
835
|
+
|
|
836
|
+
#### Override API endpoint
|
|
837
|
+
|
|
838
|
+
`catocli raw --endpoint https://custom-api.example.com/graphql '<json>'`
|
|
834
839
|
"""
|
|
835
840
|
parserPath = "../catocli/parsers/raw"
|
|
836
841
|
if not os.path.exists(parserPath):
|
|
@@ -1037,7 +1042,7 @@ def generateGraphqlPayload(variablesObj,operation,operationName):
|
|
|
1037
1042
|
queryStr += ") {\n" + renderArgsAndFields("", variablesObj, operation, operation["type"]["definition"], " ") + " }"
|
|
1038
1043
|
queryStr += indent + "\n}";
|
|
1039
1044
|
body = {
|
|
1040
|
-
"query":queryStr
|
|
1045
|
+
"query":queryStr,
|
|
1041
1046
|
"variables":variablesObj,
|
|
1042
1047
|
"operationName":renderCamelCase(".".join(operationAry)),
|
|
1043
1048
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|