Skip to content

Commit 24a094a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Deprecate note for Incident Teams endpoints (#1450)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent d0f29e8 commit 24a094a

File tree

4 files changed

+31
-29
lines changed

4 files changed

+31
-29
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.4",
7-
"regenerated": "2023-05-04 18:36:58.546008",
8-
"spec_repo_commit": "05a49f9c"
7+
"regenerated": "2023-05-04 18:52:22.109705",
8+
"spec_repo_commit": "4706b973"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-05-04 18:36:58.558261",
13-
"spec_repo_commit": "05a49f9c"
12+
"regenerated": "2023-05-04 18:52:22.122098",
13+
"spec_repo_commit": "4706b973"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23142,6 +23142,7 @@ paths:
2314223142
x-codegen-request-body-name: body
2314323143
/api/v2/teams:
2314423144
get:
23145+
deprecated: true
2314523146
description: Get all incident teams for the requesting user's organization.
2314623147
If the `include[users]` query parameter is provided, the included attribute
2314723148
will contain the users related to these incident teams.
@@ -23176,10 +23177,9 @@ paths:
2317623177
summary: Get a list of all incident teams
2317723178
tags:
2317823179
- Incident Teams
23179-
x-unstable: '**Note**: This endpoint is in public beta.
23180-
23181-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
23180+
x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).'
2318223181
post:
23182+
deprecated: true
2318323183
description: Creates a new incident team.
2318423184
operationId: CreateIncidentTeam
2318523185
requestBody:
@@ -23215,11 +23215,10 @@ paths:
2321523215
tags:
2321623216
- Incident Teams
2321723217
x-codegen-request-body-name: body
23218-
x-unstable: '**Note**: This endpoint is in public beta.
23219-
23220-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
23218+
x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).'
2322123219
/api/v2/teams/{team_id}:
2322223220
delete:
23221+
deprecated: true
2322323222
description: Deletes an existing incident team.
2322423223
operationId: DeleteIncidentTeam
2322523224
parameters:
@@ -23245,10 +23244,9 @@ paths:
2324523244
summary: Delete an existing incident team
2324623245
tags:
2324723246
- Incident Teams
23248-
x-unstable: '**Note**: This endpoint is in public beta.
23249-
23250-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
23247+
x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).'
2325123248
get:
23249+
deprecated: true
2325223250
description: 'Get details of an incident team. If the `include[users]` query
2325323251
parameter is provided,
2325423252

@@ -23282,10 +23280,9 @@ paths:
2328223280
summary: Get details of an incident team
2328323281
tags:
2328423282
- Incident Teams
23285-
x-unstable: '**Note**: This endpoint is in public beta.
23286-
23287-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
23283+
x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).'
2328823284
patch:
23285+
deprecated: true
2328923286
description: Updates an existing incident team. Only provide the attributes
2329023287
which should be updated as this request is a partial update.
2329123288
operationId: UpdateIncidentTeam
@@ -23324,9 +23321,7 @@ paths:
2332423321
tags:
2332523322
- Incident Teams
2332623323
x-codegen-request-body-name: body
23327-
x-unstable: '**Note**: This endpoint is in public beta.
23328-
23329-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
23324+
x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).'
2333023325
/api/v2/usage/application_security:
2333123326
get:
2333223327
description: 'Get hourly usage for application security .
@@ -24331,8 +24326,8 @@ tags:
2433124326
- description: Create, update, delete, and retrieve services which can be associated
2433224327
with incidents.
2433324328
name: Incident Services
24334-
- description: Create, update, delete and retrieve teams which can be associated with
24335-
incidents.
24329+
- description: The Incident Teams endpoints are deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/)
24330+
to create, update, delete, and retrieve teams which can be associated with incidents.
2433624331
name: Incident Teams
2433724332
- description: Manage incident response.
2433824333
name: Incidents

src/datadog_api_client/v2/api/incident_teams_api.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import annotations
55

66
from typing import Any, Dict, Union
7+
import warnings
78

89
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
910
from datadog_api_client.configuration import Configuration
@@ -20,7 +21,7 @@
2021

2122
class IncidentTeamsApi:
2223
"""
23-
Create, update, delete and retrieve teams which can be associated with incidents.
24+
The Incident Teams endpoints are deprecated. See the `Teams API endpoints <https://docs.datadoghq.com/api/latest/teams/>`_ to create, update, delete, and retrieve teams which can be associated with incidents.
2425
"""
2526

2627
def __init__(self, api_client=None):
@@ -174,7 +175,7 @@ def create_incident_team(
174175
self,
175176
body: IncidentTeamCreateRequest,
176177
) -> IncidentTeamResponse:
177-
"""Create a new incident team.
178+
"""Create a new incident team. **Deprecated**.
178179
179180
Creates a new incident team.
180181
@@ -185,13 +186,14 @@ def create_incident_team(
185186
kwargs: Dict[str, Any] = {}
186187
kwargs["body"] = body
187188

189+
warnings.warn("create_incident_team is deprecated", DeprecationWarning, stacklevel=2)
188190
return self._create_incident_team_endpoint.call_with_http_info(**kwargs)
189191

190192
def delete_incident_team(
191193
self,
192194
team_id: str,
193195
) -> None:
194-
"""Delete an existing incident team.
196+
"""Delete an existing incident team. **Deprecated**.
195197
196198
Deletes an existing incident team.
197199
@@ -202,6 +204,7 @@ def delete_incident_team(
202204
kwargs: Dict[str, Any] = {}
203205
kwargs["team_id"] = team_id
204206

207+
warnings.warn("delete_incident_team is deprecated", DeprecationWarning, stacklevel=2)
205208
return self._delete_incident_team_endpoint.call_with_http_info(**kwargs)
206209

207210
def get_incident_team(
@@ -210,7 +213,7 @@ def get_incident_team(
210213
*,
211214
include: Union[IncidentRelatedObject, UnsetType] = unset,
212215
) -> IncidentTeamResponse:
213-
"""Get details of an incident team.
216+
"""Get details of an incident team. **Deprecated**.
214217
215218
Get details of an incident team. If the ``include[users]`` query parameter is provided,
216219
the included attribute will contain the users related to these incident teams.
@@ -227,6 +230,7 @@ def get_incident_team(
227230
if include is not unset:
228231
kwargs["include"] = include
229232

233+
warnings.warn("get_incident_team is deprecated", DeprecationWarning, stacklevel=2)
230234
return self._get_incident_team_endpoint.call_with_http_info(**kwargs)
231235

232236
def list_incident_teams(
@@ -237,7 +241,7 @@ def list_incident_teams(
237241
page_offset: Union[int, UnsetType] = unset,
238242
filter: Union[str, UnsetType] = unset,
239243
) -> IncidentTeamsResponse:
240-
"""Get a list of all incident teams.
244+
"""Get a list of all incident teams. **Deprecated**.
241245
242246
Get all incident teams for the requesting user's organization. If the ``include[users]`` query parameter is provided, the included attribute will contain the users related to these incident teams.
243247
@@ -264,14 +268,15 @@ def list_incident_teams(
264268
if filter is not unset:
265269
kwargs["filter"] = filter
266270

271+
warnings.warn("list_incident_teams is deprecated", DeprecationWarning, stacklevel=2)
267272
return self._list_incident_teams_endpoint.call_with_http_info(**kwargs)
268273

269274
def update_incident_team(
270275
self,
271276
team_id: str,
272277
body: IncidentTeamUpdateRequest,
273278
) -> IncidentTeamResponse:
274-
"""Update an existing incident team.
279+
"""Update an existing incident team. **Deprecated**.
275280
276281
Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update.
277282
@@ -286,4 +291,5 @@ def update_incident_team(
286291

287292
kwargs["body"] = body
288293

294+
warnings.warn("update_incident_team is deprecated", DeprecationWarning, stacklevel=2)
289295
return self._update_incident_team_endpoint.call_with_http_info(**kwargs)

tests/v2/features/incident_teams.feature

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@endpoint(incident-teams) @endpoint(incident-teams-v2)
22
Feature: Incident Teams
3-
Create, update, delete and retrieve teams which can be associated with
4-
incidents.
3+
The Incident Teams endpoints are deprecated. See the [Teams API
4+
endpoints](https://docs.datadoghq.com/api/latest/teams/) to create,
5+
update, delete, and retrieve teams which can be associated with incidents.
56

67
Background:
78
Given a valid "apiKeyAuth" key in the system

0 commit comments

Comments
 (0)