Skip to content

Commit ab98a94

Browse files
Merge pull request #174 from code42/chore/INTEG-3207/sessions-model-update
INTEG-3207 - support actorName and ruleName
2 parents 0661a19 + a5830d1 commit ab98a94

6 files changed

Lines changed: 17 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
how a consumer would use the library or CLI tool (e.g. adding unit tests, updating documentation, etc) are not captured
1010
here.
1111

12+
## 2.12.2 - 2026-06-22
13+
14+
### Added
15+
- Support for the `actorName` and `ruleName` fields on the Session response object.
16+
1217
## 2.12.1 - 2026-06-05
1318

1419
### Fixed

src/_incydr_cli/cmds/sessions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def search(
196196
"context_summary",
197197
"exfiltration_summary",
198198
"actor_id",
199+
"actor_name",
199200
"low_events",
200201
"moderate_events",
201202
"high_events",

src/_incydr_sdk/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2022-present Code42 Software <integrations@code42.com>
22
#
33
# SPDX-License-Identifier: MIT
4-
__version__ = "2.12.1"
4+
__version__ = "2.12.2"

src/_incydr_sdk/sessions/models/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class Alert(Model):
6565
alert_id: Optional[str] = Field(alias="alertId")
6666
lesson_id: Optional[str] = Field(alias="lessonId")
6767
rule_id: Optional[str] = Field(alias="ruleId")
68+
rule_name: Optional[str] = Field(None, alias="ruleName")
6869

6970

7071
class SessionsCriteriaRequest(BaseModel):

src/_incydr_sdk/sessions/models/response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Session(ResponseModel):
2020
**Fields**:
2121
2222
* **actor_id**: `str` The ID of the actor that generated the session.
23+
* **actor_name**: `str` The name of the actor that generated the session.
2324
* **type**: `str` The type of the session.
2425
* **begin_time**: `datetime` The date and time when this session began.
2526
* **content_inspection_results**: `List[ContentInspectionResult]` The results of content inspection.
@@ -43,6 +44,7 @@ class Session(ResponseModel):
4344
"""
4445

4546
actor_id: Optional[str] = Field(None, alias="actorId")
47+
actor_name: Optional[str] = Field(None, alias="actorName")
4648
type: Optional[str] = Field(None)
4749
begin_time: Optional[int] = Field(None, alias="beginTime")
4850
content_inspection_results: Optional[ContentInspectionResult] = Field(

tests/test_sessions.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
TEST_SESSION = {
3232
"actorId": TEST_SESSION_ID,
33+
"actorName": "test_actor_name",
3334
"type": "STANDARD",
3435
"beginTime": POSIX_TS,
3536
"contentInspectionResults": {"detectedOnAlerts": ["PII"]},
@@ -66,7 +67,12 @@
6667
],
6768
"tenantId": "string",
6869
"triggeredAlerts": [
69-
{"alertId": "alert-id", "lessonId": "lesson-id", "ruleId": "rule-id"}
70+
{
71+
"alertId": "alert-id",
72+
"lessonId": "lesson-id",
73+
"ruleId": "rule-id",
74+
"ruleName": "rule name",
75+
}
7076
],
7177
"userId": "string",
7278
}

0 commit comments

Comments
 (0)