cortexapps-cli 1.46.1__py3-none-any.whl → 1.48.0__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.
- cortexapps_cli/commands/catalog.py +16 -9
- {cortexapps_cli-1.46.1.dist-info → cortexapps_cli-1.48.0.dist-info}/METADATA +1 -1
- {cortexapps_cli-1.46.1.dist-info → cortexapps_cli-1.48.0.dist-info}/RECORD +6 -6
- {cortexapps_cli-1.46.1.dist-info → cortexapps_cli-1.48.0.dist-info}/WHEEL +0 -0
- {cortexapps_cli-1.46.1.dist-info → cortexapps_cli-1.48.0.dist-info}/entry_points.txt +0 -0
- {cortexapps_cli-1.46.1.dist-info → cortexapps_cli-1.48.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -123,22 +123,29 @@ def delete(
|
|
|
123
123
|
client.delete("api/v1/catalog/" + tag)
|
|
124
124
|
|
|
125
125
|
@app.command()
|
|
126
|
-
def
|
|
126
|
+
def delete_by_id(
|
|
127
127
|
ctx: typer.Context,
|
|
128
|
-
|
|
128
|
+
ids: Optional[List[str]] = typer.Option(None, "--id", "-i", help="CID of an entity to delete (e.g. en2da8159dbeefb974). Can be specified multiple times.", show_default=False),
|
|
129
|
+
file_input: Annotated[Optional[typer.FileText], typer.Option("--file", "-f", help="File containing one CID per line; can be passed as stdin with -, example: -f-")] = None,
|
|
130
|
+
batch_size: int = typer.Option(100, "--batch-size", hidden=True, help="Number of IDs per API call when processing file input"),
|
|
129
131
|
):
|
|
130
132
|
"""
|
|
131
|
-
|
|
133
|
+
Delete entities by CID. Accepts one or more --id flags, or a file with one CID per line.
|
|
132
134
|
"""
|
|
133
|
-
|
|
135
|
+
if ids and file_input:
|
|
136
|
+
raise typer.BadParameter("Specify either --id or --file, not both")
|
|
134
137
|
|
|
135
|
-
|
|
138
|
+
if not ids and not file_input:
|
|
139
|
+
raise typer.BadParameter("One of --id or --file is required")
|
|
136
140
|
|
|
137
|
-
|
|
138
|
-
"types": types
|
|
139
|
-
}
|
|
141
|
+
client = ctx.obj["client"]
|
|
140
142
|
|
|
141
|
-
|
|
143
|
+
if file_input:
|
|
144
|
+
all_ids = [line.strip() for line in file_input if line.strip()]
|
|
145
|
+
for i in range(0, len(all_ids), batch_size):
|
|
146
|
+
client.delete("api/v1/catalog", params={"ids": all_ids[i:i + batch_size]})
|
|
147
|
+
else:
|
|
148
|
+
client.delete("api/v1/catalog", params={"ids": ids})
|
|
142
149
|
|
|
143
150
|
@app.command()
|
|
144
151
|
def descriptor(
|
|
@@ -6,7 +6,7 @@ cortexapps_cli/commands/api_keys.py,sha256=f5LfrfuYJowH3BsHXR28hSmysSRoEcPU9PWAl
|
|
|
6
6
|
cortexapps_cli/commands/audit_logs.py,sha256=u0fa5I4GFZrcn8kUa0zwZPMkrmrUsgzh6NGVr8i7MEU,4194
|
|
7
7
|
cortexapps_cli/commands/backup.py,sha256=RLdFrkUiLzD763DgKDBgJwAufYzXziXXbPnBLe-Yijc,39152
|
|
8
8
|
cortexapps_cli/commands/backup_commands/cortex_export.py,sha256=hn6SBGRyYspamhOT8p4F_WS0DLcuiDpMdUpi15FsGUY,4680
|
|
9
|
-
cortexapps_cli/commands/catalog.py,sha256=
|
|
9
|
+
cortexapps_cli/commands/catalog.py,sha256=CaXGO8SWNyU-amyqAqN_xE6PVPsQKhF5MowGUP67RKM,15774
|
|
10
10
|
cortexapps_cli/commands/catalogs.py,sha256=kiOP2gO1rOA3YVHCzvJAhgaG6uB7HbT1MbaU0-mjwjs,3540
|
|
11
11
|
cortexapps_cli/commands/custom_data.py,sha256=ip1Iw7P111Zb-M6fJfxJUQQ9Dc97PcxMnkPMN7RXw9Q,6834
|
|
12
12
|
cortexapps_cli/commands/custom_events.py,sha256=AihNx8FsBMNiak3ortNKNRmfP5NogQ0pMqMEe4R8NLw,10157
|
|
@@ -274,8 +274,8 @@ cortexapps_cli/solutions/workday/data/configuration.json,sha256=8_C6pFrCSSXIv3hx
|
|
|
274
274
|
cortexapps_cli/solutions/workday/data/pied-piper-supervisory-org.json,sha256=OS0F5Pl0sBS4pENRsEhHAkAcXfqg8GLI8dJx2sqEvtE,3191
|
|
275
275
|
cortexapps_cli/solutions/workday/setup.py,sha256=t7I5sCXqta66lC9PKEZfpSZ8l_0OBbCnpvSFuh7y9Jw,5591
|
|
276
276
|
cortexapps_cli/utils.py,sha256=zJilDiFhL-cYdp5LA251rED7vdc0EIEivCZpCqQRvmI,6992
|
|
277
|
-
cortexapps_cli-1.
|
|
278
|
-
cortexapps_cli-1.
|
|
279
|
-
cortexapps_cli-1.
|
|
280
|
-
cortexapps_cli-1.
|
|
281
|
-
cortexapps_cli-1.
|
|
277
|
+
cortexapps_cli-1.48.0.dist-info/METADATA,sha256=maxR_09kkwU3LCvQfy7-6kU7nYLykTomzrwjJbCK_Vg,17883
|
|
278
|
+
cortexapps_cli-1.48.0.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
|
|
279
|
+
cortexapps_cli-1.48.0.dist-info/entry_points.txt,sha256=YffF7CawiDnK0vE7Fg9mAItnXoSjLvVkW3IdHhumz84,49
|
|
280
|
+
cortexapps_cli-1.48.0.dist-info/licenses/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
|
|
281
|
+
cortexapps_cli-1.48.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|