Skip to content

Commit 7b9b4cc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ba41dfb of spec repo
1 parent 5b9bccd commit 7b9b4cc

21 files changed

Lines changed: 1054 additions & 3 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,6 +1828,38 @@ components:
18281828
x-enum-varnames:
18291829
- CUSTOM_TIMEBOARD
18301830
- CUSTOM_SCREENBOARD
1831+
DataProjectionQuery:
1832+
description: Query configuration for a data projection request.
1833+
properties:
1834+
data_source:
1835+
description: Data source for the query.
1836+
example: logs
1837+
type: string
1838+
indexes:
1839+
description: List of indexes to query.
1840+
items:
1841+
description: Index name.
1842+
type: string
1843+
type: array
1844+
query_string:
1845+
description: The query string to filter events.
1846+
example: "service:web-store"
1847+
type: string
1848+
storage:
1849+
description: Storage location for the query.
1850+
type: string
1851+
required:
1852+
- query_string
1853+
- data_source
1854+
type: object
1855+
DataProjectionRequestType:
1856+
description: Type of a data projection request.
1857+
enum:
1858+
- data_projection
1859+
example: data_projection
1860+
type: string
1861+
x-enum-varnames:
1862+
- DATA_PROJECTION
18311863
DeleteSharedDashboardResponse:
18321864
description: Response containing token of deleted shared dashboard.
18331865
properties:
@@ -11343,6 +11375,150 @@ components:
1134311375
maxItems: 2
1134411376
minItems: 2
1134511377
type: array
11378+
PointPlotDimension:
11379+
description: Dimension of the point plot.
11380+
enum:
11381+
- group
11382+
- time
11383+
- y
11384+
- radius
11385+
example: y
11386+
type: string
11387+
x-enum-varnames:
11388+
- GROUP
11389+
- TIME
11390+
- Y
11391+
- RADIUS
11392+
PointPlotProjection:
11393+
description: Projection configuration for the point plot widget.
11394+
properties:
11395+
dimensions:
11396+
description: List of dimension mappings for the projection.
11397+
items:
11398+
$ref: "#/components/schemas/PointPlotProjectionDimension"
11399+
type: array
11400+
extra_columns:
11401+
description: Additional columns to include in the projection.
11402+
items:
11403+
description: Column name.
11404+
type: string
11405+
type: array
11406+
type:
11407+
$ref: "#/components/schemas/PointPlotProjectionType"
11408+
required:
11409+
- type
11410+
- dimensions
11411+
type: object
11412+
PointPlotProjectionDimension:
11413+
description: Dimension mapping for the point plot projection.
11414+
properties:
11415+
alias:
11416+
description: Alias for the column.
11417+
type: string
11418+
column:
11419+
description: Source column name from the dataset.
11420+
example: duration
11421+
type: string
11422+
dimension:
11423+
$ref: "#/components/schemas/PointPlotDimension"
11424+
required:
11425+
- column
11426+
- dimension
11427+
type: object
11428+
PointPlotProjectionType:
11429+
description: Type of the projection.
11430+
enum:
11431+
- point_plot
11432+
example: point_plot
11433+
type: string
11434+
x-enum-varnames:
11435+
- POINT_PLOT
11436+
PointPlotWidgetDefinition:
11437+
description: The point plot displays individual data points over time.
11438+
properties:
11439+
custom_links:
11440+
description: List of custom links.
11441+
items:
11442+
$ref: "#/components/schemas/WidgetCustomLink"
11443+
type: array
11444+
description:
11445+
description: The description of the widget.
11446+
type: string
11447+
legend:
11448+
$ref: "#/components/schemas/PointPlotWidgetLegend"
11449+
markers:
11450+
description: List of markers for the widget.
11451+
items:
11452+
$ref: "#/components/schemas/WidgetMarker"
11453+
type: array
11454+
requests:
11455+
description: List of request configurations for the widget.
11456+
items:
11457+
$ref: "#/components/schemas/PointPlotWidgetRequest"
11458+
type: array
11459+
time:
11460+
$ref: "#/components/schemas/WidgetTime"
11461+
title:
11462+
description: Title of the widget.
11463+
type: string
11464+
title_align:
11465+
$ref: "#/components/schemas/WidgetTextAlign"
11466+
title_size:
11467+
description: Size of the title.
11468+
type: string
11469+
type:
11470+
$ref: "#/components/schemas/PointPlotWidgetDefinitionType"
11471+
yaxis:
11472+
$ref: "#/components/schemas/WidgetAxis"
11473+
required:
11474+
- type
11475+
- requests
11476+
type: object
11477+
PointPlotWidgetDefinitionType:
11478+
default: point_plot
11479+
description: Type of the point plot widget.
11480+
enum:
11481+
- point_plot
11482+
example: point_plot
11483+
type: string
11484+
x-enum-varnames:
11485+
- POINT_PLOT
11486+
PointPlotWidgetLegend:
11487+
description: Legend configuration for the point plot widget.
11488+
properties:
11489+
type:
11490+
$ref: "#/components/schemas/PointPlotWidgetLegendType"
11491+
required:
11492+
- type
11493+
type: object
11494+
PointPlotWidgetLegendType:
11495+
description: Type of legend to show for the point plot widget.
11496+
enum:
11497+
- automatic
11498+
- none
11499+
example: automatic
11500+
type: string
11501+
x-enum-varnames:
11502+
- AUTOMATIC
11503+
- NONE
11504+
PointPlotWidgetRequest:
11505+
description: Request configuration for the point plot widget.
11506+
properties:
11507+
limit:
11508+
description: Maximum number of data points to return.
11509+
format: int64
11510+
type: integer
11511+
projection:
11512+
$ref: "#/components/schemas/PointPlotProjection"
11513+
query:
11514+
$ref: "#/components/schemas/DataProjectionQuery"
11515+
request_type:
11516+
$ref: "#/components/schemas/DataProjectionRequestType"
11517+
required:
11518+
- request_type
11519+
- query
11520+
- projection
11521+
type: object
1134611522
PowerpackTemplateVariableContents:
1134711523
description: Powerpack template variable contents.
1134811524
properties:
@@ -25615,6 +25791,7 @@ components:
2561525791
- $ref: "#/components/schemas/MonitorSummaryWidgetDefinition"
2561625792
- $ref: "#/components/schemas/NoteWidgetDefinition"
2561725793
- $ref: "#/components/schemas/PowerpackWidgetDefinition"
25794+
- $ref: "#/components/schemas/PointPlotWidgetDefinition"
2561825795
- $ref: "#/components/schemas/QueryValueWidgetDefinition"
2561925796
- $ref: "#/components/schemas/RetentionCurveWidgetDefinition"
2562025797
- $ref: "#/components/schemas/RunWorkflowWidgetDefinition"

docs/datadog_api_client.v1.model.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,20 @@ datadog\_api\_client.v1.model.dashboard\_type module
676676
:members:
677677
:show-inheritance:
678678

679+
datadog\_api\_client.v1.model.data\_projection\_query module
680+
------------------------------------------------------------
681+
682+
.. automodule:: datadog_api_client.v1.model.data_projection_query
683+
:members:
684+
:show-inheritance:
685+
686+
datadog\_api\_client.v1.model.data\_projection\_request\_type module
687+
--------------------------------------------------------------------
688+
689+
.. automodule:: datadog_api_client.v1.model.data_projection_request_type
690+
:members:
691+
:show-inheritance:
692+
679693
datadog\_api\_client.v1.model.delete\_shared\_dashboard\_response module
680694
------------------------------------------------------------------------
681695

@@ -3441,6 +3455,69 @@ datadog\_api\_client.v1.model.point module
34413455
:members:
34423456
:show-inheritance:
34433457

3458+
datadog\_api\_client.v1.model.point\_plot\_dimension module
3459+
-----------------------------------------------------------
3460+
3461+
.. automodule:: datadog_api_client.v1.model.point_plot_dimension
3462+
:members:
3463+
:show-inheritance:
3464+
3465+
datadog\_api\_client.v1.model.point\_plot\_projection module
3466+
------------------------------------------------------------
3467+
3468+
.. automodule:: datadog_api_client.v1.model.point_plot_projection
3469+
:members:
3470+
:show-inheritance:
3471+
3472+
datadog\_api\_client.v1.model.point\_plot\_projection\_dimension module
3473+
-----------------------------------------------------------------------
3474+
3475+
.. automodule:: datadog_api_client.v1.model.point_plot_projection_dimension
3476+
:members:
3477+
:show-inheritance:
3478+
3479+
datadog\_api\_client.v1.model.point\_plot\_projection\_type module
3480+
------------------------------------------------------------------
3481+
3482+
.. automodule:: datadog_api_client.v1.model.point_plot_projection_type
3483+
:members:
3484+
:show-inheritance:
3485+
3486+
datadog\_api\_client.v1.model.point\_plot\_widget\_definition module
3487+
--------------------------------------------------------------------
3488+
3489+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_definition
3490+
:members:
3491+
:show-inheritance:
3492+
3493+
datadog\_api\_client.v1.model.point\_plot\_widget\_definition\_type module
3494+
--------------------------------------------------------------------------
3495+
3496+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_definition_type
3497+
:members:
3498+
:show-inheritance:
3499+
3500+
datadog\_api\_client.v1.model.point\_plot\_widget\_legend module
3501+
----------------------------------------------------------------
3502+
3503+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_legend
3504+
:members:
3505+
:show-inheritance:
3506+
3507+
datadog\_api\_client.v1.model.point\_plot\_widget\_legend\_type module
3508+
----------------------------------------------------------------------
3509+
3510+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_legend_type
3511+
:members:
3512+
:show-inheritance:
3513+
3514+
datadog\_api\_client.v1.model.point\_plot\_widget\_request module
3515+
-----------------------------------------------------------------
3516+
3517+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_request
3518+
:members:
3519+
:show-inheritance:
3520+
34443521
datadog\_api\_client.v1.model.powerpack\_template\_variable\_contents module
34453522
----------------------------------------------------------------------------
34463523

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
"""
2+
Create a new dashboard with point_plot widget
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
7+
from datadog_api_client.v1.model.dashboard import Dashboard
8+
from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType
9+
from datadog_api_client.v1.model.data_projection_query import DataProjectionQuery
10+
from datadog_api_client.v1.model.data_projection_request_type import DataProjectionRequestType
11+
from datadog_api_client.v1.model.point_plot_dimension import PointPlotDimension
12+
from datadog_api_client.v1.model.point_plot_projection import PointPlotProjection
13+
from datadog_api_client.v1.model.point_plot_projection_dimension import PointPlotProjectionDimension
14+
from datadog_api_client.v1.model.point_plot_projection_type import PointPlotProjectionType
15+
from datadog_api_client.v1.model.point_plot_widget_definition import PointPlotWidgetDefinition
16+
from datadog_api_client.v1.model.point_plot_widget_definition_type import PointPlotWidgetDefinitionType
17+
from datadog_api_client.v1.model.point_plot_widget_request import PointPlotWidgetRequest
18+
from datadog_api_client.v1.model.widget import Widget
19+
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
20+
21+
body = Dashboard(
22+
title="Example-Dashboard",
23+
layout_type=DashboardLayoutType.ORDERED,
24+
widgets=[
25+
Widget(
26+
definition=PointPlotWidgetDefinition(
27+
title="",
28+
title_size="16",
29+
title_align=WidgetTextAlign.LEFT,
30+
type=PointPlotWidgetDefinitionType.POINT_PLOT,
31+
requests=[
32+
PointPlotWidgetRequest(
33+
request_type=DataProjectionRequestType.DATA_PROJECTION,
34+
query=DataProjectionQuery(
35+
query_string="service:web-store",
36+
data_source="logs",
37+
),
38+
projection=PointPlotProjection(
39+
type=PointPlotProjectionType.POINT_PLOT,
40+
dimensions=[
41+
PointPlotProjectionDimension(
42+
column="host",
43+
dimension=PointPlotDimension.GROUP,
44+
),
45+
PointPlotProjectionDimension(
46+
column="@duration",
47+
dimension=PointPlotDimension.Y,
48+
),
49+
],
50+
),
51+
),
52+
],
53+
),
54+
),
55+
],
56+
)
57+
58+
configuration = Configuration()
59+
with ApiClient(configuration) as api_client:
60+
api_instance = DashboardsApi(api_client)
61+
response = api_instance.create_dashboard(body=body)
62+
63+
print(response)

0 commit comments

Comments
 (0)