Skip to content

Commit 5ae07e3

Browse files
deprecate devices, docs
1 parent 51f6694 commit 5ae07e3

File tree

11 files changed

+54
-17
lines changed

11 files changed

+54
-17
lines changed

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/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: 8 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

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)

src/_incydr_cli/cmds/risk_profiles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
@click.group(cls=IncydrGroup)
3030
@logging_options
3131
def risk_profiles():
32-
"""View and manage risk profiles."""
32+
"""DEPRECATED. Use the Actors command group instead. View and manage risk profiles."""
3333
deprecation_warning(DEPRECATION_TEXT)
3434

3535

src/_incydr_sdk/devices/client.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from itertools import count
22
from typing import Iterator
3+
from warnings import warn
34

45
from .models import Device
56
from .models import DevicesPage
@@ -23,6 +24,8 @@ def v1(self):
2324
class DevicesV1:
2425
"""Client for `/v1/devices` endpoints.
2526
27+
This client is deprecated. Use the Agents client instead.
28+
2629
Usage example:
2730
2831
>>> import incydr
@@ -43,6 +46,11 @@ def get_device(self, device_id: str) -> Device:
4346
**Returns**: A [`Device`][device-model] object representing the device.
4447
4548
"""
49+
warn(
50+
"Devices endpoints are deprecated. Replaced by Agents.",
51+
DeprecationWarning,
52+
stacklevel=2,
53+
)
4654
response = self._parent.session.get(f"/v1/devices/{device_id}")
4755
return Device.parse_response(response)
4856

@@ -71,6 +79,11 @@ def get_page(
7179
7280
**Returns**: A ['DevicesPage'][devicespage-model] object.
7381
"""
82+
warn(
83+
"Devices endpoints are deprecated. Replaced by Agents.",
84+
DeprecationWarning,
85+
stacklevel=2,
86+
)
7487
page_size = page_size or self._parent.settings.page_size
7588
data = QueryDevicesRequest(
7689
page=page_num,
@@ -98,6 +111,11 @@ def iter_all(
98111
99112
**Returns**: A generator yielding individual [`Device`][device-model] objects.
100113
"""
114+
warn(
115+
"Devices endpoints are deprecated. Replaced by Agents.",
116+
DeprecationWarning,
117+
stacklevel=2,
118+
)
101119
page_size = page_size or self._parent.settings.page_size
102120
for page_num in count(1):
103121
page = self.get_page(

0 commit comments

Comments
 (0)