Skip to content

Commit a24dfe8

Browse files
authored
Merge pull request #6 from crowdsecurity/$main-13c256a
Update python SDK version: 1.95.0
2 parents 13c256a + 39595f2 commit a24dfe8

File tree

9 files changed

+23
-6
lines changed

9 files changed

+23
-6
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

crowdsec_tracker_api/models.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: <stdin>
3-
# timestamp: 2025-12-29T14:24:53+00:00
3+
# timestamp: 2025-12-31T15:56:47+00:00
44

55
from __future__ import annotations
66

@@ -445,6 +445,16 @@ class IntegrationsUpdateIntegrationPathParameters(BaseModelSdk):
445445
integration_id: Annotated[str, Field(title='Integration Id')]
446446

447447

448+
class IntegrationsDeleteIntegrationQueryParameters(BaseModelSdk):
449+
force: Annotated[
450+
Optional[bool],
451+
Field(
452+
description='Force delete the integration even if it has active subscriptions (it will unsubscribe from all lists)',
453+
title='Force',
454+
),
455+
] = False
456+
457+
448458
class IntegrationsDeleteIntegrationPathParameters(BaseModelSdk):
449459
integration_id: Annotated[str, Field(title='Integration Id')]
450460

Binary file not shown.

crowdsec_tracker_api/services/cves.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class Cves(Service):
1313
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
14-
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_tracker_api/1.94.2")
14+
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_tracker_api/1.95.0")
1515

1616
def get_cves(
1717
self,

crowdsec_tracker_api/services/integrations.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class Integrations(Service):
1313
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
14-
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_tracker_api/1.94.2")
14+
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_tracker_api/1.95.0")
1515

1616
def get_integrations(
1717
self,
@@ -77,11 +77,16 @@ def get_integration(
7777
def delete_integration(
7878
self,
7979
integration_id: str,
80+
force: bool = False,
8081
):
8182
endpoint_url = "/integrations/{integration_id}"
8283
loc = locals()
8384
headers = {}
84-
params = {}
85+
params = json.loads(
86+
IntegrationsDeleteIntegrationQueryParameters(**loc).model_dump_json(
87+
exclude_none=True
88+
)
89+
)
8590
path_params = json.loads(
8691
IntegrationsDeleteIntegrationPathParameters(**loc).model_dump_json(
8792
exclude_none=True

doc/Integrations.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ except HTTPStatusError as e:
133133
| Parameter | Type | Description | Required | Default |
134134
| --------- | ---- | ----------- | -------- | ------- |
135135
| integration_id | str | | True | |
136+
| force | bool | Force delete the integration even if it has active subscriptions (it will unsubscribe from all lists) | False | False |
136137
### Errors:
137138
| Code | Description |
138139
| ---- | ----------- |
@@ -150,6 +151,7 @@ client = Integrations(auth=auth)
150151
try:
151152
response = client.delete_integration(
152153
integration_id='integration_id',
154+
force=True,
153155
)
154156
print(response)
155157
except HTTPStatusError as e:

let-openapi.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "crowdsec_tracker_api"
7-
version = "1.94.2"
7+
version = "1.95.0"
88
license = { text = "MIT" }
99
authors = [
1010
{ name="crowdsec", email="info@crowdsec.net" }

0 commit comments

Comments
 (0)