From b783d4d76840987aa218d992d2c8dded0edda3f3 Mon Sep 17 00:00:00 2001 From: he2ss <19668340+he2ss@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:03:19 +0000 Subject: [PATCH] Update python SDK 1.29.0 --- README.md | 2 +- crowdsec_service_api/__init__.py | 3 + .../__pycache__/base_model.cpython-311.pyc | Bin 3186 -> 3205 bytes .../__pycache__/http_client.cpython-311.pyc | Bin 7514 -> 7533 bytes crowdsec_service_api/models.py | 407 +++++++++--------- .../__pycache__/__init__.cpython-311.pyc | Bin 229 -> 248 bytes crowdsec_service_api/services/hub.py | 56 +++ doc/Hub.md | 160 +++++++ doc/Models.md | 7 +- doc/README.md | 6 +- openapi.json | 2 +- pyproject.toml | 2 +- 12 files changed, 442 insertions(+), 203 deletions(-) create mode 100644 crowdsec_service_api/services/hub.py create mode 100644 doc/Hub.md diff --git a/README.md b/README.md index 17bee9d..c71f804 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ pip install crowdsec_service_api ## Usage -You can follow this [documentation](https://docs.crowdsec.net/u/service_api/sdks) to see the basic usage of the SDK. +You can follow this [documentation](https://docs.crowdsec.net/u/service_api/quickstart/blocklists) to see the basic usage of the SDK. ## Documentation You can access the full usage documentation [here](https://github.com/crowdsecurity/crowdsec-service-api-sdk-python/tree/main/doc). diff --git a/crowdsec_service_api/__init__.py b/crowdsec_service_api/__init__.py index 7e2a590..2372060 100644 --- a/crowdsec_service_api/__init__.py +++ b/crowdsec_service_api/__init__.py @@ -4,6 +4,7 @@ from .services.blocklists import Blocklists from .services.integrations import Integrations from .services.info import Info +from .services.hub import Hub from .http_client import ApiKeyAuth class Server(Enum): @@ -13,6 +14,7 @@ class Server(Enum): 'Blocklists', 'Integrations', 'Info', + 'Hub', 'ApiKeyCredentials', 'BasicAuthCredentials', 'BlocklistAddIPsRequest', @@ -58,6 +60,7 @@ class Server(Enum): 'Share', 'Stats', 'ValidationError', + 'HubType', 'ApiKeyAuth', 'Server', 'Page' diff --git a/crowdsec_service_api/__pycache__/base_model.cpython-311.pyc b/crowdsec_service_api/__pycache__/base_model.cpython-311.pyc index ca90fea2aea393c9a6d41d150f088b243b45b120..e38f0d5366226b0d6b90052e20fc9b4fc0490a53 100644 GIT binary patch delta 80 zcmew)(JINkoR^o20SLZzyxPe9lhLe2KO;XkRlhW;G_RyoKQXx^Ge56bx2QBPFSSTN izC6DuTR*-eKR-u5pt2+*KTqFS&(KiMe6u=}Hx~eX^&7qb delta 61 zcmZpb{3OA>oR^o20SK0{b!_DR$*5eYpI=a-pOIf&lA2PIpP!SQn4FQSA5dA6k)Nk; PtY>JbXSvym$(suRPel_o diff --git a/crowdsec_service_api/__pycache__/http_client.cpython-311.pyc b/crowdsec_service_api/__pycache__/http_client.cpython-311.pyc index dd9a199f88b73cdcfcecc54178178f191bfd80c6..612e65838b0ce2638b3a71dac26fcc849cbfd16c 100644 GIT binary patch delta 80 zcmca*_121eIWI340}y=cc(sxH9HUvQenx(7s(xuwX)6PBj#0TtKfj -# timestamp: 2024-07-05T14:43:55+00:00 +# timestamp: 2024-09-18T10:03:17+00:00 from __future__ import annotations @@ -36,8 +36,8 @@ class BlocklistAddIPsRequest(BaseModelSdk): ips: Annotated[List[str], Field(description='List of IPs or networks', title='Ips')] expiration: Annotated[ Optional[AwareDatetime], - Field(None, description='Expiration date', title='Expiration'), - ] + Field(description='Expiration date', title='Expiration'), + ] = None class BlocklistCreateRequest(BaseModelSdk): @@ -56,11 +56,9 @@ class BlocklistCreateRequest(BaseModelSdk): label: Annotated[ Optional[str], Field( - None, - description='Blocklist human readable name (Default: name)', - title='Label', + description='Blocklist human readable name (Default: name)', title='Label' ), - ] + ] = None description: Annotated[ str, Field(description='Blocklist description', min_length=1, title='Description'), @@ -68,30 +66,25 @@ class BlocklistCreateRequest(BaseModelSdk): references: Annotated[ Optional[List[str]], Field( - [], - description="Useful references on the list's origins", - title='References', + description="Useful references on the list's origins", title='References' ), - ] + ] = [] tags: Annotated[ - Optional[List[str]], Field([], description='Classification tags', title='Tags') - ] + Optional[List[str]], Field(description='Classification tags', title='Tags') + ] = [] from_cti_query: Annotated[ Optional[str], Field( - None, - description='CTI query (doc link available soon)', - title='From Cti Query', + description='CTI query (doc link available soon)', title='From Cti Query' ), - ] + ] = None since: Annotated[ Optional[str], Field( - None, description='Since duration for the CTI query (5m, 2h, 7d). Max is 30 days', title='Since', ), - ] + ] = None class BlocklistDeleteIPsRequest(BaseModelSdk): @@ -116,6 +109,7 @@ class BlocklistSources(Enum): class BlocklistSubscription(BaseModelSdk): id: Annotated[str, Field(title='Id')] + remediation: Annotated[Optional[str], Field(title='Remediation')] = None name: Annotated[str, Field(title='Name')] label: Annotated[str, Field(title='Label')] @@ -128,7 +122,7 @@ class BlocklistSubscriptionResponse(BaseModelSdk): examples=['5f9d88b9e5c4f5b9a3d3e8b1'], title='Updated', ), - ] + ] = None errors: Annotated[ Optional[List[Dict[str, str]]], Field( @@ -136,7 +130,7 @@ class BlocklistSubscriptionResponse(BaseModelSdk): examples=[{'5f9d88b9e5c4f5b9a3d3e8b1': 'error message'}], title='Errors', ), - ] + ] = None class BlocklistUpdateRequest(BaseModelSdk): @@ -144,36 +138,31 @@ class BlocklistUpdateRequest(BaseModelSdk): extra='forbid', ) label: Annotated[ - Optional[str], - Field(None, description='Blocklist human readable name', title='Label'), - ] + Optional[str], Field(description='Blocklist human readable name', title='Label') + ] = None description: Annotated[ - Optional[str], - Field(None, description='Blocklist description', title='Description'), - ] + Optional[str], Field(description='Blocklist description', title='Description') + ] = None references: Annotated[ Optional[List[str]], - Field(None, description='Blocklist references', title='References'), - ] + Field(description='Blocklist references', title='References'), + ] = None tags: Annotated[ - Optional[List[str]], Field(None, description='Blocklist tags', title='Tags') - ] + Optional[List[str]], Field(description='Blocklist tags', title='Tags') + ] = None from_cti_query: Annotated[ Optional[str], Field( - None, - description='CTI query (doc link available soon)', - title='From Cti Query', + description='CTI query (doc link available soon)', title='From Cti Query' ), - ] + ] = None since: Annotated[ Optional[str], Field( - None, description='Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days', title='Since', ), - ] + ] = None class BlocklistUsageStats(BaseModelSdk): @@ -181,18 +170,18 @@ class BlocklistUsageStats(BaseModelSdk): extra='allow', ) engines_subscribed_directly: Annotated[ - Optional[int], Field(0, title='Engines Subscribed Directly') - ] + Optional[int], Field(title='Engines Subscribed Directly') + ] = 0 engines_subscribed_through_org: Annotated[ - Optional[int], Field(0, title='Engines Subscribed Through Org') - ] + Optional[int], Field(title='Engines Subscribed Through Org') + ] = 0 engines_subscribed_through_tag: Annotated[ - Optional[int], Field(0, title='Engines Subscribed Through Tag') - ] + Optional[int], Field(title='Engines Subscribed Through Tag') + ] = 0 total_subscribed_engines: Annotated[ - Optional[int], Field(0, title='Total Subscribed Engines') - ] - updated_at: Annotated[Optional[AwareDatetime], Field(None, title='Updated At')] + Optional[int], Field(title='Total Subscribed Engines') + ] = 0 + updated_at: Annotated[Optional[AwareDatetime], Field(title='Updated At')] = None class BodyUploadBlocklistContent(BaseModelSdk): @@ -245,7 +234,7 @@ class CtiIp(BaseModelSdk): ) ip: Annotated[str, Field(title='Ip')] total_signals_1m: Annotated[int, Field(title='Total Signals 1M')] - reputation: Annotated[Optional[str], Field('unknown', title='Reputation')] + reputation: Annotated[Optional[str], Field(title='Reputation')] = 'unknown' class CtiScenario(BaseModelSdk): @@ -290,19 +279,19 @@ class IntegrationType(Enum): class Links(BaseModelSdk): first: Annotated[ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='First') - ] + ] = None last: Annotated[ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Last') - ] + ] = None self: Annotated[ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Self') - ] + ] = None next: Annotated[ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Next') - ] + ] = None prev: Annotated[ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Prev') - ] + ] = None class OutputFormat(Enum): @@ -363,40 +352,44 @@ class ValidationError(BaseModelSdk): type: Annotated[str, Field(title='Error Type')] +class HubType(Enum): + PARSERS = 'parsers' + POSTOVERFLOWS = 'postoverflows' + SCENARIOS = 'scenarios' + COLLECTIONS = 'collections' + CONTEXTS = 'contexts' + APPSEC_CONFIGS = 'appsec-configs' + APPSEC_RULES = 'appsec-rules' + + class BlocklistsGetBlocklistsQueryParameters(BaseModelSdk): page: Annotated[ - Optional[int], Field(1, description='Page number', ge=1, title='Page') - ] + Optional[int], Field(description='Page number', ge=1, title='Page') + ] = 1 page_size: Annotated[ - Optional[int], Field(100, description='Page size', le=1000, title='Page Size') - ] + Optional[int], Field(description='Page size', le=1000, title='Page Size') + ] = 100 subscribed_only: Annotated[ Optional[bool], Field( - False, description='Fetch only blocklists subscribed by your organization, engines or tags', title='Subscribed Only', ), - ] + ] = False exclude_subscribed: Annotated[ Optional[bool], - Field( - False, - description='Exclude subscribed blocklists', - title='Exclude Subscribed', - ), - ] + Field(description='Exclude subscribed blocklists', title='Exclude Subscribed'), + ] = False include_filter: Annotated[ Optional[List[BlocklistIncludeFilters]], Field( - ['private', 'shared'], description='Include blocklists with the specified filters', title='Include Filter', ), - ] + ] = ['private', 'shared'] size: Annotated[ - Optional[int], Field(50, description='Page size', ge=1, le=100, title='Size') - ] + Optional[int], Field(description='Page size', ge=1, le=100, title='Size') + ] = 50 class BlocklistsGetBlocklistPathParameters(BaseModelSdk): @@ -415,11 +408,10 @@ class BlocklistsDeleteBlocklistQueryParameters(BaseModelSdk): force: Annotated[ Optional[bool], Field( - False, description='Force delete the blocklist if it is shared or subscribed', title='Force', ), - ] + ] = False class BlocklistsDeleteBlocklistPathParameters(BaseModelSdk): @@ -431,12 +423,12 @@ class BlocklistsDeleteBlocklistPathParameters(BaseModelSdk): class BlocklistsUploadBlocklistContentQueryParameters(BaseModelSdk): expiration: Annotated[ Optional[AwareDatetime], - Field(None, description='Blocklist expiration', title='Expiration'), - ] + Field(description='Blocklist expiration', title='Expiration'), + ] = None ignore_invalid_ips: Annotated[ Optional[bool], - Field(False, description='Ignore invalid IPs', title='Ignore Invalid Ips'), - ] + Field(description='Ignore invalid IPs', title='Ignore Invalid Ips'), + ] = False class BlocklistsUploadBlocklistContentPathParameters(BaseModelSdk): @@ -467,21 +459,19 @@ class BlocklistsDownloadBlocklistContentHeadersParameters(BaseModelSdk): if_modified_since: Annotated[ Optional[str], Field( - None, alias='if-modified-since', description='If_Modified_Since cache control header', title='If-Modified-Since', ), - ] + ] = None if_none_match: Annotated[ Optional[str], Field( - None, alias='if-none-match', description='If_None_Match cache control header', title='If-None-Match', ), - ] + ] = None class BlocklistsSubscribeBlocklistPathParameters(BaseModelSdk): @@ -518,11 +508,11 @@ class BlocklistsUnshareBlocklistPathParameters(BaseModelSdk): class IntegrationsGetIntegrationsQueryParameters(BaseModelSdk): page: Annotated[ - Optional[int], Field(1, description='Page number', ge=1, title='Page') - ] + Optional[int], Field(description='Page number', ge=1, title='Page') + ] = 1 size: Annotated[ - Optional[int], Field(50, description='Page size', ge=1, le=100, title='Size') - ] + Optional[int], Field(description='Page size', ge=1, le=100, title='Size') + ] = 50 class IntegrationsGetIntegrationPathParameters(BaseModelSdk): @@ -556,16 +546,15 @@ class PageSize(RootModel[int]): class IntegrationsGetIntegrationContentQueryParameters(BaseModelSdk): page: Annotated[ - Optional[int], Field(1, description='Page number to return', ge=1, title='Page') - ] + Optional[int], Field(description='Page number to return', ge=1, title='Page') + ] = 1 page_size: Annotated[ Optional[PageSize], Field( - None, description='Maximum number of items to return, 0 means no limit (default), should be greater than 10000', title='Page Size', ), - ] + ] = None class IntegrationsGetIntegrationContentPathParameters(BaseModelSdk): @@ -578,11 +567,10 @@ class IntegrationsGetIntegrationContentStreamQueryParameters(BaseModelSdk): startup: Annotated[ Optional[bool], Field( - False, description="Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull.", title='Startup', ), - ] + ] = False class IntegrationsGetIntegrationContentStreamPathParameters(BaseModelSdk): @@ -591,37 +579,73 @@ class IntegrationsGetIntegrationContentStreamPathParameters(BaseModelSdk): ] +class HubGetIndexQueryParameters(BaseModelSdk): + with_content: Annotated[ + Optional[bool], + Field(description='Include content in the index', title='With Content'), + ] = False + + +class HubGetIndexPathParameters(BaseModelSdk): + branch: Annotated[str, Field(title='Branch')] + tenant: Annotated[str, Field(title='Tenant')] + + +class HubHeadIndexQueryParameters(BaseModelSdk): + with_content: Annotated[ + Optional[bool], + Field(description='Include content in the index', title='With Content'), + ] = False + + +class HubHeadIndexPathParameters(BaseModelSdk): + branch: Annotated[str, Field(title='Branch')] + tenant: Annotated[str, Field(title='Tenant')] + + +class HubGetItemContentPathParameters(BaseModelSdk): + item_path: Annotated[str, Field(title='Item Path')] + branch: Annotated[str, Field(title='Branch')] + tenant: Annotated[str, Field(title='Tenant')] + + +class HubHeadItemContentPathParameters(BaseModelSdk): + item_path: Annotated[str, Field(title='Item Path')] + branch: Annotated[str, Field(title='Branch')] + tenant: Annotated[str, Field(title='Tenant')] + + class BlocklistContentStats(BaseModelSdk): model_config = ConfigDict( extra='allow', ) - total_seen: Annotated[Optional[int], Field(0, title='Total Seen')] - total_fire: Annotated[Optional[int], Field(0, title='Total Fire')] - total_seen_1m: Annotated[Optional[int], Field(0, title='Total Seen 1M')] + total_seen: Annotated[Optional[int], Field(title='Total Seen')] = 0 + total_fire: Annotated[Optional[int], Field(title='Total Fire')] = 0 + total_seen_1m: Annotated[Optional[int], Field(title='Total Seen 1M')] = 0 total_in_other_lists: Annotated[ - Optional[int], Field(0, title='Total In Other Lists') - ] + Optional[int], Field(title='Total In Other Lists') + ] = 0 total_false_positive: Annotated[ - Optional[int], Field(0, title='Total False Positive') - ] + Optional[int], Field(title='Total False Positive') + ] = 0 false_positive_removed_by_crowdsec: Annotated[ - Optional[int], Field(0, title='False Positive Removed By Crowdsec') - ] + Optional[int], Field(title='False Positive Removed By Crowdsec') + ] = 0 most_present_behaviors: Annotated[ - Optional[List[CtiBehavior]], Field([], title='Most Present Behaviors') - ] + Optional[List[CtiBehavior]], Field(title='Most Present Behaviors') + ] = [] most_present_categories: Annotated[ - Optional[List[CtiCategory]], Field([], title='Most Present Categories') - ] + Optional[List[CtiCategory]], Field(title='Most Present Categories') + ] = [] most_present_scenarios: Annotated[ - Optional[List[CtiScenario]], Field([], title='Most Present Scenarios') - ] - top_as: Annotated[Optional[List[CtiAs]], Field([], title='Top As')] + Optional[List[CtiScenario]], Field(title='Most Present Scenarios') + ] = [] + top_as: Annotated[Optional[List[CtiAs]], Field(title='Top As')] = [] top_attacking_countries: Annotated[ - Optional[List[CtiCountry]], Field([], title='Top Attacking Countries') - ] - top_ips: Annotated[Optional[List[CtiIp]], Field([], title='Top Ips')] - updated_at: Annotated[Optional[AwareDatetime], Field(None, title='Updated At')] + Optional[List[CtiCountry]], Field(title='Top Attacking Countries') + ] = [] + top_ips: Annotated[Optional[List[CtiIp]], Field(title='Top Ips')] = [] + updated_at: Annotated[Optional[AwareDatetime], Field(title='Updated At')] = None class BlocklistShareRequest(BaseModelSdk): @@ -641,43 +665,38 @@ class BlocklistStats(BaseModelSdk): model_config = ConfigDict( extra='allow', ) - content_stats: Annotated[ - Optional[BlocklistContentStats], - Field( - { - 'total_seen': 0, - 'total_fire': 0, - 'total_seen_1m': 0, - 'total_in_other_lists': 0, - 'total_false_positive': 0, - 'false_positive_removed_by_crowdsec': 0, - 'most_present_behaviors': [], - 'most_present_categories': [], - 'most_present_scenarios': [], - 'top_as': [], - 'top_attacking_countries': [], - 'top_ips': [], - } - ), - ] + content_stats: Annotated[Optional[BlocklistContentStats], Field()] = { + 'total_seen': 0, + 'total_fire': 0, + 'total_seen_1m': 0, + 'total_in_other_lists': 0, + 'total_false_positive': 0, + 'false_positive_removed_by_crowdsec': 0, + 'most_present_behaviors': [], + 'most_present_categories': [], + 'most_present_scenarios': [], + 'top_as': [], + 'top_attacking_countries': [], + 'top_ips': [], + } usage_stats: Optional[BlocklistUsageStats] = { 'engines_subscribed_directly': 0, 'engines_subscribed_through_org': 0, 'engines_subscribed_through_tag': 0, 'total_subscribed_engines': 0, } - addition_2days: Annotated[Optional[int], Field(0, title='Addition 2Days')] - addition_month: Annotated[Optional[int], Field(0, title='Addition Month')] - suppression_2days: Annotated[Optional[int], Field(0, title='Suppression 2Days')] - suppression_month: Annotated[Optional[int], Field(0, title='Suppression Month')] + addition_2days: Annotated[Optional[int], Field(title='Addition 2Days')] = 0 + addition_month: Annotated[Optional[int], Field(title='Addition Month')] = 0 + suppression_2days: Annotated[Optional[int], Field(title='Suppression 2Days')] = 0 + suppression_month: Annotated[Optional[int], Field(title='Suppression Month')] = 0 change_2days_percentage: Annotated[ - Optional[float], Field(0.0, title='Change 2Days Percentage') - ] + Optional[float], Field(title='Change 2Days Percentage') + ] = 0.0 change_month_percentage: Annotated[ - Optional[float], Field(0.0, title='Change Month Percentage') - ] - count: Annotated[Optional[int], Field(0, title='Count')] - updated_at: Annotated[Optional[AwareDatetime], Field(None, title='Updated At')] + Optional[float], Field(title='Change Month Percentage') + ] = 0.0 + count: Annotated[Optional[int], Field(title='Count')] = 0 + updated_at: Annotated[Optional[AwareDatetime], Field(title='Updated At')] = None class BlocklistSubscriberEntity(BaseModelSdk): @@ -699,16 +718,16 @@ class BlocklistSubscriptionRequest(BaseModelSdk): ) ids: Annotated[ Optional[List[str]], - Field(None, description='List of subscriber entity id', title='Ids'), - ] + Field(description='List of subscriber entity id', title='Ids'), + ] = None entity_type: EntityType remediation: Annotated[ - Optional[str], Field(None, description='Remediation', title='Remediation') - ] + Optional[str], Field(description='Remediation', title='Remediation') + ] = None class HTTPValidationError(BaseModelSdk): - detail: Annotated[Optional[List[ValidationError]], Field(None, title='Detail')] + detail: Annotated[Optional[List[ValidationError]], Field(title='Detail')] = None class IntegrationCreateRequest(BaseModelSdk): @@ -721,12 +740,11 @@ class IntegrationCreateRequest(BaseModelSdk): description: Annotated[ Optional[str], Field( - None, description='Description of the integration', min_length=1, title='Description', ), - ] + ] = None entity_type: Annotated[ IntegrationType, Field(description='Type of the integration') ] @@ -749,8 +767,8 @@ class IntegrationCreateResponse(BaseModelSdk): ] description: Annotated[ Optional[str], - Field(None, description='Description of the integration', title='Description'), - ] + Field(description='Description of the integration', title='Description'), + ] = None created_at: Annotated[ AwareDatetime, Field(description='Time the integration was created', title='Created At'), @@ -768,11 +786,9 @@ class IntegrationCreateResponse(BaseModelSdk): last_pull: Annotated[ Optional[AwareDatetime], Field( - None, - description='Last time the integration pulled blocklists', - title='Last Pull', + description='Last time the integration pulled blocklists', title='Last Pull' ), - ] + ] = None blocklists: Annotated[ List[BlocklistSubscription], Field( @@ -787,9 +803,9 @@ class IntegrationCreateResponse(BaseModelSdk): title='Endpoint', ), ] - stats: Annotated[ - Optional[Stats], Field({'count': 0}, description='Stats of the integration') - ] + stats: Annotated[Optional[Stats], Field(description='Stats of the integration')] = { + 'count': 0 + } credentials: Annotated[ Union[ApiKeyCredentials, BasicAuthCredentials], Field( @@ -813,8 +829,8 @@ class IntegrationGetResponse(BaseModelSdk): ] description: Annotated[ Optional[str], - Field(None, description='Description of the integration', title='Description'), - ] + Field(description='Description of the integration', title='Description'), + ] = None created_at: Annotated[ AwareDatetime, Field(description='Time the integration was created', title='Created At'), @@ -832,11 +848,9 @@ class IntegrationGetResponse(BaseModelSdk): last_pull: Annotated[ Optional[AwareDatetime], Field( - None, - description='Last time the integration pulled blocklists', - title='Last Pull', + description='Last time the integration pulled blocklists', title='Last Pull' ), - ] + ] = None blocklists: Annotated[ List[BlocklistSubscription], Field( @@ -851,9 +865,9 @@ class IntegrationGetResponse(BaseModelSdk): title='Endpoint', ), ] - stats: Annotated[ - Optional[Stats], Field({'count': 0}, description='Stats of the integration') - ] + stats: Annotated[Optional[Stats], Field(description='Stats of the integration')] = { + 'count': 0 + } class IntegrationUpdateRequest(BaseModelSdk): @@ -861,23 +875,22 @@ class IntegrationUpdateRequest(BaseModelSdk): extra='forbid', ) name: Annotated[ - Optional[str], Field(None, description='New name', min_length=1, title='Name') - ] + Optional[str], Field(description='New name', min_length=1, title='Name') + ] = None description: Annotated[ Optional[str], - Field(None, description='New description', min_length=1, title='Description'), - ] + Field(description='New description', min_length=1, title='Description'), + ] = None output_format: Annotated[ - Optional[OutputFormat], Field(None, description='New output format') - ] + Optional[OutputFormat], Field(description='New output format') + ] = None regenerate_credentials: Annotated[ Optional[bool], Field( - None, description='Regenerate credentials for the integration', title='Regenerate Credentials', ), - ] + ] = None class IntegrationUpdateResponse(BaseModelSdk): @@ -894,8 +907,8 @@ class IntegrationUpdateResponse(BaseModelSdk): ] description: Annotated[ Optional[str], - Field(None, description='Description of the integration', title='Description'), - ] + Field(description='Description of the integration', title='Description'), + ] = None created_at: Annotated[ AwareDatetime, Field(description='Time the integration was created', title='Created At'), @@ -913,11 +926,9 @@ class IntegrationUpdateResponse(BaseModelSdk): last_pull: Annotated[ Optional[AwareDatetime], Field( - None, - description='Last time the integration pulled blocklists', - title='Last Pull', + description='Last time the integration pulled blocklists', title='Last Pull' ), - ] + ] = None blocklists: Annotated[ List[BlocklistSubscription], Field( @@ -932,21 +943,21 @@ class IntegrationUpdateResponse(BaseModelSdk): title='Endpoint', ), ] - stats: Annotated[ - Optional[Stats], Field({'count': 0}, description='Stats of the integration') - ] + stats: Annotated[Optional[Stats], Field(description='Stats of the integration')] = { + 'count': 0 + } credentials: Annotated[ Optional[Union[ApiKeyCredentials, BasicAuthCredentials]], - Field(None, description='Credentials for the integration', title='Credentials'), - ] + Field(description='Credentials for the integration', title='Credentials'), + ] = None class PageIntegrationGetResponse(BaseModelSdk): items: Annotated[List[IntegrationGetResponse], Field(title='Items')] - total: Annotated[Optional[Total], Field(title='Total')] - page: Annotated[Optional[Page], Field(title='Page')] - size: Annotated[Optional[Size], Field(title='Size')] - pages: Annotated[Optional[Pages], Field(None, title='Pages')] + total: Annotated[Optional[Total], Field(title='Total')] = None + page: Annotated[Optional[Page], Field(title='Page')] = None + size: Annotated[Optional[Size], Field(title='Size')] = None + pages: Annotated[Optional[Pages], Field(title='Pages')] = None links: Links @@ -992,14 +1003,14 @@ class BlocklistCreateResponse(BaseModelSdk): description='CTI query from which the blocklist was created', title='From Cti Query', ), - ] + ] = None since: Annotated[ Optional[str], Field( description='Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days', title='Since', ), - ] + ] = None shared_with: Annotated[ List[Share], Field(description='List of organizations shared with', title='Shared With'), @@ -1009,7 +1020,7 @@ class BlocklistCreateResponse(BaseModelSdk): Field( description="Blocklists owner's organization id", title='Organization Id' ), - ] + ] = None subscribers: Annotated[ List[BlocklistSubscriberEntity], Field( @@ -1061,14 +1072,14 @@ class BlocklistGetResponse(BaseModelSdk): description='CTI query from which the blocklist was created', title='From Cti Query', ), - ] + ] = None since: Annotated[ Optional[str], Field( description='Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days', title='Since', ), - ] + ] = None shared_with: Annotated[ List[Share], Field(description='List of organizations shared with', title='Shared With'), @@ -1078,7 +1089,7 @@ class BlocklistGetResponse(BaseModelSdk): Field( description="Blocklists owner's organization id", title='Organization Id' ), - ] + ] = None subscribers: Annotated[ List[BlocklistSubscriberEntity], Field( @@ -1130,14 +1141,14 @@ class BlocklistResponse(BaseModelSdk): description='CTI query from which the blocklist was created', title='From Cti Query', ), - ] + ] = None since: Annotated[ Optional[str], Field( description='Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days', title='Since', ), - ] + ] = None shared_with: Annotated[ List[Share], Field(description='List of organizations shared with', title='Shared With'), @@ -1147,7 +1158,7 @@ class BlocklistResponse(BaseModelSdk): Field( description="Blocklists owner's organization id", title='Organization Id' ), - ] + ] = None subscribers: Annotated[ List[BlocklistSubscriberEntity], Field( @@ -1159,8 +1170,8 @@ class BlocklistResponse(BaseModelSdk): class PageBlocklistResponse(BaseModelSdk): items: Annotated[List[BlocklistResponse], Field(title='Items')] - total: Annotated[Optional[Total], Field(title='Total')] - page: Annotated[Optional[Page], Field(title='Page')] - size: Annotated[Optional[Size], Field(title='Size')] - pages: Annotated[Optional[Pages], Field(None, title='Pages')] + total: Annotated[Optional[Total], Field(title='Total')] = None + page: Annotated[Optional[Page], Field(title='Page')] = None + size: Annotated[Optional[Size], Field(title='Size')] = None + pages: Annotated[Optional[Pages], Field(title='Pages')] = None links: Links diff --git a/crowdsec_service_api/services/__pycache__/__init__.cpython-311.pyc b/crowdsec_service_api/services/__pycache__/__init__.cpython-311.pyc index 92335a20ae89c5f626357c06818380f8d92b25b2..aaa4e8bb22c066f3ebc7c54a9055581464a89406 100644 GIT binary patch delta 77 zcmaFL_=AyqIWI340}y=ccr}sR)T~=SBR@A)zci^ducTBzF}Wl&Kd)G~s5CDxwMaj{ fJijPgKfWYCKSw{HvLquvPv2P2&`{5OVsaAz9R(X) delta 58 zcmeyt_>_@*IWI340}w1@>zK%Gs$8L;Ur?f-kzZVrno^RVpOc)JoRO*@P+5|ZpQmrE MXK1KrIkBt>01f^U(*OVf diff --git a/crowdsec_service_api/services/hub.py b/crowdsec_service_api/services/hub.py new file mode 100644 index 0000000..40809f7 --- /dev/null +++ b/crowdsec_service_api/services/hub.py @@ -0,0 +1,56 @@ +import json +from httpx import Auth +from ..models import * +from ..base_model import Page, Service +from ..http_client import HttpClient + +class Hub(Service): + + def get_index( + self, + branch: str, + tenant: str, + with_content: bool = False, + )-> Response Getindex: + endpoint_url = "/hub/index/{tenant}/{branch}/.index.json" + loc = locals() + headers = {} + params = json.loads( + HubGetIndexQueryParameters(**loc).model_dump_json( + exclude_none=True + ) + ) + path_params = json.loads( + HubGetIndexPathParameters(**loc).model_dump_json( + exclude_none=True + ) + ) + + response = self.http_client.get( + url=endpoint_url, path_params=path_params, params=params, headers=headers + ) + + return Response Getindex(**response.json()) + + def get_item_content( + self, + item_path: str, + branch: str, + tenant: str, + ): + endpoint_url = "/hub/index/{tenant}/{branch}/{item_path}" + loc = locals() + headers = {} + params = {} + path_params = json.loads( + HubGetItemContentPathParameters(**loc).model_dump_json( + exclude_none=True + ) + ) + + response = self.http_client.get( + url=endpoint_url, path_params=path_params, params=params, headers=headers + ) + + return None + \ No newline at end of file diff --git a/doc/Hub.md b/doc/Hub.md new file mode 100644 index 0000000..11e9824 --- /dev/null +++ b/doc/Hub.md @@ -0,0 +1,160 @@ + + +# Hub Methods +| Method | Description | +| ------ | ----------- | +| [get_index](#get_index) | Get a (minimized) index file for 'cscli hub update'. May or may not include unused fields +(content, long descriptions, labels...) or redundant ones (author, name). | +| [head_index](#head_index) | This endpoint returns cache-related headers for the index file without the full content. +It is useful for validating cache, checking resource freshness, and managing client-side +cache expiration policies. No body content is returned. | +| [get_item_content](#get_item_content) | Get an item's content from its path. This is usually a YAML file. | +| [head_item_content](#head_item_content) | This endpoint returns cache-related headers for an item's content. It is useful for validating +cache, checking resource freshness, and managing client-side cache expiration policies. No body +content is returned. | + +## **get_index** +### Get a (minimized) index file for 'cscli hub update'. May or may not include unused fields +(content, long descriptions, labels...) or redundant ones (author, name). +- Endpoint: `/hub/index/{tenant}/{branch}/.index.json` +- Method: `GET` + +### Parameters: +| Parameter | Type | Description | Required | Default | +| --------- | ---- | ----------- | -------- | ------- | +| branch | str | | True | | +| tenant | str | | True | | +| with_content | bool | Include content in the index | False | False | +### Returns: +[Response Getindex](./Models.md#response getindex) +### Errors: +| Code | Description | +| ---- | ----------- | +| 422 | Validation Error | +### Usage + +```python +from crowdsec_service_api import ( + Hub, + Server, + ApiKeyAuth, +) +auth = ApiKeyAuth(api_key='your_api_key') +client = Hub(base_url=Server.production_server.value, auth=auth) +response = client.get_index( + branch='branch', + tenant='tenant', + with_content=True, +) +print(response) +``` + + +## **head_index** +### This endpoint returns cache-related headers for the index file without the full content. +It is useful for validating cache, checking resource freshness, and managing client-side +cache expiration policies. No body content is returned. +- Endpoint: `/hub/index/{tenant}/{branch}/.index.json` +- Method: `HEAD` + +### Parameters: +| Parameter | Type | Description | Required | Default | +| --------- | ---- | ----------- | -------- | ------- | +| branch | str | | True | | +| tenant | str | | True | | +| with_content | bool | Include content in the index | False | False | +### Returns: +[Response Headindex](./Models.md#response headindex) +### Errors: +| Code | Description | +| ---- | ----------- | +| 422 | Validation Error | +### Usage + +```python +from crowdsec_service_api import ( + Hub, + Server, + ApiKeyAuth, +) +auth = ApiKeyAuth(api_key='your_api_key') +client = Hub(base_url=Server.production_server.value, auth=auth) +response = client.head_index( + branch='branch', + tenant='tenant', + with_content=True, +) +print(response) +``` + + +## **get_item_content** +### Get an item's content from its path. This is usually a YAML file. +- Endpoint: `/hub/index/{tenant}/{branch}/{item_path}` +- Method: `GET` + +### Parameters: +| Parameter | Type | Description | Required | Default | +| --------- | ---- | ----------- | -------- | ------- | +| item_path | str | | True | | +| branch | str | | True | | +| tenant | str | | True | | +### Errors: +| Code | Description | +| ---- | ----------- | +| 404 | No content field | +| 422 | Validation Error | +### Usage + +```python +from crowdsec_service_api import ( + Hub, + Server, + ApiKeyAuth, +) +auth = ApiKeyAuth(api_key='your_api_key') +client = Hub(base_url=Server.production_server.value, auth=auth) +response = client.get_item_content( + item_path='item_path', + branch='branch', + tenant='tenant', +) +print(response) +``` + + +## **head_item_content** +### This endpoint returns cache-related headers for an item's content. It is useful for validating +cache, checking resource freshness, and managing client-side cache expiration policies. No body +content is returned. +- Endpoint: `/hub/index/{tenant}/{branch}/{item_path}` +- Method: `HEAD` + +### Parameters: +| Parameter | Type | Description | Required | Default | +| --------- | ---- | ----------- | -------- | ------- | +| item_path | str | | True | | +| branch | str | | True | | +| tenant | str | | True | | +### Errors: +| Code | Description | +| ---- | ----------- | +| 422 | Validation Error | +### Usage + +```python +from crowdsec_service_api import ( + Hub, + Server, + ApiKeyAuth, +) +auth = ApiKeyAuth(api_key='your_api_key') +client = Hub(base_url=Server.production_server.value, auth=auth) +response = client.head_item_content( + item_path='item_path', + branch='branch', + tenant='tenant', +) +print(response) +``` + diff --git a/doc/Models.md b/doc/Models.md index 2924086..4221680 100644 --- a/doc/Models.md +++ b/doc/Models.md @@ -194,6 +194,7 @@ id, name, label | Property | Type | Description | Example | |----------|------|-------------|---------| | id | str | None || +| remediation | Optional[str] | None || | name | str | None || | label | str | None || @@ -487,4 +488,8 @@ loc, msg, type |----------|------|-------------|---------| | loc | list[Union[str, int]] | None || | msg | str | None || -| type | str | None || \ No newline at end of file +| type | str | None || + +# **HubType** +## Enum: +PARSERS, POSTOVERFLOWS, SCENARIOS, COLLECTIONS, CONTEXTS, APPSEC-CONFIGS, APPSEC-RULES \ No newline at end of file diff --git a/doc/README.md b/doc/README.md index f00f260..c41dba5 100644 --- a/doc/README.md +++ b/doc/README.md @@ -17,6 +17,8 @@ You can find a Quickstart about this SDK, following this [documentation](https:/ [Info](./Info.md) +[Hub](./Hub.md) + ## API Endpoint models [ApiKeyCredentials](./Models.md#apikeycredentials) @@ -107,4 +109,6 @@ You can find a Quickstart about this SDK, following this [documentation](https:/ [Stats](./Models.md#stats) -[ValidationError](./Models.md#validationerror) \ No newline at end of file +[ValidationError](./Models.md#validationerror) + +[HubType](./Models.md#hubtype) \ No newline at end of file diff --git a/openapi.json b/openapi.json index f38e181..c701179 100644 --- a/openapi.json +++ b/openapi.json @@ -1 +1 @@ -{"openapi": "3.1.0", "info": {"title": "Crowdsec API", "description": "This is the API to manage Crowdsec services", "contact": {"name": "CrowdSec", "url": "https://crowdsec.net/", "email": "info@crowdsec.net"}, "version": "1.18.5"}, "paths": {"/blocklists": {"post": {"tags": ["Blocklists"], "summary": "Create Blocklist", "description": "Create a new blocklist owned by your organization. The name must be unique within your organization. The list will only be visible to your organization and organizations you shared the blocklist with. This operation is submitted to quotas", "operationId": "createBlocklist", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistCreateRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistCreateResponse"}}}}, "409": {"description": "Blocklist already exists"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Blocklists"], "summary": "Get Blocklists", "description": "Get multiple blocklists. Only blocklists owned by your organization, shared with your organization or public blocklists are returned. Filters and pagination are available as query parameters.", "operationId": "getBlocklists", "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 1000, "description": "Page size", "default": 100, "title": "Page Size"}, "description": "Page size"}, {"name": "subscribed_only", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Fetch only blocklists subscribed by your organization, engines or tags", "default": false, "title": "Subscribed Only"}, "description": "Fetch only blocklists subscribed by your organization, engines or tags"}, {"name": "exclude_subscribed", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Exclude subscribed blocklists", "default": false, "title": "Exclude Subscribed"}, "description": "Exclude subscribed blocklists"}, {"name": "include_filter", "in": "query", "required": false, "schema": {"type": "array", "items": {"$ref": "#/components/schemas/BlocklistIncludeFilters"}, "description": "Include blocklists with the specified filters", "default": ["private", "shared"], "title": "Include Filter"}, "description": "Include blocklists with the specified filters"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Page_BlocklistResponse_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}": {"get": {"tags": ["Blocklists"], "summary": "Get Blocklist", "description": "Get the details of a blocklist by ID. The content of the blocklist is not returned.", "operationId": "getBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistGetResponse"}}}}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["Blocklists"], "summary": "Update Blocklist", "description": "Update a blocklist's details by ID. It is not possible to update the blocklist content using this operation.", "operationId": "updateBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistUpdateRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistResponse"}}}}, "403": {"description": "Blocklist is read-only"}, "404": {"description": "Blocklist not found"}, "500": {"description": "Internal server error"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Blocklists"], "summary": "Delete Blocklist", "description": "Delete a blocklist by ID. If the blocklist is shared with other organizations or it has subscriptions, the operation will fail. If you want to force delete the blocklist, you can use the force query parameter, so the blocklists will be unshared / unsubscribed.", "operationId": "deleteBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "force", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Force delete the blocklist if it is shared or subscribed", "default": false, "title": "Force"}, "description": "Force delete the blocklist if it is shared or subscribed"}], "responses": {"204": {"description": "Successful Response"}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/upload": {"post": {"tags": ["Blocklists"], "summary": "Upload Blocklist Content", "description": "Upload a blocklist. The file must be in txt format with one IP per line. This operation will overwrite the existing blocklist content.", "operationId": "uploadBlocklistContent", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "expiration", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "Blocklist expiration", "title": "Expiration"}, "description": "Blocklist expiration", "example": "2024-07-05T14:43:52.397739+00:00"}, {"name": "ignore_invalid_ips", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Ignore invalid IPs", "default": false, "title": "Ignore Invalid Ips"}, "description": "Ignore invalid IPs"}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_uploadBlocklistContent"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Invalid IP in blocklist file content"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/ips": {"post": {"tags": ["Blocklists"], "summary": "Add Ips To Blocklist", "description": "Add IPs to a blocklist. If an IP is already in the blocklist, its expiration will be updated with the new expiration.", "operationId": "addIpsToBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistAddIPsRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "403": {"description": "Blocklist is read-only"}, "404": {"description": "Blocklist not found"}, "412": {"description": "Payload too large for one operation, limit is 20000 IPs per request"}, "500": {"description": "Internal server error"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/ips/delete": {"post": {"tags": ["Blocklists"], "summary": "Delete Ips From Blocklist", "description": "Delete IPs from a blocklist", "operationId": "deleteIpsFromBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistDeleteIPsRequest"}}}}, "responses": {"204": {"description": "Successful Response"}, "403": {"description": "Blocklist is read-only"}, "404": {"description": "Blocklist not found"}, "500": {"description": "Internal server error"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/download": {"get": {"tags": ["Blocklists"], "summary": "Download Blocklist Content", "description": "Download blocklist content as a list of ips as plain text separated by new lines. The response will include the ETag header for cache control. If_Modified_Since and If_None_Match cache control headers are supported for conditional requests.", "operationId": "downloadBlocklistContent", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "if-modified-since", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "If_Modified_Since cache control header", "title": "If-Modified-Since"}, "description": "If_Modified_Since cache control header"}, {"name": "if-none-match", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "If_None_Match cache control header", "title": "If-None-Match"}, "description": "If_None_Match cache control header"}], "responses": {"200": {"description": "Successful Response", "content": {"text/plain": {"schema": {"type": "string"}}}}, "404": {"description": "Blocklist not found"}, "204": {"description": "Blocklist is empty"}, "500": {"description": "Internal server error"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/subscribers": {"post": {"tags": ["Blocklists"], "summary": "Subscribe Blocklist", "description": "Subscribe to a blocklist with a remediation type. If the entity type is the full organization or a Tag, all the engines belonging to the organization or the Tag will be subscribed and new engines that will join the organization or the Tag will also be automatically subscribed. If the subscription has been done on an organization or Tag you cannot unsubscribe individual engines. In case of errors for some subscribers, the operation will still succeed for the entities that were successfully subscribed and you'll have the list of errors in the operation's result. This operation is submitted to quotas.", "operationId": "subscribeBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistSubscriptionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistSubscriptionResponse"}}}}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Blocklists"], "summary": "Get Blocklist Subscribers", "description": "Get blocklist subscribers within your organization.", "operationId": "getBlocklistSubscribers", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistSubscribersResponse"}}}}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/subscribers/{entity_id}": {"delete": {"tags": ["Blocklists"], "summary": "Unsubscribe Blocklist", "description": "Unsubscribe from a blocklist. You cannot unsubscribe individual engines if the subscription has been done on an organization or Tag.", "operationId": "unsubscribeBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "entity_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Entity Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/shares": {"post": {"tags": ["Blocklists"], "summary": "Share Blocklist", "description": "Share a blocklist with other organizations given their IDs. The blocklist must be owned by your organization. You can give read-only access or read-write access to the blocklist. Sharing a blocklist will not automatically subscribe the shared organizations to the blocklist.", "operationId": "shareBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistShareRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Blocklist not found"}, "409": {"description": "Blocklist is not private"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/shares/{unshare_organization_id}": {"delete": {"tags": ["Blocklists"], "summary": "Unshare Blocklist", "description": "Unshare a blocklist with other organizations. If the blocklist is subscribed by the organization, the operation will fail.Use force query parameter to unshare a blocklist even if subscriptions exists.", "operationId": "unshareBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "unshare_organization_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Unshare Organization Id"}}], "responses": {"204": {"description": "Successful Response"}, "404": {"description": "Blocklist not found"}, "409": {"description": "Blocklist is not private"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations": {"post": {"tags": ["Integrations"], "summary": "Create Integration", "description": "Create an integration to a firewall or remediation component, owned by your organization. The name should be unique within the organization. This operation is submitted to quotas.", "operationId": "createIntegration", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationCreateRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationCreateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Integrations"], "summary": "Get Integrations", "description": "Get integrations owned by your organization", "operationId": "getIntegrations", "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Page_IntegrationGetResponse_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}": {"get": {"tags": ["Integrations"], "summary": "Get Integration", "description": "Get an integration by ID", "operationId": "getIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationGetResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["Integrations"], "summary": "Update Integration", "description": "Update the integration details", "operationId": "updateIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationUpdateRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationUpdateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Integrations"], "summary": "Delete Integration", "description": "Delete the integration by ID", "operationId": "deleteIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}/content": {"head": {"tags": ["Integrations"], "summary": "Head Integration Content", "description": "Check if the integration has content", "operationId": "headIntegrationContent", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Integrations"], "summary": "Get Integration Content", "description": "Get the ips associated to the integration in plain text format. The content can be paginated to accomodate limits in firewalls.", "operationId": "getIntegrationContent", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number to return", "default": 1, "title": "Page"}, "description": "Page number to return"}, {"name": "page_size", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer", "minimum": 10000}, {"type": "null"}], "description": "Maximum number of items to return, 0 means no limit (default), should be greater than 10000", "title": "Page Size"}, "description": "Maximum number of items to return, 0 means no limit (default), should be greater than 10000"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}/v1/decisions/stream": {"get": {"tags": ["Integrations"], "summary": "Get Integration Content Stream", "description": "Get the ips associated to the integration in a format compatible with a remediation component. As for the remediation components, you can fetch the full content with startup=true or only the changes since the last pull", "operationId": "getIntegrationContentStream", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}, {"name": "startup", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull.", "default": false, "title": "Startup"}, "description": "Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull."}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/info": {"get": {"tags": ["Info"], "summary": "Get Me Info", "description": "Get the current user and organization informations", "operationId": "getInfo", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InfoResponse"}}}}}}}}, "components": {"schemas": {"ApiKeyCredentials": {"properties": {"api_key": {"type": "string", "title": "Api Key", "description": "API key for the integration"}}, "type": "object", "required": ["api_key"], "title": "ApiKeyCredentials"}, "BasicAuthCredentials": {"properties": {"username": {"type": "string", "title": "Username", "description": "Basic auth username for the integration"}, "password": {"type": "string", "title": "Password", "description": "Basic auth password for the integration"}}, "type": "object", "required": ["username", "password"], "title": "BasicAuthCredentials"}, "BlocklistAddIPsRequest": {"properties": {"ips": {"items": {"type": "string"}, "type": "array", "title": "Ips", "description": "List of IPs or networks"}, "expiration": {"type": "string", "format": "date-time", "title": "Expiration", "description": "Expiration date"}}, "additionalProperties": false, "type": "object", "required": ["ips"], "title": "BlocklistAddIPsRequest"}, "BlocklistContentStats": {"properties": {"total_seen": {"type": "integer", "title": "Total Seen", "default": 0}, "total_fire": {"type": "integer", "title": "Total Fire", "default": 0}, "total_seen_1m": {"type": "integer", "title": "Total Seen 1M", "default": 0}, "total_in_other_lists": {"type": "integer", "title": "Total In Other Lists", "default": 0}, "total_false_positive": {"type": "integer", "title": "Total False Positive", "default": 0}, "false_positive_removed_by_crowdsec": {"type": "integer", "title": "False Positive Removed By Crowdsec", "default": 0}, "most_present_behaviors": {"items": {"$ref": "#/components/schemas/CtiBehavior"}, "type": "array", "title": "Most Present Behaviors", "default": []}, "most_present_categories": {"items": {"$ref": "#/components/schemas/CtiCategory"}, "type": "array", "title": "Most Present Categories", "default": []}, "most_present_scenarios": {"items": {"$ref": "#/components/schemas/CtiScenario"}, "type": "array", "title": "Most Present Scenarios", "default": []}, "top_as": {"items": {"$ref": "#/components/schemas/CtiAs"}, "type": "array", "title": "Top As", "default": []}, "top_attacking_countries": {"items": {"$ref": "#/components/schemas/CtiCountry"}, "type": "array", "title": "Top Attacking Countries", "default": []}, "top_ips": {"items": {"$ref": "#/components/schemas/CtiIp"}, "type": "array", "title": "Top Ips", "default": []}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "additionalProperties": true, "type": "object", "title": "BlocklistContentStats"}, "BlocklistCreateRequest": {"properties": {"name": {"type": "string", "maxLength": 200, "minLength": 1, "title": "Name", "description": "Blocklist name, must be unique within the organization"}, "label": {"type": "string", "title": "Label", "description": "Blocklist human readable name (Default: name)"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Useful references on the list's origins", "default": []}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Classification tags", "default": []}, "from_cti_query": {"type": "string", "title": "From Cti Query", "description": "CTI query (doc link available soon)"}, "since": {"type": "string", "title": "Since", "description": "Since duration for the CTI query (5m, 2h, 7d). Max is 30 days"}}, "additionalProperties": false, "type": "object", "required": ["name", "description"], "title": "BlocklistCreateRequest"}, "BlocklistCreateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "Blocklist id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Blocklist creation date"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Blocklist update date"}, "name": {"type": "string", "title": "Name", "description": "Blocklist name, unique within the organization"}, "label": {"type": "string", "title": "Label", "description": "Blocklist human readable name"}, "description": {"type": "string", "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Blocklist references"}, "is_private": {"type": "boolean", "title": "Is Private", "description": "Private blocklist if True or public if False"}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Classification tags"}, "pricing_tier": {"allOf": [{"$ref": "#/components/schemas/PricingTiers"}], "description": "Pricing tier for Crowdsec blocklists only"}, "source": {"allOf": [{"$ref": "#/components/schemas/BlocklistSources"}], "description": "Blocklist source"}, "stats": {"allOf": [{"$ref": "#/components/schemas/BlocklistStats"}], "description": "Blocklist stats"}, "from_cti_query": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "From Cti Query", "description": "CTI query from which the blocklist was created"}, "since": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Since", "description": "Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days"}, "shared_with": {"items": {"$ref": "#/components/schemas/Share"}, "type": "array", "title": "Shared With", "description": "List of organizations shared with"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id", "description": "Blocklists owner's organization id"}, "subscribers": {"items": {"$ref": "#/components/schemas/BlocklistSubscriberEntity"}, "type": "array", "title": "Subscribers", "description": "List of subscribers to the blocklist. Only subscribers belonging to your organization are returned"}}, "type": "object", "required": ["id", "created_at", "updated_at", "name", "label", "description", "references", "is_private", "tags", "pricing_tier", "source", "stats", "from_cti_query", "since", "shared_with", "organization_id", "subscribers"], "title": "BlocklistCreateResponse"}, "BlocklistDeleteIPsRequest": {"properties": {"ips": {"items": {"type": "string"}, "type": "array", "title": "Ips", "description": "List of IPs or networks"}}, "additionalProperties": false, "type": "object", "required": ["ips"], "title": "BlocklistDeleteIPsRequest"}, "BlocklistGetResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "Blocklist id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Blocklist creation date"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Blocklist update date"}, "name": {"type": "string", "title": "Name", "description": "Blocklist name, unique within the organization"}, "label": {"type": "string", "title": "Label", "description": "Blocklist human readable name"}, "description": {"type": "string", "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Blocklist references"}, "is_private": {"type": "boolean", "title": "Is Private", "description": "Private blocklist if True or public if False"}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Classification tags"}, "pricing_tier": {"allOf": [{"$ref": "#/components/schemas/PricingTiers"}], "description": "Pricing tier for Crowdsec blocklists only"}, "source": {"allOf": [{"$ref": "#/components/schemas/BlocklistSources"}], "description": "Blocklist source"}, "stats": {"allOf": [{"$ref": "#/components/schemas/BlocklistStats"}], "description": "Blocklist stats"}, "from_cti_query": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "From Cti Query", "description": "CTI query from which the blocklist was created"}, "since": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Since", "description": "Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days"}, "shared_with": {"items": {"$ref": "#/components/schemas/Share"}, "type": "array", "title": "Shared With", "description": "List of organizations shared with"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id", "description": "Blocklists owner's organization id"}, "subscribers": {"items": {"$ref": "#/components/schemas/BlocklistSubscriberEntity"}, "type": "array", "title": "Subscribers", "description": "List of subscribers to the blocklist. Only subscribers belonging to your organization are returned"}}, "type": "object", "required": ["id", "created_at", "updated_at", "name", "label", "description", "references", "is_private", "tags", "pricing_tier", "source", "stats", "from_cti_query", "since", "shared_with", "organization_id", "subscribers"], "title": "BlocklistGetResponse"}, "BlocklistIncludeFilters": {"type": "string", "enum": ["public", "private", "shared", "all"], "title": "BlocklistIncludeFilters"}, "BlocklistResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "Blocklist id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Blocklist creation date"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Blocklist update date"}, "name": {"type": "string", "title": "Name", "description": "Blocklist name, unique within the organization"}, "label": {"type": "string", "title": "Label", "description": "Blocklist human readable name"}, "description": {"type": "string", "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Blocklist references"}, "is_private": {"type": "boolean", "title": "Is Private", "description": "Private blocklist if True or public if False"}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Classification tags"}, "pricing_tier": {"allOf": [{"$ref": "#/components/schemas/PricingTiers"}], "description": "Pricing tier for Crowdsec blocklists only"}, "source": {"allOf": [{"$ref": "#/components/schemas/BlocklistSources"}], "description": "Blocklist source"}, "stats": {"allOf": [{"$ref": "#/components/schemas/BlocklistStats"}], "description": "Blocklist stats"}, "from_cti_query": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "From Cti Query", "description": "CTI query from which the blocklist was created"}, "since": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Since", "description": "Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days"}, "shared_with": {"items": {"$ref": "#/components/schemas/Share"}, "type": "array", "title": "Shared With", "description": "List of organizations shared with"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id", "description": "Blocklists owner's organization id"}, "subscribers": {"items": {"$ref": "#/components/schemas/BlocklistSubscriberEntity"}, "type": "array", "title": "Subscribers", "description": "List of subscribers to the blocklist. Only subscribers belonging to your organization are returned"}}, "type": "object", "required": ["id", "created_at", "updated_at", "name", "label", "description", "references", "is_private", "tags", "pricing_tier", "source", "stats", "from_cti_query", "since", "shared_with", "organization_id", "subscribers"], "title": "BlocklistResponse"}, "BlocklistShareRequest": {"properties": {"organizations": {"items": {"$ref": "#/components/schemas/Share"}, "type": "array", "title": "Organizations", "description": "List of organizations to share the blocklist"}}, "additionalProperties": false, "type": "object", "required": ["organizations"], "title": "BlocklistShareRequest"}, "BlocklistSources": {"type": "string", "enum": ["crowdsec", "third_party", "custom"], "title": "BlocklistSources"}, "BlocklistStats": {"properties": {"content_stats": {"allOf": [{"$ref": "#/components/schemas/BlocklistContentStats"}], "default": {"total_seen": 0, "total_fire": 0, "total_seen_1m": 0, "total_in_other_lists": 0, "total_false_positive": 0, "false_positive_removed_by_crowdsec": 0, "most_present_behaviors": [], "most_present_categories": [], "most_present_scenarios": [], "top_as": [], "top_attacking_countries": [], "top_ips": []}}, "usage_stats": {"anyOf": [{"$ref": "#/components/schemas/BlocklistUsageStats"}, {"type": "null"}], "default": {"engines_subscribed_directly": 0, "engines_subscribed_through_org": 0, "engines_subscribed_through_tag": 0, "total_subscribed_engines": 0}}, "addition_2days": {"type": "integer", "title": "Addition 2Days", "default": 0}, "addition_month": {"type": "integer", "title": "Addition Month", "default": 0}, "suppression_2days": {"type": "integer", "title": "Suppression 2Days", "default": 0}, "suppression_month": {"type": "integer", "title": "Suppression Month", "default": 0}, "change_2days_percentage": {"type": "number", "title": "Change 2Days Percentage", "default": 0.0}, "change_month_percentage": {"type": "number", "title": "Change Month Percentage", "default": 0.0}, "count": {"type": "integer", "title": "Count", "default": 0}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "additionalProperties": true, "type": "object", "title": "BlocklistStats"}, "BlocklistSubscriberEntity": {"properties": {"id": {"type": "string", "title": "Id", "description": "Subscriber entity id"}, "entity_type": {"$ref": "#/components/schemas/EntityType"}, "remediation": {"type": "string", "title": "Remediation", "description": "Remediation"}}, "type": "object", "required": ["id", "entity_type", "remediation"], "title": "BlocklistSubscriberEntity"}, "BlocklistSubscribersResponse": {"properties": {"subscribers": {"items": {"$ref": "#/components/schemas/BlocklistSubscriberEntity"}, "type": "array", "title": "Subscribers", "description": "List of subscribers"}}, "type": "object", "required": ["subscribers"], "title": "BlocklistSubscribersResponse"}, "BlocklistSubscription": {"properties": {"id": {"type": "string", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}}, "type": "object", "required": ["id", "name", "label"], "title": "BlocklistSubscription"}, "BlocklistSubscriptionRequest": {"properties": {"ids": {"items": {"type": "string"}, "type": "array", "title": "Ids", "description": "List of subscriber entity id"}, "entity_type": {"$ref": "#/components/schemas/EntityType"}, "remediation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Remediation", "description": "Remediation"}}, "additionalProperties": false, "type": "object", "required": ["entity_type"], "title": "BlocklistSubscriptionRequest"}, "BlocklistSubscriptionResponse": {"properties": {"updated": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Updated", "description": "List of updated blocklist ids", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"]}, "errors": {"anyOf": [{"items": {"additionalProperties": {"type": "string"}, "type": "object"}, "type": "array"}, {"type": "null"}], "title": "Errors", "description": "List of errors if any", "examples": [{"5f9d88b9e5c4f5b9a3d3e8b1": "error message"}]}}, "type": "object", "required": ["updated", "errors"], "title": "BlocklistSubscriptionResponse"}, "BlocklistUpdateRequest": {"properties": {"label": {"type": "string", "title": "Label", "description": "Blocklist human readable name"}, "description": {"type": "string", "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Blocklist references"}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Blocklist tags"}, "from_cti_query": {"type": "string", "title": "From Cti Query", "description": "CTI query (doc link available soon)"}, "since": {"type": "string", "title": "Since", "description": "Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days"}}, "additionalProperties": false, "type": "object", "title": "BlocklistUpdateRequest"}, "BlocklistUsageStats": {"properties": {"engines_subscribed_directly": {"type": "integer", "title": "Engines Subscribed Directly", "default": 0}, "engines_subscribed_through_org": {"type": "integer", "title": "Engines Subscribed Through Org", "default": 0}, "engines_subscribed_through_tag": {"type": "integer", "title": "Engines Subscribed Through Tag", "default": 0}, "total_subscribed_engines": {"type": "integer", "title": "Total Subscribed Engines", "default": 0}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "additionalProperties": true, "type": "object", "title": "BlocklistUsageStats"}, "Body_uploadBlocklistContent": {"properties": {"file": {"type": "string", "format": "binary", "title": "File", "description": "Blocklist file in txt format"}}, "type": "object", "required": ["file"], "title": "Body_uploadBlocklistContent"}, "CtiAs": {"properties": {"as_num": {"type": "string", "title": "As Num"}, "as_name": {"type": "string", "title": "As Name"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["as_num", "as_name", "total_ips"], "title": "CtiAs"}, "CtiBehavior": {"properties": {"name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "description": {"type": "string", "title": "Description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["name", "label", "description", "references", "total_ips"], "title": "CtiBehavior"}, "CtiCategory": {"properties": {"name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "description": {"type": "string", "title": "Description"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["name", "label", "description", "total_ips"], "title": "CtiCategory"}, "CtiCountry": {"properties": {"country_short": {"type": "string", "title": "Country Short"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["country_short", "total_ips"], "title": "CtiCountry"}, "CtiIp": {"properties": {"ip": {"type": "string", "title": "Ip"}, "total_signals_1m": {"type": "integer", "title": "Total Signals 1M"}, "reputation": {"type": "string", "title": "Reputation", "default": "unknown"}}, "additionalProperties": true, "type": "object", "required": ["ip", "total_signals_1m"], "title": "CtiIp"}, "CtiScenario": {"properties": {"name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "description": {"type": "string", "title": "Description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["name", "label", "description", "references", "total_ips"], "title": "CtiScenario"}, "EntityType": {"type": "string", "enum": ["org", "tag", "engine", "firewall_integration", "remediation_component_integration"], "title": "EntityType"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "InfoResponse": {"properties": {"organization_id": {"type": "string", "title": "Organization Id", "description": "The organization ID"}, "subscription_type": {"type": "string", "title": "Subscription Type", "description": "The organization subscription type"}, "api_key_name": {"type": "string", "title": "Api Key Name", "description": "The API key name that is used"}}, "type": "object", "required": ["organization_id", "subscription_type", "api_key_name"], "title": "InfoResponse"}, "IntegrationCreateRequest": {"properties": {"name": {"type": "string", "minLength": 1, "title": "Name", "description": "Name of the integration"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "Description of the integration"}, "entity_type": {"allOf": [{"$ref": "#/components/schemas/IntegrationType"}], "description": "Type of the integration"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "Output format of the integration"}}, "additionalProperties": false, "type": "object", "required": ["name", "entity_type", "output_format"], "title": "IntegrationCreateRequest"}, "IntegrationCreateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"allOf": [{"$ref": "#/components/schemas/IntegrationType"}], "description": "Type of the integration"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "Output format of the integration"}, "last_pull": {"type": "string", "format": "date-time", "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"allOf": [{"$ref": "#/components/schemas/Stats"}], "description": "Stats of the integration", "default": {"count": 0}}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/ApiKeyCredentials"}, {"$ref": "#/components/schemas/BasicAuthCredentials"}], "title": "Credentials", "description": "Credentials that were generated for the integration"}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "endpoint", "credentials"], "title": "IntegrationCreateResponse"}, "IntegrationGetResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"allOf": [{"$ref": "#/components/schemas/IntegrationType"}], "description": "Type of the integration"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "Output format of the integration"}, "last_pull": {"type": "string", "format": "date-time", "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"allOf": [{"$ref": "#/components/schemas/Stats"}], "description": "Stats of the integration", "default": {"count": 0}}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "endpoint"], "title": "IntegrationGetResponse"}, "IntegrationType": {"type": "string", "enum": ["firewall_integration", "remediation_component_integration"], "title": "IntegrationType"}, "IntegrationUpdateRequest": {"properties": {"name": {"type": "string", "minLength": 1, "title": "Name", "description": "New name"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "New description"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "New output format"}, "regenerate_credentials": {"type": "boolean", "title": "Regenerate Credentials", "description": "Regenerate credentials for the integration"}}, "additionalProperties": false, "type": "object", "title": "IntegrationUpdateRequest"}, "IntegrationUpdateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"allOf": [{"$ref": "#/components/schemas/IntegrationType"}], "description": "Type of the integration"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "Output format of the integration"}, "last_pull": {"type": "string", "format": "date-time", "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"allOf": [{"$ref": "#/components/schemas/Stats"}], "description": "Stats of the integration", "default": {"count": 0}}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/ApiKeyCredentials"}, {"$ref": "#/components/schemas/BasicAuthCredentials"}, {"type": "null"}], "title": "Credentials", "description": "Credentials for the integration"}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "endpoint"], "title": "IntegrationUpdateResponse"}, "Links": {"properties": {"first": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First", "examples": ["/api/v1/users?limit=1&offset1"]}, "last": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last", "examples": ["/api/v1/users?limit=1&offset1"]}, "self": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Self", "examples": ["/api/v1/users?limit=1&offset1"]}, "next": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next", "examples": ["/api/v1/users?limit=1&offset1"]}, "prev": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prev", "examples": ["/api/v1/users?limit=1&offset1"]}}, "type": "object", "required": ["first", "last", "self", "next", "prev"], "title": "Links"}, "OutputFormat": {"type": "string", "enum": ["plain_text", "f5", "remediation_component", "fortigate", "paloalto", "checkpoint", "cisco"], "title": "OutputFormat"}, "Page_BlocklistResponse_": {"properties": {"items": {"items": {"$ref": "#/components/schemas/BlocklistResponse"}, "type": "array", "title": "Items"}, "total": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Total"}, "page": {"anyOf": [{"type": "integer", "minimum": 1.0}, {"type": "null"}], "title": "Page"}, "size": {"anyOf": [{"type": "integer", "minimum": 1.0}, {"type": "null"}], "title": "Size"}, "pages": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links"}}, "type": "object", "required": ["items", "total", "page", "size", "links"], "title": "Page[BlocklistResponse]"}, "Page_IntegrationGetResponse_": {"properties": {"items": {"items": {"$ref": "#/components/schemas/IntegrationGetResponse"}, "type": "array", "title": "Items"}, "total": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Total"}, "page": {"anyOf": [{"type": "integer", "minimum": 1.0}, {"type": "null"}], "title": "Page"}, "size": {"anyOf": [{"type": "integer", "minimum": 1.0}, {"type": "null"}], "title": "Size"}, "pages": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links"}}, "type": "object", "required": ["items", "total", "page", "size", "links"], "title": "Page[IntegrationGetResponse]"}, "Permission": {"type": "string", "enum": ["read", "write"], "title": "Permission"}, "PricingTiers": {"type": "string", "enum": ["free", "premium", "platinum"], "title": "PricingTiers"}, "Share": {"properties": {"organization_id": {"type": "string", "title": "Organization Id"}, "permission": {"$ref": "#/components/schemas/Permission"}}, "type": "object", "required": ["organization_id", "permission"], "title": "Share"}, "Stats": {"properties": {"count": {"type": "integer", "title": "Count", "description": "Number of total blocklists items the integration will pull"}}, "type": "object", "required": ["count"], "title": "Stats"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}, "securitySchemes": {"ApiKeyAuth": {"type": "apiKey", "in": "header", "name": "x-api-key", "description": "If integration key is provided, can also work to get integration content"}, "BasicAuth": {"type": "http", "scheme": "basic", "description": "Basic Auth for integration content endpoint only"}}}, "security": [{"ApiKeyAuth": []}, {"BasicAuth": []}], "servers": [{"url": "https://admin.api.crowdsec.net/v1/", "description": "Production server"}]} \ No newline at end of file +{"openapi": "3.1.0", "info": {"title": "Service API", "description": "This is the API to manage Crowdsec services", "contact": {"name": "CrowdSec", "url": "https://crowdsec.net/", "email": "info@crowdsec.net"}, "version": "1.29.0"}, "paths": {"/blocklists": {"post": {"tags": ["Blocklists"], "summary": "Create Blocklist", "description": "Create a new blocklist owned by your organization. The name must be unique within your organization. The list will only be visible to your organization and organizations you shared the blocklist with. This operation is submitted to quotas", "operationId": "createBlocklist", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistCreateRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistCreateResponse"}}}}, "409": {"description": "Blocklist already exists"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Blocklists"], "summary": "Get Blocklists", "description": "Get multiple blocklists. Only blocklists owned by your organization, shared with your organization or public blocklists are returned. Filters and pagination are available as query parameters.", "operationId": "getBlocklists", "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 1000, "description": "Page size", "default": 100, "title": "Page Size"}, "description": "Page size"}, {"name": "subscribed_only", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Fetch only blocklists subscribed by your organization, engines or tags", "default": false, "title": "Subscribed Only"}, "description": "Fetch only blocklists subscribed by your organization, engines or tags"}, {"name": "exclude_subscribed", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Exclude subscribed blocklists", "default": false, "title": "Exclude Subscribed"}, "description": "Exclude subscribed blocklists"}, {"name": "include_filter", "in": "query", "required": false, "schema": {"type": "array", "items": {"$ref": "#/components/schemas/BlocklistIncludeFilters"}, "description": "Include blocklists with the specified filters", "default": ["private", "shared"], "title": "Include Filter"}, "description": "Include blocklists with the specified filters"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Page_BlocklistResponse_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}": {"get": {"tags": ["Blocklists"], "summary": "Get Blocklist", "description": "Get the details of a blocklist by ID. The content of the blocklist is not returned.", "operationId": "getBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistGetResponse"}}}}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["Blocklists"], "summary": "Update Blocklist", "description": "Update a blocklist's details by ID. It is not possible to update the blocklist content using this operation.", "operationId": "updateBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistUpdateRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistResponse"}}}}, "403": {"description": "Blocklist is read-only"}, "404": {"description": "Blocklist not found"}, "500": {"description": "Internal server error"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Blocklists"], "summary": "Delete Blocklist", "description": "Delete a blocklist by ID. If the blocklist is shared with other organizations or it has subscriptions, the operation will fail. If you want to force delete the blocklist, you can use the force query parameter, so the blocklists will be unshared / unsubscribed.", "operationId": "deleteBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "force", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Force delete the blocklist if it is shared or subscribed", "default": false, "title": "Force"}, "description": "Force delete the blocklist if it is shared or subscribed"}], "responses": {"204": {"description": "Successful Response"}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/upload": {"post": {"tags": ["Blocklists"], "summary": "Upload Blocklist Content", "description": "Upload a blocklist. The file must be in txt format with one IP per line. This operation will overwrite the existing blocklist content.", "operationId": "uploadBlocklistContent", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "expiration", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "description": "Blocklist expiration", "title": "Expiration"}, "description": "Blocklist expiration", "example": "2024-09-18T10:03:12.735548+00:00"}, {"name": "ignore_invalid_ips", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Ignore invalid IPs", "default": false, "title": "Ignore Invalid Ips"}, "description": "Ignore invalid IPs"}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_uploadBlocklistContent"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Invalid IP in blocklist file content"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/ips": {"post": {"tags": ["Blocklists"], "summary": "Add Ips To Blocklist", "description": "Add IPs to a blocklist. If an IP is already in the blocklist, its expiration will be updated with the new expiration.", "operationId": "addIpsToBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistAddIPsRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "403": {"description": "Blocklist is read-only"}, "404": {"description": "Blocklist not found"}, "412": {"description": "Payload too large for one operation, limit is 20000 IPs per request"}, "500": {"description": "Internal server error"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/ips/delete": {"post": {"tags": ["Blocklists"], "summary": "Delete Ips From Blocklist", "description": "Delete IPs from a blocklist", "operationId": "deleteIpsFromBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistDeleteIPsRequest"}}}}, "responses": {"204": {"description": "Successful Response"}, "403": {"description": "Blocklist is read-only"}, "404": {"description": "Blocklist not found"}, "500": {"description": "Internal server error"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/download": {"get": {"tags": ["Blocklists"], "summary": "Download Blocklist Content", "description": "Download blocklist content as a list of ips as plain text separated by new lines. The response will include the ETag header for cache control. If_Modified_Since and If_None_Match cache control headers are supported for conditional requests.", "operationId": "downloadBlocklistContent", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "if-modified-since", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "If_Modified_Since cache control header", "title": "If-Modified-Since"}, "description": "If_Modified_Since cache control header"}, {"name": "if-none-match", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "If_None_Match cache control header", "title": "If-None-Match"}, "description": "If_None_Match cache control header"}], "responses": {"200": {"description": "Successful Response", "content": {"text/plain": {"schema": {"type": "string"}}}}, "404": {"description": "Blocklist not found"}, "204": {"description": "Blocklist is empty"}, "500": {"description": "Internal server error"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/subscribers": {"post": {"tags": ["Blocklists"], "summary": "Subscribe Blocklist", "description": "Subscribe to a blocklist with a remediation type. If the entity type is the full organization or a Tag, all the engines belonging to the organization or the Tag will be subscribed and new engines that will join the organization or the Tag will also be automatically subscribed. If the subscription has been done on an organization or Tag you cannot unsubscribe individual engines. In case of errors for some subscribers, the operation will still succeed for the entities that were successfully subscribed and you'll have the list of errors in the operation's result. This operation is submitted to quotas.", "operationId": "subscribeBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistSubscriptionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistSubscriptionResponse"}}}}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Blocklists"], "summary": "Get Blocklist Subscribers", "description": "Get blocklist subscribers within your organization.", "operationId": "getBlocklistSubscribers", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistSubscribersResponse"}}}}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/subscribers/{entity_id}": {"delete": {"tags": ["Blocklists"], "summary": "Unsubscribe Blocklist", "description": "Unsubscribe from a blocklist. You cannot unsubscribe individual engines if the subscription has been done on an organization or Tag.", "operationId": "unsubscribeBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "entity_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Entity Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Blocklist not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/shares": {"post": {"tags": ["Blocklists"], "summary": "Share Blocklist", "description": "Share a blocklist with other organizations given their IDs. The blocklist must be owned by your organization. You can give read-only access or read-write access to the blocklist. Sharing a blocklist will not automatically subscribe the shared organizations to the blocklist.", "operationId": "shareBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlocklistShareRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Blocklist not found"}, "409": {"description": "Blocklist is not private"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/blocklists/{blocklist_id}/shares/{unshare_organization_id}": {"delete": {"tags": ["Blocklists"], "summary": "Unshare Blocklist", "description": "Unshare a blocklist with other organizations. If the blocklist is subscribed by the organization, the operation will fail.Use force query parameter to unshare a blocklist even if subscriptions exists.", "operationId": "unshareBlocklist", "parameters": [{"name": "blocklist_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Blocklist Id"}}, {"name": "unshare_organization_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Unshare Organization Id"}}], "responses": {"204": {"description": "Successful Response"}, "404": {"description": "Blocklist not found"}, "409": {"description": "Blocklist is not private"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations": {"post": {"tags": ["Integrations"], "summary": "Create Integration", "description": "Create an integration to a firewall or remediation component, owned by your organization. The name should be unique within the organization. This operation is submitted to quotas.", "operationId": "createIntegration", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationCreateRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationCreateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Integrations"], "summary": "Get Integrations", "description": "Get integrations owned by your organization", "operationId": "getIntegrations", "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Page_IntegrationGetResponse_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}": {"get": {"tags": ["Integrations"], "summary": "Get Integration", "description": "Get an integration by ID", "operationId": "getIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationGetResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["Integrations"], "summary": "Update Integration", "description": "Update the integration details", "operationId": "updateIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationUpdateRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationUpdateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Integrations"], "summary": "Delete Integration", "description": "Delete the integration by ID", "operationId": "deleteIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}/content": {"head": {"tags": ["Integrations"], "summary": "Head Integration Content", "description": "Check if the integration has content", "operationId": "headIntegrationContent", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Integrations"], "summary": "Get Integration Content", "description": "Get the ips associated to the integration in plain text format. The content can be paginated to accomodate limits in firewalls.", "operationId": "getIntegrationContent", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number to return", "default": 1, "title": "Page"}, "description": "Page number to return"}, {"name": "page_size", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer", "minimum": 10000}, {"type": "null"}], "description": "Maximum number of items to return, 0 means no limit (default), should be greater than 10000", "title": "Page Size"}, "description": "Maximum number of items to return, 0 means no limit (default), should be greater than 10000"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}/v1/decisions/stream": {"get": {"tags": ["Integrations"], "summary": "Get Integration Content Stream", "description": "Get the ips associated to the integration in a format compatible with a remediation component. As for the remediation components, you can fetch the full content with startup=true or only the changes since the last pull", "operationId": "getIntegrationContentStream", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}, {"name": "startup", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull.", "default": false, "title": "Startup"}, "description": "Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull."}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/info": {"get": {"tags": ["Info"], "summary": "Get Me Info", "description": "Get the current user and organization informations", "operationId": "getInfo", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InfoResponse"}}}}}}}, "/hub/index/{tenant}/{branch}/.index.json": {"get": {"description": "Get a (minimized) index file for 'cscli hub update'. May or may not include unused fields\n(content, long descriptions, labels...) or redundant ones (author, name).", "operationId": "getIndex", "parameters": [{"in": "path", "name": "branch", "required": true, "schema": {"title": "Branch", "type": "string"}}, {"in": "path", "name": "tenant", "required": true, "schema": {"title": "Tenant", "type": "string"}}, {"description": "Include content in the index", "in": "query", "name": "with_content", "required": false, "schema": {"default": false, "description": "Include content in the index", "title": "With Content", "type": "boolean"}}], "responses": {"200": {"content": {"application/json": {"schema": {"additionalProperties": {"additionalProperties": {"type": "object"}, "type": "object"}, "title": "Response Getindex", "type": "object"}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Get a minimized index file (crowdsec only)", "tags": ["Hub"]}, "head": {"description": "This endpoint returns cache-related headers for the index file without the full content. \nIt is useful for validating cache, checking resource freshness, and managing client-side \ncache expiration policies. No body content is returned.", "operationId": "headIndex", "parameters": [{"in": "path", "name": "branch", "required": true, "schema": {"title": "Branch", "type": "string"}}, {"in": "path", "name": "tenant", "required": true, "schema": {"title": "Tenant", "type": "string"}}, {"description": "Include content in the index", "in": "query", "name": "with_content", "required": false, "schema": {"default": false, "description": "Include content in the index", "title": "With Content", "type": "boolean"}}], "responses": {"200": {"content": {"application/json": {"schema": {"additionalProperties": {"additionalProperties": {"type": "object"}, "type": "object"}, "title": "Response Headindex", "type": "object"}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Check cache control headers for the index file", "tags": ["Hub"]}}, "/hub/index/{tenant}/{branch}/{item_path}": {"get": {"description": "Get an item's content from its path. This is usually a YAML file.", "operationId": "getItemContent", "parameters": [{"in": "path", "name": "item_path", "required": true, "schema": {"title": "Item Path", "type": "string"}}, {"in": "path", "name": "branch", "required": true, "schema": {"title": "Branch", "type": "string"}}, {"in": "path", "name": "tenant", "required": true, "schema": {"title": "Tenant", "type": "string"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "404": {"description": "No content field"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Get an item's content (crowdsec only)", "tags": ["Hub"]}, "head": {"description": "This endpoint returns cache-related headers for an item's content. It is useful for validating \ncache, checking resource freshness, and managing client-side cache expiration policies. No body \ncontent is returned.", "operationId": "headItemContent", "parameters": [{"in": "path", "name": "item_path", "required": true, "schema": {"title": "Item Path", "type": "string"}}, {"in": "path", "name": "branch", "required": true, "schema": {"title": "Branch", "type": "string"}}, {"in": "path", "name": "tenant", "required": true, "schema": {"title": "Tenant", "type": "string"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Check cache control headers for an item's content", "tags": ["Hub"]}}}, "components": {"schemas": {"ApiKeyCredentials": {"properties": {"api_key": {"type": "string", "title": "Api Key", "description": "API key for the integration"}}, "type": "object", "required": ["api_key"], "title": "ApiKeyCredentials"}, "BasicAuthCredentials": {"properties": {"username": {"type": "string", "title": "Username", "description": "Basic auth username for the integration"}, "password": {"type": "string", "title": "Password", "description": "Basic auth password for the integration"}}, "type": "object", "required": ["username", "password"], "title": "BasicAuthCredentials"}, "BlocklistAddIPsRequest": {"properties": {"ips": {"items": {"type": "string"}, "type": "array", "title": "Ips", "description": "List of IPs or networks"}, "expiration": {"type": "string", "format": "date-time", "title": "Expiration", "description": "Expiration date"}}, "additionalProperties": false, "type": "object", "required": ["ips"], "title": "BlocklistAddIPsRequest"}, "BlocklistContentStats": {"properties": {"total_seen": {"type": "integer", "title": "Total Seen", "default": 0}, "total_fire": {"type": "integer", "title": "Total Fire", "default": 0}, "total_seen_1m": {"type": "integer", "title": "Total Seen 1M", "default": 0}, "total_in_other_lists": {"type": "integer", "title": "Total In Other Lists", "default": 0}, "total_false_positive": {"type": "integer", "title": "Total False Positive", "default": 0}, "false_positive_removed_by_crowdsec": {"type": "integer", "title": "False Positive Removed By Crowdsec", "default": 0}, "most_present_behaviors": {"items": {"$ref": "#/components/schemas/CtiBehavior"}, "type": "array", "title": "Most Present Behaviors", "default": []}, "most_present_categories": {"items": {"$ref": "#/components/schemas/CtiCategory"}, "type": "array", "title": "Most Present Categories", "default": []}, "most_present_scenarios": {"items": {"$ref": "#/components/schemas/CtiScenario"}, "type": "array", "title": "Most Present Scenarios", "default": []}, "top_as": {"items": {"$ref": "#/components/schemas/CtiAs"}, "type": "array", "title": "Top As", "default": []}, "top_attacking_countries": {"items": {"$ref": "#/components/schemas/CtiCountry"}, "type": "array", "title": "Top Attacking Countries", "default": []}, "top_ips": {"items": {"$ref": "#/components/schemas/CtiIp"}, "type": "array", "title": "Top Ips", "default": []}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "additionalProperties": true, "type": "object", "title": "BlocklistContentStats"}, "BlocklistCreateRequest": {"properties": {"name": {"type": "string", "maxLength": 200, "minLength": 1, "title": "Name", "description": "Blocklist name, must be unique within the organization"}, "label": {"type": "string", "title": "Label", "description": "Blocklist human readable name (Default: name)"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Useful references on the list's origins", "default": []}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Classification tags", "default": []}, "from_cti_query": {"type": "string", "title": "From Cti Query", "description": "CTI query (doc link available soon)"}, "since": {"type": "string", "title": "Since", "description": "Since duration for the CTI query (5m, 2h, 7d). Max is 30 days"}}, "additionalProperties": false, "type": "object", "required": ["name", "description"], "title": "BlocklistCreateRequest"}, "BlocklistCreateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "Blocklist id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Blocklist creation date"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Blocklist update date"}, "name": {"type": "string", "title": "Name", "description": "Blocklist name, unique within the organization"}, "label": {"type": "string", "title": "Label", "description": "Blocklist human readable name"}, "description": {"type": "string", "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Blocklist references"}, "is_private": {"type": "boolean", "title": "Is Private", "description": "Private blocklist if True or public if False"}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Classification tags"}, "pricing_tier": {"allOf": [{"$ref": "#/components/schemas/PricingTiers"}], "description": "Pricing tier for Crowdsec blocklists only"}, "source": {"allOf": [{"$ref": "#/components/schemas/BlocklistSources"}], "description": "Blocklist source"}, "stats": {"allOf": [{"$ref": "#/components/schemas/BlocklistStats"}], "description": "Blocklist stats"}, "from_cti_query": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "From Cti Query", "description": "CTI query from which the blocklist was created"}, "since": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Since", "description": "Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days"}, "shared_with": {"items": {"$ref": "#/components/schemas/Share"}, "type": "array", "title": "Shared With", "description": "List of organizations shared with"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id", "description": "Blocklists owner's organization id"}, "subscribers": {"items": {"$ref": "#/components/schemas/BlocklistSubscriberEntity"}, "type": "array", "title": "Subscribers", "description": "List of subscribers to the blocklist. Only subscribers belonging to your organization are returned"}}, "type": "object", "required": ["id", "created_at", "updated_at", "name", "label", "description", "references", "is_private", "tags", "pricing_tier", "source", "stats", "from_cti_query", "since", "shared_with", "organization_id", "subscribers"], "title": "BlocklistCreateResponse"}, "BlocklistDeleteIPsRequest": {"properties": {"ips": {"items": {"type": "string"}, "type": "array", "title": "Ips", "description": "List of IPs or networks"}}, "additionalProperties": false, "type": "object", "required": ["ips"], "title": "BlocklistDeleteIPsRequest"}, "BlocklistGetResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "Blocklist id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Blocklist creation date"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Blocklist update date"}, "name": {"type": "string", "title": "Name", "description": "Blocklist name, unique within the organization"}, "label": {"type": "string", "title": "Label", "description": "Blocklist human readable name"}, "description": {"type": "string", "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Blocklist references"}, "is_private": {"type": "boolean", "title": "Is Private", "description": "Private blocklist if True or public if False"}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Classification tags"}, "pricing_tier": {"allOf": [{"$ref": "#/components/schemas/PricingTiers"}], "description": "Pricing tier for Crowdsec blocklists only"}, "source": {"allOf": [{"$ref": "#/components/schemas/BlocklistSources"}], "description": "Blocklist source"}, "stats": {"allOf": [{"$ref": "#/components/schemas/BlocklistStats"}], "description": "Blocklist stats"}, "from_cti_query": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "From Cti Query", "description": "CTI query from which the blocklist was created"}, "since": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Since", "description": "Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days"}, "shared_with": {"items": {"$ref": "#/components/schemas/Share"}, "type": "array", "title": "Shared With", "description": "List of organizations shared with"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id", "description": "Blocklists owner's organization id"}, "subscribers": {"items": {"$ref": "#/components/schemas/BlocklistSubscriberEntity"}, "type": "array", "title": "Subscribers", "description": "List of subscribers to the blocklist. Only subscribers belonging to your organization are returned"}}, "type": "object", "required": ["id", "created_at", "updated_at", "name", "label", "description", "references", "is_private", "tags", "pricing_tier", "source", "stats", "from_cti_query", "since", "shared_with", "organization_id", "subscribers"], "title": "BlocklistGetResponse"}, "BlocklistIncludeFilters": {"type": "string", "enum": ["public", "private", "shared", "all"], "title": "BlocklistIncludeFilters"}, "BlocklistResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "Blocklist id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Blocklist creation date"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Blocklist update date"}, "name": {"type": "string", "title": "Name", "description": "Blocklist name, unique within the organization"}, "label": {"type": "string", "title": "Label", "description": "Blocklist human readable name"}, "description": {"type": "string", "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Blocklist references"}, "is_private": {"type": "boolean", "title": "Is Private", "description": "Private blocklist if True or public if False"}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Classification tags"}, "pricing_tier": {"allOf": [{"$ref": "#/components/schemas/PricingTiers"}], "description": "Pricing tier for Crowdsec blocklists only"}, "source": {"allOf": [{"$ref": "#/components/schemas/BlocklistSources"}], "description": "Blocklist source"}, "stats": {"allOf": [{"$ref": "#/components/schemas/BlocklistStats"}], "description": "Blocklist stats"}, "from_cti_query": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "From Cti Query", "description": "CTI query from which the blocklist was created"}, "since": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Since", "description": "Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days"}, "shared_with": {"items": {"$ref": "#/components/schemas/Share"}, "type": "array", "title": "Shared With", "description": "List of organizations shared with"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id", "description": "Blocklists owner's organization id"}, "subscribers": {"items": {"$ref": "#/components/schemas/BlocklistSubscriberEntity"}, "type": "array", "title": "Subscribers", "description": "List of subscribers to the blocklist. Only subscribers belonging to your organization are returned"}}, "type": "object", "required": ["id", "created_at", "updated_at", "name", "label", "description", "references", "is_private", "tags", "pricing_tier", "source", "stats", "from_cti_query", "since", "shared_with", "organization_id", "subscribers"], "title": "BlocklistResponse"}, "BlocklistShareRequest": {"properties": {"organizations": {"items": {"$ref": "#/components/schemas/Share"}, "type": "array", "title": "Organizations", "description": "List of organizations to share the blocklist"}}, "additionalProperties": false, "type": "object", "required": ["organizations"], "title": "BlocklistShareRequest"}, "BlocklistSources": {"type": "string", "enum": ["crowdsec", "third_party", "custom"], "title": "BlocklistSources"}, "BlocklistStats": {"properties": {"content_stats": {"allOf": [{"$ref": "#/components/schemas/BlocklistContentStats"}], "default": {"total_seen": 0, "total_fire": 0, "total_seen_1m": 0, "total_in_other_lists": 0, "total_false_positive": 0, "false_positive_removed_by_crowdsec": 0, "most_present_behaviors": [], "most_present_categories": [], "most_present_scenarios": [], "top_as": [], "top_attacking_countries": [], "top_ips": []}}, "usage_stats": {"anyOf": [{"$ref": "#/components/schemas/BlocklistUsageStats"}, {"type": "null"}], "default": {"engines_subscribed_directly": 0, "engines_subscribed_through_org": 0, "engines_subscribed_through_tag": 0, "total_subscribed_engines": 0}}, "addition_2days": {"type": "integer", "title": "Addition 2Days", "default": 0}, "addition_month": {"type": "integer", "title": "Addition Month", "default": 0}, "suppression_2days": {"type": "integer", "title": "Suppression 2Days", "default": 0}, "suppression_month": {"type": "integer", "title": "Suppression Month", "default": 0}, "change_2days_percentage": {"type": "number", "title": "Change 2Days Percentage", "default": 0.0}, "change_month_percentage": {"type": "number", "title": "Change Month Percentage", "default": 0.0}, "count": {"type": "integer", "title": "Count", "default": 0}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "additionalProperties": true, "type": "object", "title": "BlocklistStats"}, "BlocklistSubscriberEntity": {"properties": {"id": {"type": "string", "title": "Id", "description": "Subscriber entity id"}, "entity_type": {"$ref": "#/components/schemas/EntityType"}, "remediation": {"type": "string", "title": "Remediation", "description": "Remediation"}}, "type": "object", "required": ["id", "entity_type", "remediation"], "title": "BlocklistSubscriberEntity"}, "BlocklistSubscribersResponse": {"properties": {"subscribers": {"items": {"$ref": "#/components/schemas/BlocklistSubscriberEntity"}, "type": "array", "title": "Subscribers", "description": "List of subscribers"}}, "type": "object", "required": ["subscribers"], "title": "BlocklistSubscribersResponse"}, "BlocklistSubscription": {"properties": {"id": {"type": "string", "title": "Id"}, "remediation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Remediation"}, "name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}}, "type": "object", "required": ["id", "name", "label"], "title": "BlocklistSubscription"}, "BlocklistSubscriptionRequest": {"properties": {"ids": {"items": {"type": "string"}, "type": "array", "title": "Ids", "description": "List of subscriber entity id"}, "entity_type": {"$ref": "#/components/schemas/EntityType"}, "remediation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Remediation", "description": "Remediation"}}, "additionalProperties": false, "type": "object", "required": ["entity_type"], "title": "BlocklistSubscriptionRequest"}, "BlocklistSubscriptionResponse": {"properties": {"updated": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Updated", "description": "List of updated blocklist ids", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"]}, "errors": {"anyOf": [{"items": {"additionalProperties": {"type": "string"}, "type": "object"}, "type": "array"}, {"type": "null"}], "title": "Errors", "description": "List of errors if any", "examples": [{"5f9d88b9e5c4f5b9a3d3e8b1": "error message"}]}}, "type": "object", "required": ["updated", "errors"], "title": "BlocklistSubscriptionResponse"}, "BlocklistUpdateRequest": {"properties": {"label": {"type": "string", "title": "Label", "description": "Blocklist human readable name"}, "description": {"type": "string", "title": "Description", "description": "Blocklist description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Blocklist references"}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Blocklist tags"}, "from_cti_query": {"type": "string", "title": "From Cti Query", "description": "CTI query (doc link available soon)"}, "since": {"type": "string", "title": "Since", "description": "Since duration for the CTI query (eg. 5m, 2h, 7d). Max is 30 days"}}, "additionalProperties": false, "type": "object", "title": "BlocklistUpdateRequest"}, "BlocklistUsageStats": {"properties": {"engines_subscribed_directly": {"type": "integer", "title": "Engines Subscribed Directly", "default": 0}, "engines_subscribed_through_org": {"type": "integer", "title": "Engines Subscribed Through Org", "default": 0}, "engines_subscribed_through_tag": {"type": "integer", "title": "Engines Subscribed Through Tag", "default": 0}, "total_subscribed_engines": {"type": "integer", "title": "Total Subscribed Engines", "default": 0}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "additionalProperties": true, "type": "object", "title": "BlocklistUsageStats"}, "Body_uploadBlocklistContent": {"properties": {"file": {"type": "string", "format": "binary", "title": "File", "description": "Blocklist file in txt format"}}, "type": "object", "required": ["file"], "title": "Body_uploadBlocklistContent"}, "CtiAs": {"properties": {"as_num": {"type": "string", "title": "As Num"}, "as_name": {"type": "string", "title": "As Name"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["as_num", "as_name", "total_ips"], "title": "CtiAs"}, "CtiBehavior": {"properties": {"name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "description": {"type": "string", "title": "Description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["name", "label", "description", "references", "total_ips"], "title": "CtiBehavior"}, "CtiCategory": {"properties": {"name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "description": {"type": "string", "title": "Description"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["name", "label", "description", "total_ips"], "title": "CtiCategory"}, "CtiCountry": {"properties": {"country_short": {"type": "string", "title": "Country Short"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["country_short", "total_ips"], "title": "CtiCountry"}, "CtiIp": {"properties": {"ip": {"type": "string", "title": "Ip"}, "total_signals_1m": {"type": "integer", "title": "Total Signals 1M"}, "reputation": {"type": "string", "title": "Reputation", "default": "unknown"}}, "additionalProperties": true, "type": "object", "required": ["ip", "total_signals_1m"], "title": "CtiIp"}, "CtiScenario": {"properties": {"name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "description": {"type": "string", "title": "Description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References"}, "total_ips": {"type": "integer", "title": "Total Ips"}}, "additionalProperties": true, "type": "object", "required": ["name", "label", "description", "references", "total_ips"], "title": "CtiScenario"}, "EntityType": {"type": "string", "enum": ["org", "tag", "engine", "firewall_integration", "remediation_component_integration"], "title": "EntityType"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "title": "Detail", "type": "array"}}, "title": "HTTPValidationError", "type": "object"}, "InfoResponse": {"properties": {"organization_id": {"type": "string", "title": "Organization Id", "description": "The organization ID"}, "subscription_type": {"type": "string", "title": "Subscription Type", "description": "The organization subscription type"}, "api_key_name": {"type": "string", "title": "Api Key Name", "description": "The API key name that is used"}}, "type": "object", "required": ["organization_id", "subscription_type", "api_key_name"], "title": "InfoResponse"}, "IntegrationCreateRequest": {"properties": {"name": {"type": "string", "minLength": 1, "title": "Name", "description": "Name of the integration"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "Description of the integration"}, "entity_type": {"allOf": [{"$ref": "#/components/schemas/IntegrationType"}], "description": "Type of the integration"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "Output format of the integration"}}, "additionalProperties": false, "type": "object", "required": ["name", "entity_type", "output_format"], "title": "IntegrationCreateRequest"}, "IntegrationCreateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"allOf": [{"$ref": "#/components/schemas/IntegrationType"}], "description": "Type of the integration"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "Output format of the integration"}, "last_pull": {"type": "string", "format": "date-time", "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"allOf": [{"$ref": "#/components/schemas/Stats"}], "description": "Stats of the integration", "default": {"count": 0}}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/ApiKeyCredentials"}, {"$ref": "#/components/schemas/BasicAuthCredentials"}], "title": "Credentials", "description": "Credentials that were generated for the integration"}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "endpoint", "credentials"], "title": "IntegrationCreateResponse"}, "IntegrationGetResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"allOf": [{"$ref": "#/components/schemas/IntegrationType"}], "description": "Type of the integration"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "Output format of the integration"}, "last_pull": {"type": "string", "format": "date-time", "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"allOf": [{"$ref": "#/components/schemas/Stats"}], "description": "Stats of the integration", "default": {"count": 0}}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "endpoint"], "title": "IntegrationGetResponse"}, "IntegrationType": {"type": "string", "enum": ["firewall_integration", "remediation_component_integration"], "title": "IntegrationType"}, "IntegrationUpdateRequest": {"properties": {"name": {"type": "string", "minLength": 1, "title": "Name", "description": "New name"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "New description"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "New output format"}, "regenerate_credentials": {"type": "boolean", "title": "Regenerate Credentials", "description": "Regenerate credentials for the integration"}}, "additionalProperties": false, "type": "object", "title": "IntegrationUpdateRequest"}, "IntegrationUpdateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"allOf": [{"$ref": "#/components/schemas/IntegrationType"}], "description": "Type of the integration"}, "output_format": {"allOf": [{"$ref": "#/components/schemas/OutputFormat"}], "description": "Output format of the integration"}, "last_pull": {"type": "string", "format": "date-time", "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"allOf": [{"$ref": "#/components/schemas/Stats"}], "description": "Stats of the integration", "default": {"count": 0}}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/ApiKeyCredentials"}, {"$ref": "#/components/schemas/BasicAuthCredentials"}, {"type": "null"}], "title": "Credentials", "description": "Credentials for the integration"}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "endpoint"], "title": "IntegrationUpdateResponse"}, "Links": {"properties": {"first": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First", "examples": ["/api/v1/users?limit=1&offset1"]}, "last": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last", "examples": ["/api/v1/users?limit=1&offset1"]}, "self": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Self", "examples": ["/api/v1/users?limit=1&offset1"]}, "next": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next", "examples": ["/api/v1/users?limit=1&offset1"]}, "prev": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prev", "examples": ["/api/v1/users?limit=1&offset1"]}}, "type": "object", "required": ["first", "last", "self", "next", "prev"], "title": "Links"}, "OutputFormat": {"type": "string", "enum": ["plain_text", "f5", "remediation_component", "fortigate", "paloalto", "checkpoint", "cisco"], "title": "OutputFormat"}, "Page_BlocklistResponse_": {"properties": {"items": {"items": {"$ref": "#/components/schemas/BlocklistResponse"}, "type": "array", "title": "Items"}, "total": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Total"}, "page": {"anyOf": [{"type": "integer", "minimum": 1.0}, {"type": "null"}], "title": "Page"}, "size": {"anyOf": [{"type": "integer", "minimum": 1.0}, {"type": "null"}], "title": "Size"}, "pages": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links"}}, "type": "object", "required": ["items", "total", "page", "size", "links"], "title": "Page[BlocklistResponse]"}, "Page_IntegrationGetResponse_": {"properties": {"items": {"items": {"$ref": "#/components/schemas/IntegrationGetResponse"}, "type": "array", "title": "Items"}, "total": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Total"}, "page": {"anyOf": [{"type": "integer", "minimum": 1.0}, {"type": "null"}], "title": "Page"}, "size": {"anyOf": [{"type": "integer", "minimum": 1.0}, {"type": "null"}], "title": "Size"}, "pages": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links"}}, "type": "object", "required": ["items", "total", "page", "size", "links"], "title": "Page[IntegrationGetResponse]"}, "Permission": {"type": "string", "enum": ["read", "write"], "title": "Permission"}, "PricingTiers": {"type": "string", "enum": ["free", "premium", "platinum"], "title": "PricingTiers"}, "Share": {"properties": {"organization_id": {"type": "string", "title": "Organization Id"}, "permission": {"$ref": "#/components/schemas/Permission"}}, "type": "object", "required": ["organization_id", "permission"], "title": "Share"}, "Stats": {"properties": {"count": {"type": "integer", "title": "Count", "description": "Number of total blocklists items the integration will pull"}}, "type": "object", "required": ["count"], "title": "Stats"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "title": "Location", "type": "array"}, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}}, "required": ["loc", "msg", "type"], "title": "ValidationError", "type": "object"}, "HubType": {"enum": ["parsers", "postoverflows", "scenarios", "collections", "contexts", "appsec-configs", "appsec-rules"], "title": "HubType", "type": "string"}}, "securitySchemes": {"ApiKeyAuth": {"type": "apiKey", "in": "header", "name": "x-api-key", "description": "If integration key is provided, can also work to get integration content"}, "BasicAuth": {"type": "http", "scheme": "basic", "description": "Basic Auth for integration content endpoint only"}}}, "security": [{"ApiKeyAuth": []}, {"BasicAuth": []}], "servers": [{"url": "https://admin.api.crowdsec.net/v1/", "description": "Production server"}]} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d26289f..a4ad843 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "crowdsec_service_api" -version = "1.18.5" +version = "1.29.0" license = { text = "MIT" } authors = [ { name="crowdsec", email="info@crowdsec.net" }