Skip to content

Commit 08dc111

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add GET /api/v2/apm/services endpoint to public documentation (#2999)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 1704d71 commit 08dc111

File tree

16 files changed

+445
-16
lines changed

16 files changed

+445
-16
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51360,6 +51360,49 @@ components:
5136051360
$ref: '#/components/schemas/ServiceDefinitionData'
5136151361
type: array
5136251362
type: object
51363+
ServiceList:
51364+
properties:
51365+
data:
51366+
$ref: '#/components/schemas/ServiceListData'
51367+
type: object
51368+
ServiceListData:
51369+
properties:
51370+
attributes:
51371+
$ref: '#/components/schemas/ServiceListDataAttributes'
51372+
id:
51373+
type: string
51374+
type:
51375+
$ref: '#/components/schemas/ServiceListDataType'
51376+
required:
51377+
- type
51378+
type: object
51379+
ServiceListDataAttributes:
51380+
properties:
51381+
metadata:
51382+
items:
51383+
$ref: '#/components/schemas/ServiceListDataAttributesMetadataItems'
51384+
type: array
51385+
services:
51386+
items:
51387+
type: string
51388+
type: array
51389+
type: object
51390+
ServiceListDataAttributesMetadataItems:
51391+
properties:
51392+
isTraced:
51393+
type: boolean
51394+
isUsm:
51395+
type: boolean
51396+
type: object
51397+
ServiceListDataType:
51398+
default: services_list
51399+
description: Services list resource type.
51400+
enum:
51401+
- services_list
51402+
example: services_list
51403+
type: string
51404+
x-enum-varnames:
51405+
- SERVICES_LIST
5136351406
ServiceNowBasicAuth:
5136451407
description: The definition of the `ServiceNowBasicAuth` object.
5136551408
properties:
@@ -61622,6 +61665,26 @@ paths:
6162261665
permissions:
6162361666
- apm_retention_filter_write
6162461667
- apm_pipelines_write
61668+
/api/v2/apm/services:
61669+
get:
61670+
operationId: GetServiceList
61671+
responses:
61672+
'200':
61673+
content:
61674+
application/json:
61675+
schema:
61676+
$ref: '#/components/schemas/ServiceList'
61677+
description: OK
61678+
'429':
61679+
$ref: '#/components/responses/TooManyRequestsResponse'
61680+
security:
61681+
- apiKeyAuth: []
61682+
appKeyAuth: []
61683+
- AuthZ:
61684+
- apm_read
61685+
summary: Get service list
61686+
tags:
61687+
- APM
6162561688
/api/v2/app-builder/apps:
6162661689
delete:
6162761690
description: Delete multiple apps in a single request from a list of app IDs.
@@ -69355,9 +69418,6 @@ paths:
6935569418
operator: OR
6935669419
permissions:
6935769420
- incident_read
69358-
x-unstable: '**Note**: This endpoint is in Preview.
69359-
69360-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6936169421
post:
6936269422
description: Create an impact for an incident.
6936369423
operationId: CreateIncidentImpact
@@ -69401,9 +69461,6 @@ paths:
6940169461
operator: OR
6940269462
permissions:
6940369463
- incident_write
69404-
x-unstable: '**Note**: This endpoint is in Preview.
69405-
69406-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6940769464
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
6940869465
delete:
6940969466
description: Delete an incident impact.
@@ -69434,9 +69491,6 @@ paths:
6943469491
operator: OR
6943569492
permissions:
6943669493
- incident_write
69437-
x-unstable: '**Note**: This endpoint is in Preview.
69438-
69439-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6944069494
/api/v2/incidents/{incident_id}/relationships/integrations:
6944169495
get:
6944269496
description: Get all integration metadata for an incident.
@@ -88607,6 +88661,9 @@ servers:
8860788661
tags:
8860888662
- description: Configure your API endpoints through the Datadog API.
8860988663
name: API Management
88664+
- description: Observe, troubleshoot, and improve cloud-scale applications with all
88665+
telemetry in context
88666+
name: APM
8861088667
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
8861188668
for your organization. You need an API and application key with Admin rights to
8861288669
interact with this endpoint. See [retention filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/#retention-filters)

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ datadog\_api\_client.v2.api.api\_management\_api module
3232
:members:
3333
:show-inheritance:
3434

35+
datadog\_api\_client.v2.api.apm\_api module
36+
-------------------------------------------
37+
38+
.. automodule:: datadog_api_client.v2.api.apm_api
39+
:members:
40+
:show-inheritance:
41+
3542
datadog\_api\_client.v2.api.apm\_retention\_filters\_api module
3643
---------------------------------------------------------------
3744

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22558,6 +22558,41 @@ datadog\_api\_client.v2.model.service\_definitions\_list\_response module
2255822558
:members:
2255922559
:show-inheritance:
2256022560

22561+
datadog\_api\_client.v2.model.service\_list module
22562+
--------------------------------------------------
22563+
22564+
.. automodule:: datadog_api_client.v2.model.service_list
22565+
:members:
22566+
:show-inheritance:
22567+
22568+
datadog\_api\_client.v2.model.service\_list\_data module
22569+
--------------------------------------------------------
22570+
22571+
.. automodule:: datadog_api_client.v2.model.service_list_data
22572+
:members:
22573+
:show-inheritance:
22574+
22575+
datadog\_api\_client.v2.model.service\_list\_data\_attributes module
22576+
--------------------------------------------------------------------
22577+
22578+
.. automodule:: datadog_api_client.v2.model.service_list_data_attributes
22579+
:members:
22580+
:show-inheritance:
22581+
22582+
datadog\_api\_client.v2.model.service\_list\_data\_attributes\_metadata\_items module
22583+
-------------------------------------------------------------------------------------
22584+
22585+
.. automodule:: datadog_api_client.v2.model.service_list_data_attributes_metadata_items
22586+
:members:
22587+
:show-inheritance:
22588+
22589+
datadog\_api\_client.v2.model.service\_list\_data\_type module
22590+
--------------------------------------------------------------
22591+
22592+
.. automodule:: datadog_api_client.v2.model.service_list_data_type
22593+
:members:
22594+
:show-inheritance:
22595+
2256122596
datadog\_api\_client.v2.model.service\_now\_basic\_auth module
2256222597
--------------------------------------------------------------
2256322598

examples/v2/apm/GetServiceList.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get service list returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.apm_api import APMApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = APMApi(api_client)
11+
response = api_instance.get_service_list()
12+
13+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,12 @@ def __init__(
307307
"v2.update_deployment_gate": False,
308308
"v2.update_deployment_rule": False,
309309
"v2.create_incident": False,
310-
"v2.create_incident_impact": False,
311310
"v2.create_incident_integration": False,
312311
"v2.create_incident_notification_rule": False,
313312
"v2.create_incident_notification_template": False,
314313
"v2.create_incident_todo": False,
315314
"v2.create_incident_type": False,
316315
"v2.delete_incident": False,
317-
"v2.delete_incident_impact": False,
318316
"v2.delete_incident_integration": False,
319317
"v2.delete_incident_notification_rule": False,
320318
"v2.delete_incident_notification_template": False,
@@ -327,7 +325,6 @@ def __init__(
327325
"v2.get_incident_todo": False,
328326
"v2.get_incident_type": False,
329327
"v2.list_incident_attachments": False,
330-
"v2.list_incident_impacts": False,
331328
"v2.list_incident_integrations": False,
332329
"v2.list_incident_notification_rules": False,
333330
"v2.list_incident_notification_templates": False,
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Any, Dict
7+
8+
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
9+
from datadog_api_client.configuration import Configuration
10+
from datadog_api_client.v2.model.service_list import ServiceList
11+
12+
13+
class APMApi:
14+
"""
15+
Observe, troubleshoot, and improve cloud-scale applications with all telemetry in context
16+
"""
17+
18+
def __init__(self, api_client=None):
19+
if api_client is None:
20+
api_client = ApiClient(Configuration())
21+
self.api_client = api_client
22+
23+
self._get_service_list_endpoint = _Endpoint(
24+
settings={
25+
"response_type": (ServiceList,),
26+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
27+
"endpoint_path": "/api/v2/apm/services",
28+
"operation_id": "get_service_list",
29+
"http_method": "GET",
30+
"version": "v2",
31+
},
32+
params_map={},
33+
headers_map={
34+
"accept": ["application/json"],
35+
},
36+
api_client=api_client,
37+
)
38+
39+
def get_service_list(
40+
self,
41+
) -> ServiceList:
42+
"""Get service list.
43+
44+
:rtype: ServiceList
45+
"""
46+
kwargs: Dict[str, Any] = {}
47+
return self._get_service_list_endpoint.call_with_http_info(**kwargs)

src/datadog_api_client/v2/apis/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from datadog_api_client.v2.api.api_management_api import APIManagementApi
2+
from datadog_api_client.v2.api.apm_api import APMApi
23
from datadog_api_client.v2.api.apm_retention_filters_api import APMRetentionFiltersApi
34
from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi
45
from datadog_api_client.v2.api.aws_logs_integration_api import AWSLogsIntegrationApi
@@ -86,6 +87,7 @@
8687

8788
__all__ = [
8889
"APIManagementApi",
90+
"APMApi",
8991
"APMRetentionFiltersApi",
9092
"AWSIntegrationApi",
9193
"AWSLogsIntegrationApi",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.service_list_data import ServiceListData
18+
19+
20+
class ServiceList(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.service_list_data import ServiceListData
24+
25+
return {
26+
"data": (ServiceListData,),
27+
}
28+
29+
attribute_map = {
30+
"data": "data",
31+
}
32+
33+
def __init__(self_, data: Union[ServiceListData, UnsetType] = unset, **kwargs):
34+
"""
35+
36+
37+
:param data:
38+
:type data: ServiceListData, optional
39+
"""
40+
if data is not unset:
41+
kwargs["data"] = data
42+
super().__init__(kwargs)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.service_list_data_attributes import ServiceListDataAttributes
18+
from datadog_api_client.v2.model.service_list_data_type import ServiceListDataType
19+
20+
21+
class ServiceListData(ModelNormal):
22+
@cached_property
23+
def openapi_types(_):
24+
from datadog_api_client.v2.model.service_list_data_attributes import ServiceListDataAttributes
25+
from datadog_api_client.v2.model.service_list_data_type import ServiceListDataType
26+
27+
return {
28+
"attributes": (ServiceListDataAttributes,),
29+
"id": (str,),
30+
"type": (ServiceListDataType,),
31+
}
32+
33+
attribute_map = {
34+
"attributes": "attributes",
35+
"id": "id",
36+
"type": "type",
37+
}
38+
39+
def __init__(
40+
self_,
41+
type: ServiceListDataType,
42+
attributes: Union[ServiceListDataAttributes, UnsetType] = unset,
43+
id: Union[str, UnsetType] = unset,
44+
**kwargs,
45+
):
46+
"""
47+
48+
49+
:param attributes:
50+
:type attributes: ServiceListDataAttributes, optional
51+
52+
:param id:
53+
:type id: str, optional
54+
55+
:param type: Services list resource type.
56+
:type type: ServiceListDataType
57+
"""
58+
if attributes is not unset:
59+
kwargs["attributes"] = attributes
60+
if id is not unset:
61+
kwargs["id"] = id
62+
super().__init__(kwargs)
63+
64+
self_.type = type

0 commit comments

Comments
 (0)