Skip to content

Commit 431f69d

Browse files
Merge pull request #147 from code42/INTEG-2887/deprecate-v1-apis
Integ 2887/deprecate v1 apis
2 parents 020860c + b96388a commit 431f69d

File tree

25 files changed

+1974
-270
lines changed

25 files changed

+1974
-270
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,28 @@
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+
## Unreleased
13+
14+
### Added
15+
16+
- `watchlists.v2` methods are added to the SDK, for parity with the API.
17+
- New CLI watchlist commands `list-excluded-actors` and `list-included-actors` to replace the deprecated `list-excluded-users` and `list-included-users`.
18+
19+
### Updated
20+
21+
- The CLI's `watchlists` commands now use the v2 watchlist API. These commands correctly use `actor_id` instead of `user_id`. While the previous user_id parameters will still work for now, we recommend that users switch as soon as possible to using actor_id instead.
22+
23+
### Fixed
24+
25+
- A bug where the api endpoint used to download audit log events was incorrect.
26+
27+
### Deprecated
28+
29+
- Devices methods in the SDK and CLI are deprecated. Use the Agents methods instead.
30+
- Risk Profiles methods in the SDK and CLI, already deprecated, are more clearly marked.
31+
- The SDK's `watchlists.v1` methods are deprecated.
32+
- The CLI's watchlist group `list-excluded-users` and `list-included-users` commands are deprecated. Use `list-excluded-actors` and `list-included-actors` instead.
33+
1234
## 2.2.4 - 2025-03-11
1335

1436
### Added

docs/cli/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,18 @@ The following subcommand groups are available under the `incydr` command:
2828
* [Actors](cmds/actors.md)
2929
* [Agents](cmds/agents.md)
3030
* [Alert Rules](cmds/alert_rules.md)
31-
* [Alerts (Deprecated)](cmds/alerts.md)
3231
* [Audit Log](cmds/audit_log.md)
3332
* [Cases](cmds/cases.md)
3433
* [Departments](cmds/departments.md)
35-
* [Devices](cmds/devices.md)
3634
* [Directory Groups](cmds/directory_groups.md)
3735
* [File Events](cmds/file_events.md)
38-
* [Risk Profiles](cmds/risk_profiles.md)
3936
* [Sessions](cmds/sessions.md)
4037
* [Trusted Activities](cmds/trusted_activities.md)
4138
* [Users](cmds/users.md)
4239
* [Watchlists](cmds/watchlists.md)
40+
41+
Deprecated command groups:
42+
43+
* [Alerts (Deprecated)](cmds/alerts.md)
44+
* [Devices (Deprecated)](cmds/devices.md)
45+
* [Risk Profiles (Deprecated)](cmds/risk_profiles.md)

docs/sdk/clients/devices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Devices
1+
# Devices (Deprecated)
22

33
::: _incydr_sdk.devices.client.DevicesV1
44
:docstring:

docs/sdk/clients/risk_profiles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Risk Profiles
1+
# Risk Profiles (Deprecated)
22

33
::: _incydr_sdk.risk_profiles.client.RiskProfilesV1
44
:docstring:

docs/sdk/clients/watchlists.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Watchlists
22

3+
::: _incydr_sdk.watchlists.client.WatchlistsV2
4+
:docstring:
5+
:members:
6+
37
::: _incydr_sdk.watchlists.client.WatchlistsV1
48
:docstring:
59
:members:

docs/sdk/enums.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ Alerts has been replaced by [Sessions](#sessions).
124124
* **CLOSED**: `"CLOSED"`
125125
* **OPEN**: `"OPEN"`
126126

127-
## Devices
127+
## Devices (Deprecated)
128+
129+
Devices has been replaced by [Agents](#agents)
128130

129131
### Devices Sort Keys
130132

docs/sdk/models.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ Alerts has been replaced by [Sessions](#sessions).
124124
::: incydr.models.DepartmentsPage
125125
:docstring:
126126

127-
## Devices
127+
## Devices (Deprecated)
128+
129+
Devices has been replaced by [Agents](#agents).
130+
128131
---
129132

130133
### `Device` model
@@ -220,7 +223,10 @@ Alerts has been replaced by [Sessions](#sessions).
220223
:::incydr.models.Role
221224
:docstring:
222225

223-
## Risk Profiles
226+
## Risk Profiles (Deprecated)
227+
228+
Risk Profiles have been replaced by [Actors](#actors).
229+
224230
---
225231

226232
### `RiskProfile` model
@@ -246,23 +252,51 @@ Alerts has been replaced by [Sessions](#sessions).
246252
::: incydr.models.WatchlistsPage
247253
:docstring:
248254

255+
### `WatchlistActor` model
256+
257+
::: incydr.models.WatchlistActor
258+
:docstring:
259+
249260
### `WatchlistUser` model
250261

262+
WatchlistUser is deprecated. Use WatchlistActor instead.
263+
251264
::: incydr.models.WatchlistUser
252265
:docstring:
253266

267+
### `WatchlistMembersListV2` model
268+
269+
::: incydr.models.WatchlistMembersListV2
270+
:docstring:
271+
254272
### `WatchlistMembersList` model
255273

274+
WatchlistMembersList is deprecated. Use WatchlistMembersListV2 instead.
275+
256276
::: incydr.models.WatchlistMembersList
257277
:docstring:
258278

279+
### `IncludedActorsList` model
280+
281+
::: incydr.models.IncludedActorsList
282+
:docstring:
283+
284+
### `ExcludedActorsList` model
285+
286+
::: incydr.models.ExcludedActorsList
287+
:docstring:
288+
259289
### `IncludedUsersList` model
260290

291+
IncludedUsersList is deprecated. Use IncludedActorsList instead.
292+
261293
::: incydr.models.IncludedUsersList
262294
:docstring:
263295

264296
### `ExcludedUsersList` model
265297

298+
ExcludedUsersList is deprecated. Use ExcludedActorsList instead.
299+
266300
::: incydr.models.ExcludedUsersList
267301
:docstring:
268302

mkdocs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,22 @@ nav:
4343
- Reference:
4444
- Actors: 'sdk/clients/actors.md'
4545
- Agents: 'sdk/clients/agents.md'
46-
- Alerts (Deprecated): 'sdk/clients/alerts.md'
4746
- Alert Rules: 'sdk/clients/alert_rules.md'
4847
- Alert Querying: 'sdk/clients/alert_queries.md'
4948
- Audit Log: 'sdk/clients/audit_log.md'
5049
- Cases: 'sdk/clients/cases.md'
5150
- Customer: 'sdk/clients/customer.md'
5251
- Departments: 'sdk/clients/departments.md'
53-
- Devices: 'sdk/clients/devices.md'
5452
- Directory Groups: 'sdk/clients/directory_groups.md'
5553
- File Events: 'sdk/clients/file_events.md'
5654
- File Event Querying: 'sdk/clients/file_event_queries.md'
57-
- Risk Profiles: 'sdk/clients/risk_profiles.md'
5855
- Sessions: 'sdk/clients/sessions.md'
5956
- Trusted Activites: 'sdk/clients/trusted_activities.md'
6057
- Users: 'sdk/clients/users.md'
6158
- Watchlists: 'sdk/clients/watchlists.md'
59+
- Alerts (Deprecated): 'sdk/clients/alerts.md'
60+
- Devices (Deprecated): 'sdk/clients/devices.md'
61+
- Risk Profiles (Deprecated): 'sdk/clients/risk_profiles.md'
6262
- Enums: 'sdk/enums.md'
6363
- Models: 'sdk/models.md'
6464
- CLI:
@@ -71,19 +71,19 @@ nav:
7171
- Commands:
7272
- Actors: 'cli/cmds/actors.md'
7373
- Agents: 'cli/cmds/agents.md'
74-
- Alerts (Deprecated): 'cli/cmds/alerts.md'
7574
- Alert Rules: 'cli/cmds/alert_rules.md'
7675
- Audit Log: 'cli/cmds/audit_log.md'
7776
- Cases: 'cli/cmds/cases.md'
7877
- Departments: 'cli/cmds/departments.md'
79-
- Devices: 'cli/cmds/devices.md'
8078
- Directory Groups: 'cli/cmds/directory_groups.md'
8179
- File Events: 'cli/cmds/file_events.md'
82-
- Risk Profiles: 'cli/cmds/risk_profiles.md'
8380
- Sessions: 'cli/cmds/sessions.md'
8481
- Trusted Activites: 'cli/cmds/trusted_activities.md'
8582
- Users: 'cli/cmds/users.md'
8683
- Watchlists: 'cli/cmds/watchlists.md'
84+
- Alerts (Deprecated): 'cli/cmds/alerts.md'
85+
- Devices (Deprecated): 'cli/cmds/devices.md'
86+
- Risk Profiles (Deprecated): 'cli/cmds/risk_profiles.md'
8787
- Guides:
8888
- Introduction: 'integration-guides/index.md'
8989
- Microsoft Sentinel:

src/_incydr_cli/cmds/alerts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
@click.group(cls=IncydrGroup)
4848
@logging_options
4949
def alerts():
50-
"""View and manage alerts."""
50+
"""DEPRECATED. Use the Sessions command group instead. View and manage alerts."""
5151
deprecation_warning(DEPRECATION_TEXT)
5252

5353

src/_incydr_cli/cmds/devices.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,23 @@
99
from _incydr_cli.cmds.options.output_options import SingleFormat
1010
from _incydr_cli.cmds.options.output_options import table_format_option
1111
from _incydr_cli.cmds.options.output_options import TableFormat
12+
from _incydr_cli.cmds.utils import deprecation_warning
1213
from _incydr_cli.core import IncydrCommand
1314
from _incydr_cli.core import IncydrGroup
1415
from _incydr_sdk.core.client import Client
1516
from _incydr_sdk.devices.models import Device
1617
from _incydr_sdk.utils import model_as_card
1718

1819

20+
# Deprecated 2025-03
21+
DEPRECATION_TEXT = "DeprecationWarning: Devices commands are deprecated. Use the 'incydr agents' command group instead."
22+
23+
1924
@click.group(cls=IncydrGroup)
2025
@logging_options
2126
def devices():
22-
"""View devices."""
27+
"""DEPRECATED. Use the agents command group instead. View devices."""
28+
deprecation_warning(DEPRECATION_TEXT)
2329

2430

2531
@devices.command("list", cls=IncydrCommand)

0 commit comments

Comments
 (0)