Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crowdsec_service_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class Server(Enum):
'AffectedComponent',
'AllowlistSubscription',
'AttackDetail',
'AttackerObjective',
'Behavior',
'CVEEventOutput',
'CVEExploitationPhase',
Expand Down Expand Up @@ -163,6 +164,8 @@ class Server(Enum):
'GetVendorSubscribedIntegrationsResponsePage',
'History',
'IPItem',
'IndustryRiskProfile',
'IndustryType',
'IntegrationResponse',
'IntervalOptions',
'IpsDetailsStats',
Expand Down
Binary file modified crowdsec_service_api/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file modified crowdsec_service_api/__pycache__/base_model.cpython-311.pyc
Binary file not shown.
Binary file modified crowdsec_service_api/__pycache__/http_client.cpython-311.pyc
Binary file not shown.
Binary file modified crowdsec_service_api/__pycache__/models.cpython-311.pyc
Binary file not shown.
28 changes: 27 additions & 1 deletion crowdsec_service_api/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: <stdin>
# timestamp: 2026-04-20T14:41:11+00:00
# timestamp: 2026-04-21T09:21:23+00:00

from __future__ import annotations

Expand Down Expand Up @@ -612,6 +612,12 @@ class AttackDetail(BaseModelSdk):
] = None


class AttackerObjective(StrEnum):
INFRASTRUCTURE_TAKEOVER = 'infrastructure_takeover'
RANSOMWARE = 'ransomware'
DATA_EXFILTRATION = 'data_exfiltration'


class Behavior(BaseModelSdk):
name: Annotated[str, Field(description='Behavior name', title='Name')]
label: Annotated[str, Field(description='Behavior label', title='Label')]
Expand Down Expand Up @@ -767,6 +773,26 @@ class History(BaseModelSdk):
days_age: Annotated[int, Field(description='Days age', title='Days Age')]


class IndustryRiskProfile(StrEnum):
TECHNOLOGY_BUSINESS = 'technology_business'
TRADITIONAL_BUSINESS = 'traditional_business'
CRITICAL_INFRASTRUCTURE = 'critical_infrastructure'
PUBLIC_SERVICE = 'public_service'
SOHO = 'SOHO'


class IndustryType(StrEnum):
COMMERCE = 'commerce'
FINANCIAL_SERVICES = 'financial_services'
HEALTHCARE = 'healthcare'
GOVERNMENT = 'government'
NON_PROFIT = 'non_profit'
INDUSTRY = 'industry'
MEDIA = 'media'
EDUCATION = 'education'
SOHO = 'SOHO'


class IntegrationResponse(BaseModelSdk):
tags: Annotated[Optional[List[str]], Field(title='Tags')] = []
organization_id: Annotated[str, Field(title='Organization Id')]
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified crowdsec_service_api/services/__pycache__/cves.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified crowdsec_service_api/services/__pycache__/hub.cpython-311.pyc
Binary file not shown.
Binary file modified crowdsec_service_api/services/__pycache__/info.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/allowlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Allowlists(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def list_allowlists(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/blocklists.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Blocklists(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_blocklists(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/cves.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Cves(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_cves(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/decisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Decisions(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_decisions(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Fingerprints(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_fingerprint_rules(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Hub(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_index(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Info(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_info(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Integrations(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_integrations(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Metrics(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_metrics_remediation(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/products.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Products(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_products(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/tracker_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class TrackerEvents(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_exploitation_phase_change_events(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/tracker_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class TrackerTags(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_tags(
self,
Expand Down
2 changes: 1 addition & 1 deletion crowdsec_service_api/services/vendors.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Vendors(Service):
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/0.15.27")
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_service_api/v0.15.26")

def get_vendors(
self,
Expand Down
12 changes: 12 additions & 0 deletions doc/Models.md
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,10 @@ name, label, description
| description | str | Attack detail description ||
| references | list[str] | Attack detail references ||

# **AttackerObjective**
## Enum:
INFRASTRUCTURE_TAKEOVER, RANSOMWARE, DATA_EXFILTRATION

# **Behavior**
## Required:
name, label, description
Expand Down Expand Up @@ -1456,6 +1460,14 @@ ip
| target_countries | Target Countries | Target countries ||
| scores | Optional[Scores] | Scoring information ||

# **IndustryRiskProfile**
## Enum:
TECHNOLOGY_BUSINESS, TRADITIONAL_BUSINESS, CRITICAL_INFRASTRUCTURE, PUBLIC_SERVICE, SOHO

# **IndustryType**
## Enum:
COMMERCE, FINANCIAL_SERVICES, HEALTHCARE, GOVERNMENT, NON_PROFIT, INDUSTRY, MEDIA, EDUCATION, SOHO

# **IntegrationResponse**
## Required:
organization_id, entity_type, name, output_format
Expand Down
6 changes: 6 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ You can find a Quickstart about this SDK, following this [documentation](https:/

[AttackDetail](./Models.md#attackdetail)

[AttackerObjective](./Models.md#attackerobjective)

[Behavior](./Models.md#behavior)

[CVEEventOutput](./Models.md#cveeventoutput)
Expand Down Expand Up @@ -299,6 +301,10 @@ You can find a Quickstart about this SDK, following this [documentation](https:/

[IPItem](./Models.md#ipitem)

[IndustryRiskProfile](./Models.md#industryriskprofile)

[IndustryType](./Models.md#industrytype)

[IntegrationResponse](./Models.md#integrationresponse)

[IntervalOptions](./Models.md#intervaloptions)
Expand Down
46 changes: 45 additions & 1 deletion public-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Service API",
"description": "This is the API to manage Crowdsec services",
"version": "1.70.3",
"version": "1.70.4",
"contact": {
"name": "CrowdSec",
"url": "https://crowdsec.net",
Expand Down Expand Up @@ -10541,6 +10541,15 @@
],
"title": "AttackDetail"
},
"AttackerObjective": {
"type": "string",
"enum": [
"infrastructure_takeover",
"ransomware",
"data_exfiltration"
],
"title": "AttackerObjective"
},
"Behavior": {
"properties": {
"name": {
Expand Down Expand Up @@ -12256,6 +12265,32 @@
],
"title": "IPItem"
},
"IndustryRiskProfile": {
"type": "string",
"enum": [
"technology_business",
"traditional_business",
"critical_infrastructure",
"public_service",
"SOHO"
],
"title": "IndustryRiskProfile"
},
"IndustryType": {
"type": "string",
"enum": [
"commerce",
"financial_services",
"healthcare",
"government",
"non_profit",
"industry",
"media",
"education",
"SOHO"
],
"title": "IndustryType"
},
"IntegrationResponse": {
"properties": {
"tags": {
Expand Down Expand Up @@ -13381,6 +13416,9 @@
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"$ref": "#/components/schemas/IndustryType"
},
"type": "object",
"title": "Industry Types",
"description": "Industry type distribution (type \u2192 count)"
Expand All @@ -13389,6 +13427,9 @@
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"$ref": "#/components/schemas/IndustryRiskProfile"
},
"type": "object",
"title": "Industry Risk Profiles",
"description": "Industry risk profile distribution (profile \u2192 count)"
Expand All @@ -13397,6 +13438,9 @@
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"$ref": "#/components/schemas/AttackerObjective"
},
"type": "object",
"title": "Attacker Objectives",
"description": "Attacker objective distribution (objective \u2192 count)"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "crowdsec_service_api"
version = "0.15.27"
version = "v0.15.26"
license = { text = "MIT" }
authors = [
{ name="crowdsec", email="info@crowdsec.net" }
Expand Down
Loading